* Normalizing the comparison of numbers in the ListSIPInboundTrunkRequest Filter
1. Added normalization to the comparison of trunk and caller number in ListSIPInboundTrunkRequest
2. Moved NormalizeNumber to a utils number to prevent import cycle
* Fixing another import cycle caused by utils importing livekit
* Adding changeset
* PR feedback
* Detailed responses in trunk iter
This will help discern between cases when
1. No trunks are configured
2. Trunks are configured but none matched.(This can happen when there is no default trunk)
3. There is a default trunk that got applied
4. A specific trunk matched
* Dropping the Iter from the function name
* Adding changeset
* Support for key/value attributes on Participant
Key/value attributes lets us:
* allow various components to provide more information about the participant (i.e. SIP including the phone number)
* allow Agents to communicate their own status to the end user via RTC
* enable applications to update specific fields without overriding others
* generated protobuf
* Attribute support for SIP.
* generated protobuf
* generated protobuf
* allow specifying attributes during token generation
* Remove sip prefix and rename phone number attrs.
* regenerate protos
* update tests
* add kv attrs to sip token
* add attribute test
* changeset
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Denys Smirnov <dennwc@pm.me>
Allow inbound number filtering on SIP Dispatch Rules. It works similar to Trunks, where rules without a number filter are grouped together and take less priority than number-specific rules.
While at it, simplify the rule evaluation.
Previously it was doing some hand-crafted checks for evaluation path, that matched the validation path. Same double logic existed for priorities as well.
Now the validation is always called from evaluation, thus sharing the logic. And rule selection is simplified by just picking the first one after priority filtering.