With Teams Direct Routing and Microsoft UC in general, there is no 4 digits extension or 3 digits extension by default. However, all organization usually used to using a 3 or 4 digits extension assigned to each user. Especially the ones that got migrated from another telephony systems to Teams Direct Routing.
In this article, I will show how to support these short digits extension with Teams Direct Routing. This is achieved by adding a Normalization Rule to the Dial Plan that is used by the user. This rule will transform the 3 or 4 digits the user is dialing to a full E.164 format that matches the usual format of the LineURI for user.
This will work because the 3 or 4 digits extension number is usually the last part of the DID number.
Creating a New Dial Plan
In case you don’t have a dial plan ready to have the normalization rule, you need to create a new dial plan as follows:
New-CsTenantDialPlan -Identity JaysLab -Description “Dial Plan for Jay’s Lab” -SimpleName “JaysLab”

Creating a New Voice Normalization Rule
This is the Normalization Rule that will change the 4 digits that a user dials to a E.164 format. The rule adds the leading common digits of the LineURI of the users (proceeded by +). In my case, the leading digits are +1712458
$4_digits_Extension=New-CsVoiceNormalizationRule -Parent Global -Description ‘4 digits Extension’ -Pattern ‘^(\d{4})$’ -Translation ‘+1712458$1’ -Name ‘4 digits Extension’ -IsInternalExtension $false -InMemory

Adding the New Normalization Rule to the Dial Plan
The created Normalization Rule above needs to be added to the Dial Plan. This Dial Plan could be a newly created one. Or it could be an existing one that is already assigned to users. The below shows adding the Normalization Rule to the Dial Plan that was created earlier in this article
Set-CsTenantDialPlan -Identity JaysLab -NormalizationRules @{add=$4_digits_Extension}

Assigning the Dial Plan to a user
The below shows adding assigning the Dial Plan to a user. No need to do this in case the Dial Plan was already assigned to the user.
Grant-CsTenantDialPlan -Identity User2@jayslab.online -PolicyName JaysLab

Dialing 4 Digits Number (Extension)
This is the test part. The below image show dialing the 4 digits extension

After a few moments Teams will automatically find the user that has that full number, and you can click on it and select it

The below image shows the user is selected and ready to be called

You can even see the details of that user by hover the mouse over the username before dialing as the image below shows

You can click the “Call” button to call that user. The following image shows the established call with the user (it looks exactly similar if you have called that user without dialing the 4 digits)
Alternatively, you can dial the 4 digits number and click on the “Call” button without selecting the user. This is useful if you are sure of the extension number and you want to call it directly.

If you call the user directly, the full E.164 number will be shows at the top the call while in the middle it will show that you are calling the user as the image below shows

User 1 which is the called one, the call pop up appears as any normal call

