SIP Trunk Routing by DID

Incoming SIP calls are addressed to a SIP username, commonly a Direct Inward Dialing (DID) telephone number. MBG can be configured to map the username (or portion of the username) to a specific ICP (MiVoice Business, MiVoice Office 250, MiVoice MX-One or MiVoice Office 400). Usernames can be obtained from URLs found in the "Request", "From", and "To" header fields of incoming SIP messages.   

Example

A central data center (CenData) has three geographically remote locations that each have one ICP.

CenData programs their MBG server to perform call routing based on the called number, caller number and original target number:

 

Using MBG Routing Rule configuration, calls for SIP usernames that begin with 613 or from SIP usernames that begin with 819 are routed to ICP1 in Ottawa. Calls for SIP usernames that begin with 604 are routed to ICP2 in New York, and calls for SIP usernames that begin with 212 are routed to ICP3 in Vancouver. Calls that do not match any of the first four rules will use rule 5 which directs all non-matching calls to ICP4. There is no secondary ICP for this rule.

Managing DID Routing Rules for a SIP Trunk

Adding a Rule

You can add DID routing rules at the same time that you create a new SIP trunk, or you can add them to existing trunks.

To add a DID routing rule:

  1. On the MBG main page, click the Service Configuration tab and then click SIP trunking.

  2. In the trunk list, click to modify an existing trunk or to add a new trunk.

  3. In the lower section of the screen, locate the place where you wish to add the new rule. Use the following tools to sort through the list:

Note: If the SIP Trunk does not yet have any rules, a single unprogrammed rule will be listed by default.

  1. To add the new rule, click beside an existing rule. A new rule will be added directly below the existing rule.  

  2. Specify the rule parameters:

  1. After you have specified the rule parameters, you can do the following:

  1. Click Save.

Editing a Rule

You can move a DID routing rule forward or backward in order to adjust its precedence in the list. You can also modify the rule parameters or delete it altogether.

To edit a DID routing rule:

  1. On the MBG main page, click the Service Configuration tab and then click SIP trunking.

  2. In the trunk list, locate the trunk you wish to edit and click .

  3. In the lower section of the screen, use the following tools to sort through the list of rules:

  1. After locating the rule you wish to edit, you can do the following:

  1. Click Save.

Rule Format

The routing rule format is a case-sensitive string of 0-9, +, -, _, *, N, or X characters. In effect, you are programming a "mask" to apply to the username in the SIP request to check for a match. If the SIP request is successfully matched with a routing rule, the call follows the corresponding ICP routing. SIP requests with unsuccessful matches continue through the list of rules until a match is found.

Pattern matching is exact. The rule and the dialed number must be the same length and each character in the dialed number must match the character in the rule. (For example, 6135925660" does not match "613 5925660" or "613-592-5660".) An "X" in the pattern will match any single character at that position in the dialed number. An "N" will match any single character at that position from 2-9.

Rule Characters  

Rule Examples