Microsoft Teams and Extension Dialing

Over the last few months, I’ve been working a few separate Direct Routing projects where customers have been moving away from Skype for Business and into Microsoft Teams.  Also, in their environments are 3rd party PBX systems like Cisco and Avaya where some users are still homed.  As we’ve seen over the years, those legacy systems have been configured in a way where everyone shares a main number with internal, private extensions.  As Skype for Business was introduced in those environments, that same numbering plan and dialing habits traditionally made its way into Skype as well so we had to use the format +1xxxxxxxxxx;ext=xxxxxx with the last six “x’s” as the extension.

When Skype Online CloudPBX with PSTN Calling Plans and then Teams Phone System with PSTN Calling Plans came along, that Main Number, Extension only method was quickly thrown out as the system does not support such methods.  Then came along Direct Routing, and the same situation applied, where extension only dialing did not work.  That presented challenges in trying to conform to E.164 Dial Plans, we had to stop using the format +1xxxxxxxxxx;ext=xxxxxx.   We as engineers had to resort to re-introducing bad habits where we had to assign short numbers to users and normalizing our calls to short extension only.  That goes against everything we’ve been taught by Microsoft over the last 8 years or so to normalize everything to unique E.164 phone numbers for users.  So, in summary, it was incredibly frustrating in those regards when deploying Microsoft Teams Enterprise Voice.

Fast forward to a few months ago when Microsoft quietly dropped in their Teams Version of “Skype for Business Trunk Translations”.  This allows Teams Voice Engineers to manipulate incoming and outgoing Phone Numbers at the integration point to the SBC.  This does a couple things of incredible value to Engineers and Support services when an organization does not have DIDs for all users and must integrate with a phone system where users use extension only.

1.) It allows most of the number manipulations to be completely owned in the Teams Ecosystem and allows SBCs to have minimal configurations.  So, essentially, a single point of voice administration for the most part

2.) It gives us the ability to use extension only dialing….  So we welcome back the +1xxxxxxxxxx;ext=xxxxxx phone number format in Teams.

 

So whoa, mind blowing, correct?  How does it work, you might ask?

We leverage “TeamsTranslationRules” and assign them to the SBC gateway in Teams.  Whats nice about how Microsoft designed this in Teams is they itemized the translations.  We clearly get to see and manipulate all 4 URIs in Teams.  Meaning we get to mess around with numbers in the following 4 scenarios;

  • Calling Number outbound to PSTN
  • Called Number outbound to PSTN
  • Calling Number inbound to Teams
  • Called Number inbound to Teams.

To read more about those rules, head over here to look them over https://docs.microsoft.com/en-us/microsoftteams/direct-routing-translate-numbers

So, back to actually sending main number extensions only.  In summary, this is how it works

  • Assign users a LineURI with main number and extension only
    • +1xxxxxxxxxx;ext=xxxxxx
  • Create Dial Plans to normalize to to the main number, extension method.  Use the GUI or PowerShell

  • User TeamsTranslationRules to strip the +1xxxxxxxxxx;ext= and send only 6 digits when you need to send to a PBX with an extension only
    • New-csteamstranslationrule -id Location-RemoveExt -Pattern ‘^\+1xxxxxx\d{4};ext=(26\d{4})$’ -Translation ‘$1’       (***The numbers in this rule, is from another environment, so it doesn’t match the example, but you get the idea)
  • Do the same for any inbound manipulations to match an extension only Teams User sent from a PBX

How it looks in the client

There you have it, extension dialing back in Teams Direct Routing

 

A couple notes

  • This is not supported with calling plans.  You must assign DIDs
  • TeamsTranslationRules per Gateway in the tenant are limited to a total of 100 normalization rules across all 4 scenarios
Senior Cloud Consultant and Teams Voice Lead