Microsoft Teams Direct Routing Trunk Translations allow you to manipulate caller and called numbers at a per-trunk level. This is most useful when you are not using your own SBC.
Some examples:
- You use an ‘ext=xxxx’ number format and the PSTN requires you to remove it
- The PSTN may require a specific number format e.g. in localised format without the country code
- You may wish to translate all caller line ID’s to the office number (currently the native Caller ID policy doesn’t support Direct Routing numbers so this could be a workaround)
You need to be careful when adding or changing Trunk Translations because they are applied at the gateway trunk level. If you get something horribly wrong, you may break calling in and out of your business. Please be mindful of this.
Script
To make things a little easier I have created a script which you can download over on GitHub.
The script supports the following:
- New-TeamsTrunkTranslation – Adds a new translation rule to the specified Microsoft Teams PSTN gateway
- Remove-TeamsTrunkTranslation – Removes an existing translation rule applied to Microsoft Teams PSTN gateways by type
- Get-TeamsTrunkTranslations – Gets translation rules applied to Microsoft Teams PSTN gateways by type
-
Export-TeamsTrunkTranslations – Exports translation rules applied to Microsoft Teams PSTN gateways
Related Resources
Is it possible to change the caller number when calling outbound
Yep sure can. You can change the caller and the called ID for both inbound and outbound calls.
Many thanks
Great work, but for some reason script not running
Could you please let me know how to run it correctly?
Can you share more details, and I’ll try and help. Any errors? What happens when you run?
thanks you for your reply
from PS window (while connecting to the Tenant ) im navigating to the Folder path and then type ./ and nothing happens and no errors…
is it help?
When setting the variables inside the script do we put the values between the single or double quotes?
Single or double is fine.
is is possible to change the name display as well?
We didn’t have a PSTNGateway. We use VoicerRoute. Could we use it with this, too?
If you are using Microsoft PSTN access then my script won’t work, nor do I think this scenario is supported. What are you trying to achieve?
I am in the same boat. There are no registered PSTNgateways in our direct route set up, only voiceroutes. I am trying to set up so that all outgoing calls appear to come from the number that is assigned to a CQ or AA.
Are you using Microsoft Calling Plans? If so, this should work – https://docs.microsoft.com/en-us/microsoftteams/caller-id-policies#:~:text=%20Manage%20caller%20ID%20policies%20in%20Microsoft%20Teams,to%20users,…%204%20Related%20topics.%20%20More
If not, call on behalf of an Auto Attendant or Queue is coming so that might help. It may have been released I just can find the reference!
What is the difference between this TeamsTrunkTranslation and OutbountTeamsTranslationRule ? and how they are different from normalization within the dial plan ?
This also confused me 🙂 OutbountTeamsTranslationRule covers outgoing calls vs TeamsTrunkTranslation covers incoming calls. They are different because they are applied at the trunk level so different rules can apply to each. Hope that helps.