Dial Plan Normalization Rule Details
Table of Contents
How Dial Plan Rules Work Options for Matching Longer Dial-Strings Updating the RuleDial Plan Normalization Rules provide a means to control or modify Microsoft Teams' default behaviour regarding dial-string manipulation on outbound calls.
How Dial Plan Rules Work
Microsoft's default behaviour is to convert any dialled number into something that looks like E.164 (+CCnnnnn, where CC is the country code associated with the Location of the user making the call) unless there is a Dial Plan Normalization Rule that matches the dialled number. In other words, Microsoft puts the +1 (or +CC) prefix only after no other rules match. If a rule matches, the dial string is manipulated according to the rule.
The default normalization rule installed as part of the Direct Routing setup will match anything up to 7 characters and is intended to match feature codes (like *69) and extensions and pass these through exactly as dialled. This rule looks like this:
^([0-9*#+]{1,7})$
Note that:
- We only install one rule, and once the rule is installed, any modifications must be performed via the Teams Admin Center (see below)
- The rule must always have a capture (the part between the parentheses), and the transformation we perform is simply $1 (which just passes through the first capture)
Options for Matching Longer Dial-Strings
This default rule does not match longer dial strings, which means that Microsoft will convert outbound calls to longer numbers in E.164 format. However, many PBXs are unhappy when presented with a +CC prefix.
Here are some options to enable the passthrough of dial strings:
Rule | Explanation |
---|---|
^([0-9*#+]{1,15})$ |
This is the same as the original rule, but with the '7' changed to '15'. This will allow numbers like 2345678901 to be sent exactly as dialed (instead of being prefixed by +1). Similarly, international numbers dialed with 011nnnnnnnnnnn will be passed through directly to the PBX. |
^\+?([*#\d]{1,20})$ |
This slightly more complicated rule does the following:
As an example, +12345678901 would be transformed to 12345678901 and passed to the PBX. But if the user had dialed 12345678901 this would also match and would be passed through as-is. |
Updating the Rule
If you are using the Branded Dial Plan to set up a new Enterprise customer, see Dial Plan Customization for how to do this.
If you need to update the Normalization Rule for an existing Enterprise customer, a Teams administrator or global admin for the tenant must do this in the Teams Admin Center.
First, find the correct Dial Plan. These are found under the Voice > Dial Plans section. The dial plan to select may be the Global dial plan or a custom dial plan installed during Enterprise setup; in that case, the dial plan will be named based on the settings in the Dial Plan Customization page mentioned above.
Second, edit the rule. There should only be one rule—if there are no rules, see below. If there is more than one rule, contact support.
If there is a rule, you can edit it and replace the If Condition part with the new rule. Make sure the rule looks EXACTLY like what you see above; if you cut/paste, you may get formatting characters or other junk that will completely break your calling.
If you need to create a rule:
- Name it whatever you want
- Select Advanced (not Basic)
- Enter the If Condition exactly as noted above
- Enter
$1
in the Then Do This section - Do not bother testing -- it is totally broken.
Whether modifying an existing rule or adding a new one, you must
- SAVE the RULE.
- SAVE the DIALPLAN.
NOTE: Dial Plan changes will take 4 hours, and possibly longer, to propagate and become effective.
An example of what the Rule Entry screen looks like: