In This Article


Overview

NOTE

In the previous step, you should have added/verified 2 routing domains to your tenant, and created 2 user/service accounts.  If not, you are not ready to configure direct routing.

Evolve IP uses Microsoft's multi-tenant (carrier) model for direct routing.  This type of configuration requires the use of PowerShell commands – it cannot be created in the Teams admin center.  However, after the configuration has been completed you will be able to view and manage the voice routes in the Teams admin center, but there will be no SBCs listed.

In the US, Evolve IP has two primary datacenters for its voice infrastructure.  One in Las Vegas for users located in the west, and one in Philadelphia for users located in the east.  When configuring your voice routes in Office 365, you will want to make one of the two locations a primary route and the other a secondary route.  For example:

  • Users located on the east coast would use the Philadelphia (east) voice infrastructure for their primary route, and the Las Vegas (west) voice infrastructure for their secondary route.
  • Users located on the west coast would use the Las Vegas (west) voice infrastructure for their primary route, and the Philadelphia (east) voice infrastructure for their secondary route.
  • For users located in the middle of the US, you will need to choose a primary/secondary combination that best works for their location.  We recommend using the Mississippi River as a dividing line between east and west.

For our EU locations, Evolve IP has datacenters available in Amsterdam and Delft in the Netherlands.  These datacenters offer the same redundant infrastructure and we will advise you on the optimal primary route upon delivery of your unique domains.


The above means you will have the following configured for direct routing to Evolve IP:

  • Qty (2) PSTN Usage objects - These objects are used to link voice routes with voice routing policies.  You will have one PSTN Usage object for the east route & policy, and one for the west route & policy.
  • Qty (2) Voice Routes - A voice route for the west (Las Vegas), and a voice route for the east (Philadelphia).
  • Qty (2) Voice Routing Policies - One assigned to users located in the west, and one assigned to users in the east.

NOTE

If your users are all in the same location, then you would assign all of them to the same voice routing policy (US East, US West, or one of our EU datacenters).  However, this doesn't mean you should only create a routing configuration for a single location.  We recommend creating both routing configurations (for both datacenters in your region) in case you need to switch your users over to another location, even if it's temporary.



Naming Conventions

Every organization has its own naming conventions, and Evolve IP is no different.  The steps in this article use our naming conventions, and we strongly suggest you use them for two important reasons:

  • If you need to get support from Evolve IP, our support teams will have no problem identifying, verifying, and if needed, troubleshooting your direct routing configuration.
  • If sometime in the future you decide to use Evolve IP for managing your direct routing configuration and user provisioning, we can easily slip into that role.

If you choose to use your own naming conventions, that's totally fine.  We understand.



Steps to Configure Teams Direct Routing

IMPORTANT 

