SOLVED

Teams Direct Routing Dial Plan Creation

Brass 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
best response confirmed by Chris Krafcky (Brass Contributor)
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. 

1 best response

Accepted Solutions
best response confirmed by Chris Krafcky (Brass Contributor)
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. 

View solution in original post