Skip to content

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:

  1. Customer Auth — authentication, number rewriting, tag action applied from Customer Auth record.
  2. Customer Auth Numberlists (DST, then SRC) — additional tag actions may be applied at numberlist/item level.
  3. Area detection — source and destination areas are resolved by looking up src_prefix_routing and dst_prefix_routing in the Area prefixes table.
  4. Routing Tag Detection Rules — the best matching rule is selected and its tag action is applied to the current tag set.
  5. The final routing_tag_ids are 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_id is NULL or matches the detected source area.
  • dst_area_id is NULL or matches the detected destination area.
  • src_prefix matches the beginning of the source routing number (empty prefix matches any number).
  • dst_prefix matches the beginning of the destination routing number (empty prefix matches any number).
  • Current call tags satisfy the routing_tag_ids / routing_tag_mode_id condition (see Routing tag ids below). An empty routing_tag_ids set always matches.

When multiple rules match, priority is determined by:

  1. Best tag_compare score (most specific tag match).
  2. Longest src_prefix match.
  3. Longest dst_prefix match.
  4. 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