The configuration steps in this article assume that your Teams users configured for direct routing will have all of their calls routed from Office 365 to the Evolve IP voice infrastructure.  This includes extension dialing and feature access code dialing (#NN, *NN).  This configuration will not affect users configured with a Microsoft calling plan, or configured to use another 3rd party carrier.

Additionally, you will not be creating any PSTN Gateways (SBCs).  Evolve IP uses Microsoft's multi-tenant (carrier) model for direct routing, which allows your direct routing configuration to get its PSTN Gateway (SBC) settings from the Evolve IP "Carrier" Office 365 tenant.

1. Connect to the Microsoft Teams Services

Connect to your Microsoft Teams services using PowerShell.  If needed, review the Teams Direct Routing - 01 - Planning and Prerequisites article for configuration details.

Connect-MicrosoftTeams

2. Create the PSTN Usage Objects

A PSTN Usage object links a voice routing policy to one or more voice routes.  It doesn't do anything else, and there is no configuration associated with this object.  The Set-CsOnlinePstnUsage command is used to add/remove usages to/from the usage list. The usage list is global so it can be used by policies and routes throughout your environment.

The below creates a PSTN usage object for both the Evolve IP voice infrastructures in your region.


Use the Below PowerShell Code Based On Your Region


# Define the PSTN Usage names, which are used throughout the configuration steps
$PstnUsageEast = "EvolveIP-AllCalls-USEast"
$PstnUsageWest = "EvolveIP-AllCalls-USWest"

################################
### PSTN Usage Configuration ###
################################

# Add the PSTN Usage names to the global usage list
Set-CsOnlinePstnUsage -Identity "Global" -Usage @{Add="$($PstnUsageEast)"}
Set-CsOnlinePstnUsage -Identity "Global" -Usage @{Add="$($PstnUsageWest)"}

# View the list of PSTN Usage names
Get-CSOnlinePSTNUsage

spacer


# Define the PSTN Usage names, which are used throughout the configuration steps
$PstnUsageNNpeer01 = "EvolveIP-AllCalls-NLNNpeer01"
$PstnUsageNNpeer02 = "EvolveIP-AllCalls-NLNNpeer02"

################################
### PSTN Usage Configuration ###
################################ 

# Add the PSTN Usage names to the global usage list
Set-CsOnlinePstnUsage -Identity "Global" -Usage @{Add="$($PstnUsageNNpeer01)"}
Set-CsOnlinePstnUsage -Identity "Global" -Usage @{Add="$($PstnUsageNNpeer02)"}

# View the list of PSTN Usage names
Get-CSOnlinePSTNUsage

spacer



3. Create the Voice Routes

Voice routes are associated with a PSTN Usage object.  Each voice route is assigned a priority number with the lower number having a higher priority.  Additionally, a voice route includes a number pattern (regular expression) that identifies which phone numbers will be routed through a given voice route.  To route all calls through a voice route, use this expression for the number pattern:  .*

The below PowerShell code creates a voice route and associates it with its respective PSTN usage object.  Because each PSTN usage object is only associated with a single route in this configuration, the priority numbers configured in the voice routes have no affect.

Use the Below PowerShell Code Based On Your Region


In the below PowerShell code, make sure you modify lines 2 & 3 with the domains provided to you by Evolve IP.

### Enter your domains here:
$DomainPHL = "c123456.phl01.us.teams.evolveip.net"
$DomainLAS = "c123456.las01.us.teams.evolveip.net"

#################################
### Voice Route Configuration ###
#################################

# Properties for the US East route to Philadelphia
$VrPropEast = @{
  Identity              = "EvolveIP-VR-USEast"
  OnlinePstnUsages      = $PstnUsageEast
  NumberPattern         = '.*'
  OnlinePstnGatewayList = "$($DomainPHL)"
  Priority              = 1
  Description           = "East voice route to Evolve IP US (PHL)"
}

# Properties for the US West route to Las Vegas
$VrPropWest = @{
  Identity              = "EvolveIP-VR-USWest"
  OnlinePstnUsages      = $PstnUsageWest
  NumberPattern         = '.*'
  OnlinePstnGatewayList = "$($DomainLAS)"
  Priority              = 2
  Description           = "West voice route to Evolve IP US (LAS)"
}

# Create the voice routes
New-CsOnlineVoiceRoute @VrPropEast
New-CsOnlineVoiceRoute @VrPropWest


# View a list of all voice routes and their properties
Get-CsOnlineVoiceRoute

spacer


In the below PowerShell code, make sure you modify lines 2 & 3 with the domains provided to you by Evolve IP.

### Enter your domains here:
$Domain01 = "c123456.nnpeer01.nl.teams.evolveip.eu"
$Domain02 = "c123456.nnpeer02.nl.teams.evolveip.eu"

#################################
### Voice Route Configuration ###
#################################

# Properties for the voice route to Amsterdam
$VrProp01 = @{
  Identity = "EvolveIP-VR-NLNNpeer01"
  OnlinePstnUsages = $PstnUsageNNpeer01
  NumberPattern = '.*'
  OnlinePstnGatewayList = "$($Domain01)"
  Priority = 1
  Description = "NNpeer01 voice route to Evolve IP NL (AMS)"
}

# Properties for the voice route to Delft
$VrProp02 = @{
  Identity = "EvolveIP-VR-NLNNpeer02"
  OnlinePstnUsages = $PstnUsageNNpeer02
  NumberPattern = '.*'
  OnlinePstnGatewayList = "$($Domain02)"
  Priority = 2
  Description = "NNpeer02 voice route to Evolve IP NL (DFT)"
}

# Create the voice routes
New-CsOnlineVoiceRoute @VrProp01
New-CsOnlineVoiceRoute @VrProp02


# View a list of all voice routes and their properties
Get-CsOnlineVoiceRoute

spacer



4. Create the Voice Routing Policies

Voice Routing Policies are linked to voice routes by assigning the routing policy to one or more PSTN Usage objects.  The order of the list of PSTN usage objects in a voice routing policy is important.  The first PSTN usage object will be evaluated first.


Use the Below PowerShell Code Based On Your Region


########################################
### Voice route policy configuration ###
########################################

New-CsOnlineVoiceRoutingPolicy "EvolveIP-USEast" -OnlinePstnUsages "$($PstnUsageEast)","$($PstnUsageWest)" -Description "Voice routing policy to Evolve IP US East"
New-CsOnlineVoiceRoutingPolicy "EvolveIP-USWest" -OnlinePstnUsages "$($PstnUsageWest)","$($PstnUsageEast)" -Description "Voice routing policy to Evolve IP US West"

spacer


########################################
### Voice route policy configuration ###
########################################

New-CsOnlineVoiceRoutingPolicy "EvolveIP-NLNNpeer01" -OnlinePstnUsages "$($PstnUsageNNpeer01)","$($PstnUsageNNpeer02)" -Description "Voice routing policy to Evolve IP NL AMS-DFT"
New-CsOnlineVoiceRoutingPolicy "EvolveIP-NLNNpeer02" -OnlinePstnUsages "$($PstnUsageNNpeer02)","$($PstnUsageNNpeer01)" -Description "Voice routing policy to Evolve IP NL DFT-AMS"

spacer



5. Tenant Dial Plans & Normalization Rules

Microsoft recently added a section to the Teams Admin Center (TAC) that allows you to create tenant dial plans and normalization rules.  Feel free to use the TAC to configure the following steps, but since we are already using PowerShell to configure everything else, we will continue using it for this step too.

For more information on normalization rules and dial plans, check Microsoft's article on Creating and Managing Dial Plans.


Normalization Rules

Normalization rules are regular expressions used to translate one number format to another number format.  For example, you can translate a 4-digit extension number like 1234 to a 10-digit E.164 formatted phone number.

Evolve IP uses Cisco BroadWorks for all voice features, and this includes feature codes using star "*" and pound "#".  Cisco BroadWorks also has its own means of translating and routing N-digit extension numbers.  This makes configuring Microsoft's back-end voice infrastructure very easy.  All we need to do is send any number, no matter the length or the feature code to BroadWorks for interpretation.  If the number or feature code dialed is not supported, BroadWorks will let the user know.

Microsoft applies some default normalization rules based on the user account's assigned usage location.  These rules cannot be changed or disabled.  However, the rules we will create will be processed before the default rules are processed.  If you want to view Microsoft's default rules, run the following PowerShell command with your country code:

Get-CsVoiceNormalizationRule US | FT Name,Priority,Pattern,Translation,Description -auto
Get-CsVoiceNormalizationRule NL | FT Name,Priority,Pattern,Translation,Description -auto


Tenant Dial Plans

Tenant Dial Plans are used to store the normalization rules.  You can use the existing Global Tenant Dial Plan, which will be applied to all users in your organization, or you can create one or more custom Tenant Dial Plans and apply them to individual users.  Since we don't want to affect any existing normalization rules and tenant dial plans, we will create a new tenant dial plan with its own normalization rules.

Use the following PowerShell command to check for existing tenant dial plans, and normalization rules:

Get-CsTenantDialPlan

Here's an example output when there's just the global tenant dial plan and no custom normalization rules.

Identity              : Global
Description :
NormalizationRules : {}
ExternalAccessPrefix :
SimpleName : DefaultTenantDialPlan
OptimizeDeviceDialing : False

If you have normalization rules in your global tenant dial plan, you can use the following command to output just the normalization rules.

(Get-CsTenantDialPlan -Identity Global).NormalizationRules


Create the Normalization Rules & Add Them to a Custom Tenant Dial Plan

Use the following PowerShell commands to create the Normalization Rules and a new Tenant Dial Plan:

# Rule for feature access codes using the # symbol
$NR1 = New-CsVoiceNormalizationRule -Parent Global -Description "Evolve IP FAC Pound" -Pattern '^(\#\d{2})$' -Translation '$1' -Name EvolveIPFACP -IsInternalExtension $false –InMemory

# Rule for feature access codes using the * symbol
$NR2 = New-CsVoiceNormalizationRule -Parent Global -Description "Evolve IP FAC Star"  -Pattern '^(\*\d{2})$' -Translation '$1' -Name EvolveIPFACS -IsInternalExtension $false –InMemory

# Rule for extension dialing
$NR3 = New-CsVoiceNormalizationRule -Parent Global -Description "Evolve IP Extensions" -Pattern '^([0-9]\d{0,6})$' -Translation '$1' -Name EvolveIPEXT -IsInternalExtension $false –InMemory


# Create a new tenant dial plan and add the normalization rules
New-CsTenantDialPlan -Identity EvolveIP-TenantDialPlan -NormalizationRules @{add=$NR1,$NR2,$NR3}

# View all normalization rules in the new tenant dial plan
(Get-CsTenantDialPlan -Identity EvolveIP-TenantDialPlan).NormalizationRules


If needed, you can use the following command to clear all normalization rules from the new tenant dial plan:

Set-CsTenantDialPlan -Identity EvolveIP-TenantDialPlan -NormalizationRules $null



Conclusion

After configuring the back-end Microsoft Teams services for direct routing, it is recommended to wait a few hours before provisioning your Teams users with direct routing.  This gives Microsoft's back end enough time to synchronize these changes across all of the services and infrastructure.

Our testing has shown that 3 hours is usually enough time to wait, but if you are unable to provision users for direct routing after 3 hours, let us know.  We can review your direct routing configuration, and if needed, we can assist with opening a case with Microsoft.

Additionally, we recommend keeping the licenses assigned to the routing domain user/service accounts until you are satisfied with your deployment.  If you're starting with a pilot group of users, wait until their testing is done, and then you can reassign the licenses to the users in your production group.


Next Steps