Forum Discussion
Teams Phone System - Remove Country Code?
- Dec 30, 2020
Totally agree to StevenC365 and LinusCansby , you should use E.164 number formating for your Teams Phone system implementation. It makes so many things easier for your users and also the PSTN provider. Normaly your personal contacts are synced with your mobile device, for example. When your users traveling to another country and phone numbers are stored in E.164 format, there is no need to change anything on the cell phone. The user can dial directly because the phone number includes the leading country code and so on.
On the other hand, from my understanding, it is possible to do number translation with Teams Direct Routing. You can create translation rules for your SBC system and assign them to the SBC. In this case the Teams platform can modify inbound/outbound phone number according to a given ruleset. More details:
Translate phone numbers for Direct Routing - Microsoft Teams | Microsoft Docs
Also it is not required to use E.164 number formating. It is suggested by Microsoft and as you can read, our experience and suggestion is the same. But it is not required anymore:
=> It's recommended, but not required, that the phone number used is configured as a full E.164 phone number with country code.
In case you still want it, you can utilize InboundTeamsNumberTranslationRules and InboundPstnNumberTranslationRules. First, create the rule that you want to apply to both, with something like this:
New-CsTeamsTranslationRule -Identity 'Remove+44' -Pattern '^\+44(\d+)$' -Translation '0$1'
Then apply the rule:
Set-CsOnlinePSTNGateway -Identity sbc.domain.tld -InboundPstnNumberTranslationRules Remove+44
Set-CsOnlinePSTNGateway -Identity sbc.domain.tld -InboundTeamsNumberTranslationRules Remove+44
wait for some minutes for the commands to take effects (it can vary). And you should get what you want.
But then again, please consider what StevenC365 , LinusCansby and Thorsten Pickhan suggest.
Regards