SOLVED
Home

Teams Direct Routing Dial Plan Creation

%3CLINGO-SUB%20id%3D%22lingo-sub-725274%22%20slang%3D%22en-US%22%3ETeams%20Direct%20Routing%20Dial%20Plan%20Creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-725274%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20in%20the%20process%20of%20creating%20the%20necessary%20dialplans%20for%20a%20Teams%20Direct%20Routing%20pilot%20that%20we'll%20be%20starting%20shortly.%26nbsp%3B%20I'm%20trying%20to%20find%20the%20most%20efficient%20way%20to%20create%20the%20necessary%20diaplans%20to%20enable%20users%20to%20dial%20each%20other%20by%204%20digit%20extension.%26nbsp%3B%20We%20have%205%20domestic%20locations%20with%20a%20varying%20set%20of%20DID(s)%20as%20well%20as%201%20location%20located%20in%20Paris.%26nbsp%3B%20I've%20been%20looking%20for%20ways%20to%20test%20my%20'logic'%20prior%20to%20pulling%20the%20trigger%20in%20Powershell%2C%20but%20can't%20seem%20to%20find%20what%20I'm%20looking%20for.%26nbsp%3B%20Any%20assistance%20would%20be%20greatly%20appreciated.%20I've%20provided%20a%20sampling%20of%20what%20I've%20started%20below.%3C%2FP%3E%3CP%3E%24nr1%20%3D%20New-CsVoiceNormalizationRule%20-Identity%20HHR-US%2FNR1%20-Description%20%22Extensions%2046XX%22%20-Pattern%20'%5E(4%5Cd%7B3%7D)%24'%20-Translation%20'%2B1202721%241'%20-InMemory%3CBR%20%2F%3E%24nr2%20%3D%20New-CsVoiceNormalizationRule%20-Identity%20HHR-US%2FNR2%20-Description%20%22Extensions%2047XX%22%20-Pattern%20'%5E(4%5Cd%7B3%7D)%24'%20-Translation%20'%2B1202721%241'%20-InMemory%3CBR%20%2F%3E%24nr3%20%3D%20New-CsVoiceNormalizationRule%20-Identity%20HHR-US%2FNR3%20-Description%20%22Extensions%2049XX%22%20-Pattern%20'%5E(4%5Cd%7B3%7D)%24'%20-Translation%20'%2B1202741%241'%20-InMemory%3CBR%20%2F%3E%24nr4%20%3D%20New-CsVoiceNormalizationRule%20-Identity%20HHR-US%2FNR4%20-Description%20%22Extensions%206XXX%22%20-Pattern%20'%5E(6%5Cd%7B3%7D)%24'%20-Translation%20'%2B1212837%241'%20-InMemory%3CBR%20%2F%3E%24nr5%20%3D%20New-CsVoiceNormalizationRule%20-Identity%20HHR-US%2FNR5%20-Description%20%22Extensions%2016XX%22%20-Pattern%20'%5E(1%5Cd%7B3%7D)%24'%20-Translation%20'%2B1213330%241'%20-InMemory%3CBR%20%2F%3E%24nr6%20%3D%20New-CsVoiceNormalizationRule%20-Identity%20HHR-US%2FNR6%20-Description%20%22Extensions%203XXX%22%20-Pattern%20'%5E(3%5Cd%7B3%7D)%24'%20-Translation%20'%2B1213330%241'%20-InMemory%3CBR%20%2F%3E%24nr7%20%3D%20New-CsVoiceNormalizationRule%20-Identity%20HHR-US%2FNR7%20-Description%20%22Extensions%202XXX%22%20-Pattern%20'%5E(2%5Cd%7B3%7D)%24'%20-Translation%20'%2B1213613%241'%20-InMemory%3CBR%20%2F%3E%24nr8%20%3D%20New-CsVoiceNormalizationRule%20-Identity%20HHR-US%2FNR8%20-Description%20%22Extensions%2056XX%22%20-Pattern%20'%5E(5%5Cd%7B3%7D)%24'%20-Translation%20'%2B1213330%241'%20-InMemory%3CBR%20%2F%3E%3CBR%20%2F%3ENew-CsTenantDialPlan%20-Identity%20HHR-US%20-NormalizationRules%20%40%7BAdd%3D%24nr1%2C%24nr2%2C%24nr3%2C%24nr4%2C%24nr5%2C%24nr6%2C%24nr7%2C%24nr8%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20test%20this%20via%20Powershell%2C%20it%20isn't%20using%20the%20correct%20normalization%20rule.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGet-CsEffectiveTenantDialPlan%20-Identity%20chris.krafcky%40hugheshubbard.com%20%7C%20Test-CsEffectiveTenantDialPl%3CBR%20%2F%3Ean%20-DialedNumber%204950%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ERunspaceId%20%3A%20f74f99f5-e04b-4955-935f-0dc09afc2281%3CBR%20%2F%3ETranslatedNumber%20%3A%20%2B12027214950%3CBR%20%2F%3EMatchingRule%20%3A%20Description%3DExtensions%3CBR%20%2F%3E46XX%3BPattern%3D%5E(4%5Cd%7B3%7D)%24%3BTranslation%3D%2B1202721%241%3BName%3DNR1%3BIsInternalExtension%3DFalse%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPS%20C%3A%5CPowershell%26gt%3B%20Get-CsEffectiveTenantDialPlan%20-Identity%20chris.krafcky%40hugheshubbard.com%20%7C%20Test-CsEffectiveTenantDialPlan%20-DialedNumber%204751%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ERunspaceId%20%3A%20f74f99f5-e04b-4955-935f-0dc09afc2281%3CBR%20%2F%3ETranslatedNumber%20%3A%20%2B12027214751%3CBR%20%2F%3EMatchingRule%20%3A%20Description%3DExtensions%3CBR%20%2F%3E46XX%3BPattern%3D%5E(4%5Cd%7B3%7D)%24%3BTranslation%3D%2B1202721%241%3BName%3DNR1%3BIsInternalExtension%3DFalse%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-725274%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHow-to%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-728086%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Direct%20Routing%20Dial%20Plan%20Creation%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-728086%22%20slang%3D%22en-US%22%3E%3CP%3EI%20figured%20it%20out.%26nbsp%3B%20For%20those%20who%20are%20interested.%26nbsp%3B%20Here%20are%20the%20steps.%26nbsp%3B%20I%20hope%20this%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20Navigate%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.ucdialplans.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.ucdialplans.com%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E2.%20Scroll%20down%20to%20'Number%20Range%20Regex%20Calculator'%3C%2FP%3E%3CP%3E3.%20Input%20your%20extension%20ranges%3C%2FP%3E%3CP%3E4.%20Add%20output%20of%20calculated%20regex%20to%20your%20Powershell%20script.%3C%2FP%3E%3CP%3E5.%20Enjoy.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

