Routing Tag detection Rules
Routing Tag detection Rules allow modifying the active set of Routing tags based on the source/destination Areas, source/destination number prefixes, and the tags already assigned to the call.
Processing order
Routing Tag detection Rules are evaluated at a specific point within the routing procedure, after Customer Auth processing and before Destination and Dialpeer lookup:
- Customer Auth — authentication, number rewriting, tag action applied from Customer Auth record.
- Customer Auth Numberlists (DST, then SRC) — additional tag actions may be applied at numberlist/item level.
- Area detection — source and destination areas are resolved by looking up
src_prefix_routinganddst_prefix_routingin the Area prefixes table. - Routing Tag Detection Rules — the best matching rule is selected and its tag action is applied to the current tag set.
- The final
routing_tag_idsare stored in the call profile and used for Destination and Dialpeer lookup.
Rule matching
The system selects at most one rule — the best match — using the following criteria (all must be satisfied):
src_area_idis NULL or matches the detected source area.dst_area_idis NULL or matches the detected destination area.src_prefixmatches the beginning of the source routing number (empty prefix matches any number).dst_prefixmatches the beginning of the destination routing number (empty prefix matches any number).- Current call tags satisfy the
routing_tag_ids/routing_tag_mode_idcondition (see Routing tag ids below). An emptyrouting_tag_idsset always matches.
When multiple rules match, priority is determined by:
- Best
tag_comparescore (most specific tag match). - Longest
src_prefixmatch. - Longest
dst_prefixmatch. - Rules with a specific area set take priority over wildcard (NULL) area.
Once the winning rule is found, its Tag action is applied to the current tag set, producing the final routing_tag_ids used for the rest of routing.
Attributes
- Id
Unique Routing Tag detection Rule's id.
- Routing tag ids
Optional filter on the tags already assigned to the call before this step (from Customer Auth or Numberlist processing). When non-empty, the rule only matches calls whose current tag set satisfies the comparison defined by Routing tag mode. When empty, the rule matches any call regardless of its current tags.
- Routing tag mode
Comparison mode for Routing tag ids:
- OR
- At least one tag from the rule's Routing tag ids must be present in the call's current tag set.
- AND
- All tags from the rule's Routing tag ids must be present in the call's current tag set.
- Src area
Restrict the rule to calls whose source number resolves to this Area. Leave empty to match any source area.
- Dst area
Restrict the rule to calls whose destination number resolves to this Area. Leave empty to match any destination area.
- Src prefix
Restrict the rule to calls whose source routing number starts with this prefix. Empty matches any source number.
- Dst prefix
Restrict the rule to calls whose destination routing number starts with this prefix. Empty matches any destination number.
- Tag action/Tag action value
The tag modification to apply when this rule is selected. See Using Routing tags guide