Microsoft Teams dial pad does not show extension number for Direct Routing user

Matt Ellis
365 UC
Published in
4 min readOct 13, 2022

I recently embarked on a project to migrate a crap-ton of people from Cisco Call Manager to Microsoft Teams Phone. The Cisco environment didn’t utilise DID/DDI numbers that much, so the vast majority of people shared a central office number which went to an operator or auto-attendant and then had extension numbers so they could be reached.

These extension numbers were widely used so we needed to keep them around until we could look at phase 2 and give everyone a DID/DDI.

Usage of extension numbers in Teams is written about in few places on the Internet (here, here, here and here), but in essence you need to set it in two places for everything to work correctly.

The telephoneNumber attribute in AD/AAD

This is used for:

  1. Adding the extension number in this attribute will allow you to be reached from an auto-attendant using “dial by extension”. You may need to wait 8 hours or more after updating this attribute before it actually works.
  2. Reverse number lookup (RNL) for the caller’s display name in Teams calling notifications
  3. Drop-down call menu in Chat to select a phone number
  4. RNL to find the in-tenant user when entering the number in the dial pad

The LineURI in Teams. This is used for the following:

  1. The phone number displayed under the dial pad in the Calls app (more below)
  2. RNL for inbound calls from PSTN to find the Teams user to route the call to
  3. RNL for outbound calls to check if phone number is for in-tenant user. If found a 1:1 Teams call is performed instead of routing to PSTN

So, back to my original issue. I had set the extension number on people’s account (in both places), but it wasn’t showing on the dial pad in the Calls app. As an example:

telephoneNumber: +1514XXX8666;ext=654321
LineURI: tel:+1514XXX8666;ext=654321

This is what the dial pad gave me (no good):

At this point I got some help from Carolyn Blanding at Microsoft. She was very helpful and directed me towards a log file which told me why this was happening.

In case you don’t know, you can get log files from the Teams web or desktop client by hitting Ctrl+Shift+Alt+1 when in the Teams client. The log files will automatically be downloaded to your Downloads folder.

The file you’re looking for is called experience_renderer and will have a name similar to this:

MSTeams Diagnostics Log 10_12_2022__7_11_46_PM_experience_renderer.log

I searched for a few characters from my phone number and I found the following line:

2022-10-12T18:07:22.009Z Inf CID[main] PhoneNumberRenderer: [normalize] [+1514XXX8666;ext=654321] was normalized into [+1514XXX8666] using rule 3 of 6: ruleExpression=[/^(?:\+|011)(1|7|2[07]|3[0-46]|39\d|4[013-9]|5[1-8]|6[0-6]|8[1246]|9[0-58]|2[1235689]\d|24[013-9]|242\d|3[578]\d|42\d|5[09]\d|6[789]\d|8[035789]\d|9[679]\d)(?:0)?(\d{6,14})(\D+\d+)?$/] translation=[+$1$2] isInternalExtension=[undefined].

This is telling me that my phone number (+1514XXX8666;ext=654321) is being processed against a normalization rule which is changing it to +1514XXX8666. This is why it’s only showing as +1514XXX8666 under my dial pad. That normalization rule is actually a rule from the dial plan assigned to this user.

At this point, I started to wonder why only I was seeing this and why it worked for others. This led me to the built-in dial plans provided by Microsoft. I did a Get-CsDialPlan and found the following normalization in their US dial plan:

This is the normalization rule used by the Calls app when rendering the user’s phone number under the dial pad. This rule exists in every dial plan included by Microsoft.

So, I added this rule into my own dial plan and hey presto, it worked (after a few Microsoft-minutes):

Pattern: ^((\+)?(\d+))(;)?(ext|extn|EXT|EXTN|x|X)(=)?(\d+)$
Translation: $1;ext=$7

So, if you use Direct Routing and you’ve made your own dial plans (or used Ken Lasko’s https://www.ucdialplans.com/ like a sensible person) and you’re wanting to use extension numbers, you’ll need a normalization rule to make it render right in the Calls app.

Having said that, Carolyn at Microsoft tells me the calling team will be removing logic to normalise the LineURI at some point in the future and will just format the number based on regional number formatting. So, hopefully this is a short-lived issue.

Thanks!

UPDATE (17/10/22): Ken Lasko reached out to me and has said he’s thinking of rolling this translation into the international normalisation rule configured using ucdialplans.com. I will update here if I get any more info.

--

--

Matt Ellis
365 UC
Editor for

Unified Communications guy, Pompey fan, burger eater, coffee drinker...