Transform outbound addresses with regular expressions
External trunk configuration
You can use regular expressions to transform the number sent on an outbound call. The normal practice is to enter the same expressions in both the Calling and Called fields. The reason being that you’re formatting the numbers to meet the requirements of your carrier. So, for example, if your carrier requires numbers in E.164 format, you would use the regular expression to force both numbers to be in E.164 format.
As you make these configuration settings, keep in mind the following points:
- These settings apply to outbound ONLY and the are actually sub-settings under the Outbound section of the Trunk configuration.
- The Calling address is the number that is calling.
- The Called address is the number that was called.
For more information, see Examples of regular expression for external trunk number transformation. In addition to our examples, you can investigate the Regular Expressions 101 website.
To configure a regular expression
- Click Admin.
- Under Telephony, click Trunks.
- Click the External Trunks tab.
- From the list, select the trunk you want to configure.
- Click Identity.
- Under Outbound > Calling:
- In the Match Regular Expression field enter the regular expression pattern you want to match.
- In the Format Regular Expression field enter the regular expression format form you want your output to take.
- Click Plus to add the regular expressions to the list.
- If you want to specify the number of trailing digits of the outgoing address that will be sent, enter that number in the Address Digits Length field.
- If you want to exclude the + prefix of the outgoing address that will be sent, leave the Address Omit + Prefix switch set to Enabled.
- Under Outbound > Called:
- In the Match Regular Expression field enter the regular expression pattern you want to match.
- In the Format Regular Expression field enter the regular expression format form you want your output to take.
- Click Plus to add the regular expressions to the list.
- If you want to specify the number of trailing digits of the outgoing address that will be sent, enter that number in the Address Digits Length field.
- If you want to exclude the + prefix of the outgoing address that will be sent, leave the Address Omit + Prefix switch set to Enabled.
- Click Save External Trunk.