I'm in the process of creating the necessary dialplans for a Teams Direct Routing pilot that we'll be starting shortly.  I'm trying to find the most efficient way to create the necessary diaplans to enable users to dial each other by 4 digit extension.  We have 5 domestic locations with a varying set of DID(s) as well as 1 location located in Paris.  I've been looking for ways to test my 'logic' prior to pulling the trigger in Powershell, but can't seem to find what I'm looking for.  Any assistance would be greatly appreciated. I've provided a sampling of what I've started below.

$nr1 = New-CsVoiceNormalizationRule -Identity HHR-US/NR1 -Description "Extensions 46XX" -Pattern '^(4\d{3})$' -Translation '+1202721$1' -InMemory
$nr2 = New-CsVoiceNormalizationRule -Identity HHR-US/NR2 -Description "Extensions 47XX" -Pattern '^(4\d{3})$' -Translation '+1202721$1' -InMemory
$nr3 = New-CsVoiceNormalizationRule -Identity HHR-US/NR3 -Description "Extensions 49XX" -Pattern '^(4\d{3})$' -Translation '+1202741$1' -InMemory
$nr4 = New-CsVoiceNormalizationRule -Identity HHR-US/NR4 -Description "Extensions 6XXX" -Pattern '^(6\d{3})$' -Translation '+1212837$1' -InMemory
$nr5 = New-CsVoiceNormalizationRule -Identity HHR-US/NR5 -Description "Extensions 16XX" -Pattern '^(1\d{3})$' -Translation '+1213330$1' -InMemory
$nr6 = New-CsVoiceNormalizationRule -Identity HHR-US/NR6 -Description "Extensions 3XXX" -Pattern '^(3\d{3})$' -Translation '+1213330$1' -InMemory
$nr7 = New-CsVoiceNormalizationRule -Identity HHR-US/NR7 -Description "Extensions 2XXX" -Pattern '^(2\d{3})$' -Translation '+1213613$1' -InMemory
$nr8 = New-CsVoiceNormalizationRule -Identity HHR-US/NR8 -Description "Extensions 56XX" -Pattern '^(5\d{3})$' -Translation '+1213330$1' -InMemory

New-CsTenantDialPlan -Identity HHR-US -NormalizationRules @{Add=$nr1,$nr2,$nr3,$nr4,$nr5,$nr6,$nr7,$nr8}

 

When I test this via Powershell, it isn't using the correct normalization rule.

 

Get-CsEffectiveTenantDialPlan -Identity chris.krafcky@hugheshubbard.com | Test-CsEffectiveTenantDialPl
an -DialedNumber 4950


RunspaceId : f74f99f5-e04b-4955-935f-0dc09afc2281
TranslatedNumber : +12027214950
MatchingRule : Description=Extensions
46XX;Pattern=^(4\d{3})$;Translation=+1202721$1;Name=NR1;IsInternalExtension=False

 

PS C:\Powershell> Get-CsEffectiveTenantDialPlan -Identity chris.krafcky@hugheshubbard.com | Test-CsEffectiveTenantDialPlan -DialedNumber 4751


RunspaceId : f74f99f5-e04b-4955-935f-0dc09afc2281
TranslatedNumber : +12027214751
MatchingRule : Description=Extensions
46XX;Pattern=^(4\d{3})$;Translation=+1202721$1;Name=NR1;IsInternalExtension=False

 

1 Reply
Highlighted
Solution

I figured it out.  For those who are interested.  Here are the steps.  I hope this helps.

 

1. Navigate to https://www.ucdialplans.com/

2. Scroll down to 'Number Range Regex Calculator'

3. Input your extension ranges

4. Add output of calculated regex to your Powershell script.

5. Enjoy. 

Related Conversations
Change Calendar in Teams
jonasbayer in Microsoft Teams on
2 Replies
How to sync a SharePoint Web Part with Teams?
vcima in SharePoint Developer on
1 Replies
lancer Teams et créer un compte
contactfougeirolfr in Microsoft Teams on
1 Replies
Microsoft Teams delay in set up
Uy1234 in Microsoft Teams on
2 Replies
Teams 1.3.00.4461 version
Mike Kruzel in Microsoft Teams on
5 Replies