Anchor | ||||
---|---|---|---|---|
|
Microsoft Teams Implementation Guide
Anchor | ||||
---|---|---|---|---|
|
...
For more prerequisite details, see Microsoft's document for Plan Direct Routing.
Anchor | ||||
---|---|---|---|---|
|
...
Direct Routing requires a custom domain for each Office 365 tenant. For more information, click here.
Anchor | ||||
---|---|---|---|---|
|
...
The domain names for SBCs must be in the list of domain names registered in the "Domains" section under Settings of the Microsoft 365 admin center menu. The domain of a tenant must be activated and have a Healthy status. Go to the admin dashboard to add domains not already created and verified.
...
To learn more about SBC certificates, refer to this Microsoft documentation.
Anchor | ||||
---|---|---|---|---|
|
...
To configure the Microsoft 365 Tenant for a Peeredge SBC-Direct Routing connection, complete five high-level steps:
Connect the SBC with the Phone System and validate the connection.
Enable users for Direct Routing, voice, and voicemail.
Configure call routing.
Translate number to an alternate format (optional).
Add a Dial Plan and assign it to a user.
Admins can complete some of these steps via the Microsoft Teams admin center. Admins can complete all configuration steps via PowerShell. This document provides examples of both methods. To use the PowerShell commands, you must install the Microsoft Teams PowerShell Module from the Windows PowerShell prompt and then sign in with your Azure credentials using the Connect-MicrosoftTeams command.
...
1. Connect the SBC with phone system and validate connection
Using the Microsoft Teams admin center
To add the Peeredge SBC to Direct Routing:
Locate Voice in the Microsoft Teams Admin Center.
Go to the Direct Routing page.
Click Add under the SBC tab.
...
The SBC FQDN entered in the Add an FQDN for the SBC field must be an exact match with the SBC Certificate's Common Name (CN) or be included in the Subject Alternative Name (SAN). We recommend using 5061 as the SIP signaling port and enabling the Send SIP options, Forward call history, and Ring phone while trying to find the user. You may need to enable other settings based on your specific business requirements. If you plan to enable location-based routing or Bypass mode, we recommend that you fully test the SBC integration with these features disabled first.
...
Must be configured for Teams Only mode
...
Must be homed online, enabled for enterprise voice, and assigned a phone number
Using the Microsoft Teams admin center:
Go to Users -> Manage users.
Select a user.
Under Account General information, select Edit.
Under Assign phone number, click the Phone number type drop-down menu and select Direct Routing.
Enter an assigned phone number and a phone number extension, if applicable.
Click Apply.
...
Using Windows PowerShell
If you are managing the user's phone number on-premises, make sure the user is Enterprise Voice enabled online by entering the following command:
...
Anchor | ||||
---|---|---|---|---|
|
3. Configure call routing
Call routing has the following elements:
Call routing policy
Also called a Voice Routing policy. A container for PSTN usages, which can be assigned to a user or to multiple users. Sample Call routing policy names include:
US Only
US Global
Germany Only
Germany Global
Internal
PSTN usages
A container for voice routes and PSTN usages, which can be shared in different voice routing policies. Sample PSTN usage names include:
US-Emergency
US-LD
US-INTL
Company-Internal
Voice routes
A number pattern and set of online PSTN gateways for calls where the calling number matches the pattern. In the examples below, the Internal voice routes represent routes to company-managed third-party PBXs used by employees that have not yet migrated to MS Teams. Sample Voice route names and their associated dialed number patterninclude:
US Emergency ^933$
US LD e164 ^+1[2-9]\d{2}[2-9]\d{6}$
US INTL e164 ^+[2-9]\d+$
Reston Internal ^+170355512\d{2}$
Chicago Internal ^+13125556[43]\d{2}$
Online PSTN gateway
This is a pointer to the Peeredge SBC that also stores the configuration which is applied when a call is placed through the SBC, such as forward P-Asserted-Identity (PAI) or Preferred Codecs. The pointer can be added to voice routes.
Two examples (from Microsoft) of voice routing policies in a call flow.
...
Create the PTSN usages
In the following example, we create four PSTN usage records. We suggest admins use easy-to-understand names representing the types of calls a user is allowed to dial. Using the Microsoft Teams admin center:
Go to Voice -> Direct Routing.
Select Manage PSTN usage records in the top right corner of the page.
Click + Add and enter the name of the PSTN usage record.
Repeat step 3 to add more records.
Click Apply to finish.
...
Using Windows PowerShell
Use the following command to create a PSTN Usage:
...
In the following example, we create four voice routes. The dial number patterns are in the form of a regular expression (regex). You can validate your regex patterns.
Using the Microsoft Teams admin center:
Go to Voice -> Direct Routing.
Click the Voice routes button.
Click the Add button.
Add the name Non-Emergency Test in the voice route in the Add a name for your voice route field.
Make sure the Priority is 1.
Make sure the Dialed number pattern is ^933$.
Click the Add SBCs button and select your Peeredge SBCs and then click Apply.
Click the ADD PSTN usage button and select the US-Emergency PSTN Usage and then click Apply.
Click Save.
Repeat steps 3 – 9 for any other voice routes using an appropriate priority and PSTN Usage. When overlapping dialed number patterns exist, give the more specific pattern higher priority.
Using Windows PowerShell
New-CsOnlineVoiceRoute -Identity "voice route name" -NumberPattern "regex pattern" -OnlinePstnGatewayList sbc1-fqdn, sbc2-fqdn -Priority 1 -OnlinePstnUsages "PSTN Usage."
...
Create the voice routing policy
Using the Microsoft Teams admin center:
Go to Voice -> Voice routing policies.
Click the + Add button.
Add the policy name in the Add a name for your voice routing policy field.
Add an appropriate description.
Add one or more PSTN usages.
Click Save.
Repeat steps 2 – 6 for each voice routing policy.
...
Using Windows PowerShell
To create a new voice routing policy, use the New-CsOnlineVoiceRoutingPolicy command.
...
Assign the voice routing policy to a user
Using the Microsoft Teams admin center:
Go to Voice -> Voice routing policies.
Highlight the voice policy you want to assign.
Click the Assign button.
In the Manage user search box, search for the user and click add when found.
Click Apply.
...
Using Windows PowerShell
To assign a voice routing policy to a user, use the Grant-CsOnlineVoiceRoutingPolicy command:
...
The example below shows how to add a typical US dial plan.
Using the Microsoft Teams admin center:
Go to Voice -> Dial plans.
Click the +Add button to add a Tenant dial plan.
Add the dial plan name (US DP) in the Add a name for your dial plan field.
Add an appropriate description (Tenant User Dial plan for US-based users).
Add an External dialing prefix (8). Legacy PBX was often configured with 8 or 9 as an external dialing prefix to route the call to an external line.
Set Optimized device dialing to ON if you configured an External dialing prefix.
Click the Add button under Normalization rules to open the Add new rule pane.
Enter a rule name (Non-Emergency Test Call) in the Name field.
Add an appropriate description.
Select an appropriate Rule creation mode (Advanced).
Enter a dial pattern to match (^(911)$) in the If condition.
Enter the translation/number manipulation ($1) in the Then do this field.
Optionally, enter a number in the test this rule field to validate the rule. A validated test results in, "The translated number is an E.164 phone number."
Click Save.
Repeat steps 7 – 14 to add Normalization rules.
Click Save.
...
Assign the Dial plan to a user
Go to Voice -> Dial plans.
Highlight the Dial plan you want to assign.
Click Assign.
Search for the user.
Click the Add button.
Click Apply.
...
Related PowerShell commands
...
Step 1. Create a Customer Relationship
Login to your Peeredge SBC Portal.
Go to the Tree View in the left panel and click Relationships if the menu is collapsed. If the Tree View is expanded, click on All.
Click the + Add Relationship button in the top right.
Add the Customer (or meaningful) name in the Relationship Name field.
Leave the Send trunk group notification checked.
Fill in the optional fields.
Add a company logo (optional).
When complete, click the Add Relationship button.
...
Insert Video Demo Link?
...
9. Scroll through the Relationships list and click the new Relationship name.
...
Step 3. Create an Origination Customer Trunk Group
Go to the Tree View in the left panel and click Relationships if the menu is collapsed. If the Tree View is expanded, click on All.
Select the Customer Relationship you created in Step 1.
Click the Trunk Groups menu tab (next to the Relationship Info menu).
Click the + Add Group button in the top right corner.
Enter an appropriate name for the Trunk Group in the Name field. For example, To Teams.
Select Origination on the drop-down menu in the Direction field,
Select Customer on the drop-down menu in the Relationship field.
Set the Max PDD to 10 seconds (or another appropriate value).
Set the B-Timer to 4 seconds (or another appropriate value).
Enable these options: Send E.164, Send PAI, Trunk Monitoring, Preserve Caller ID, Ignore Privacy Header, and Early Media.
Click Create.
...
Setting ports and protocols
Now that you have created the Trunk Group and filled in the fields on the Trunk Group Info page:
Click Trunks in the upper center of the window. The top section of the Trunks page allows you to define the attributes of a new trunk or edit the values of an existing trunk. The bottom section of the page lists the trunks in this group.
Verify the Trunk type is set to IP.
In the IP Address field, enter the MS Team SIP Proxy FQDN sip3.pstnhub.microsoft.com.
In the Port field, enter 5061.
In the Protocol field, select TLS 1.2 on the drop-down menu.
Info |
---|
Note The 46 Labs Provisioning Team populates the Location, Zones, and Switch IP fields when the team deploys your Peeredge SBC. |
...
Trunks are initially displayed in the order they are created, with the newest Trunk displayed on top. Click a column name to sort column data.
Repeat steps 2-14 (above) for every SBC location that you see in the Location field drop-down.
Click Media Handling in the top center of the window.
Enable Anchor media and check Enable Secure RTP.
Click the Save & Close button.
Info |
---|
Note The default settings in Signaling Manipulations and Route Advance Logic pages do not need to be changed. |
...
The Microsoft SIP Proxy FQDNs and IP addresses used SIP signaling (and related firewall information) with Microsoft Teams Direct Routing are defined in this section of the Microsoft documentation.
Go to the Tree View in the left panel and click Relationships if the menu is collapsed. If the Tree View is expanded, click All.
Select the Customer Relationship you created in Step 1.
Select the Trunk Groups menu tab (next to the Relationship Info menu).
Click the + Add Group button in the top right window.
Enter an appropriate name for the Trunk Group in the Name field. For example, From Teams.
Select Termination on the drop-down menu in the Direction field.
Select Customer on the drop-down menu in the Relationship field.
Set the Max PDD to 10 seconds or another appropriate value.
Set the STIR/SHAKEN Treatment to No Treatment.
Verify the ANI Normalization and Normalize sipcodes attributes are enabled.
Click Create.
...
Adding a trunk
Now that you have created the Trunk Group and filled in the fields on the Trunk Group Info page:
Click Trunks in the top center of the window.
Verify the Trunk type is set to IP.
In the IP Address field, enter 52.112.0.0.
In the Port field, enter 1. This field identifies the source port that the Microsoft SIP Proxy will be using. Since TCP/TLS connections use random ephemeral ports as the source port, the value of 1 represents any source port.
In the Protocol field, select TLS 1.2 on the drop-down menu.
From the Location field drop-down, select the first available location (e.g. dal1).
From the Zones field drop-down, select the appropriate zone (e.g. default).
From the Switch IP field drop-down, select the Switch IP.
Click the Add Trunk button.
Repeat steps 2-9 using 52.120.0.0 in the IP Address field.
Verify the Status of the trunks is set to enabled.
Repeat steps 2-11 for every other SBC location (e.g. ash1) in the Location field.
Info |
---|
Note The Peeredge SBC considers the 52.112.0.0 and the 52.120.0.0 subnets as having a /14 prefix. |
...
Now that you have completed the Trunk page:
Click Media Handling in the top center of the window.
Enable Anchor media and check Enable Secure RTP.
Click the Save & Close button.
Info |
---|
Note The default settings in Signaling Manipulations, Route Advance Logic, and Block List pages do not need to be changed. |
...
If the Relationships menu is collapsed, click Relationships from the Tree View in the left panel to view All existing Relationships. If it is expanded, click on All immediately under Relationships
Select the Vendor Relationship you created in Step 2.
Select the Trunk Groups menu tab (next to the Relationship Info menu).
Select the + Add Group button in the upper right window.
Enter an appropriate name for the Trunk Group in the Name field. For example, From PSTN.
Select Origination from the drop-down selector in the Direction field.
Select Vendor from the drop-down selector in the Relationship field.
Set the Max PDD to 10 seconds or another appropriate value.
Set the STIR/SHAKEN Treatment to No Treatment.
Verify Caller ID override type is set to Off.
Verify the ANI Normalization attribute is enabled.
Click Create.
Adding a trunk
Now that you have created the Trunk Group and filled out the Trunk Group Info page, move to the Trunks page:
Click Trunks in the top center of the window.
Verify the Trunk type is set to IP.
In the IP Address field, enter the vendor's SBC IP address.
In the Port field, enter the vendor's SBC IP Port.
In the Protocol field, select the appropriate protocol from the drop-down menu.
From the Location field drop-down, select the first available location (e.g. dal1).
From the Zones field drop-down, select the appropriate zone (e.g. default).
From the Switch IP field drop-down, select the Switch IP.
Click the Add Trunk button.
Repeat steps 2-9 to add a trunk for each of the vendor's SBCs
Repeat steps 2-10 for every other SBC deployed location (e.g. ash1) shown in the Location drop-down menu.
Media Handling
Now that you have completed the Trunk page, move to the Media Handling page:
Click Media Handling in the upper center of the window.
Enable Anchor media. If the Protocol was TLS 1.2 then also check Enable Secure RTP
Click the Save & Close button.
Info |
---|
Note The default settings in Signaling Manipulations and Route Advance Logic pages do not need to be changed. |
...
Step 6. Create a Termination Vendor Trunk Group
If the Relationships menu is collapsed, click on Relationships from the Tree View in the left panel to view All existing Relationships. If it is expanded, click on All immediately under Relationships
Select the Vendor Relationship you created in Step 2.
Select the Trunk Groups menu tab (next to the Relationship Info menu).
Select the + Add Group button in the upper right window.
Enter an appropriate name for the Trunk Group in the Name field. For example, To PSTN.
Select Termination from the drop-down selector in the Direction field.
Select Vendor from the drop-down selector in the Relationship field.
Set the Max PDD to 10 seconds or another appropriate value.
Set the B-Timer to 4 seconds or another appropriate value.
Enable the Send E.164, Send PAI, Preserve Caller ID, Ignore Privacy Header, and Early Media options.
Click the Create button.
Adding a trunk
Now that you have created the Trunk Group and filled out the Trunk Group Info page, move to the Trunks page:
Click Trunks in the upper center of the window.
Verify the Trunk type is set to IP.
In the IP Address field, enter the vendor's SBC IP address.
In the Port field, enter the vendor's SBC IP Port.
In the Protocol field, select the appropriate protocol from the drop-down menu.
From the Location field, drop-down select the first available location (e.g. dal1).
From the Zones field drop-down, select the appropriate zone (e.g. default).
From the Switch IP field drop-down, select the Switch IP.
Click the Add Trunk button.
Repeat steps 2-9 to add a trunk for each of the vendor's SBCs.
Repeat steps 2-10 for every other SBC deployed location (e.g. ash1) shown in the Location drop-down menu.
Media Handling
Now that you have completed the Trunk page, move to the Media Handling page:
Click Media Handling in the upper center of the window.
Enable Anchor media. If the Protocol was TLS 1.2, then also check Enable Secure RTP.
Click the Save & Close button.
Info |
---|
Note The default settings in Signaling Manipulations, Route Advance Logic and Block List pages do not need to be changed. |
...
Name (example) | Location | Direction | Relationship | Deck Type |
Teams-US-OC-DID | US & Canada | Origination | Customer | DID |
Teams-US-OC-TF | US & Canada | Origination | Customer | Toll-Free |
If the Relationships menu is collapsed, click Relationships from the Tree View in the left panel to view All existing Relationships. If it is expanded, click All immediately under Relationships
Select the Customer Relationship you created in Step 1.
Select the Rating menu tab.
Click the + Add Rate Deck button in the top right corner.
Enter an appropriate name for the Rate Deck in the Name field. See the above table.
Select the appropriate Location, Direction, Relationship, and Deck Type. See table.
Click the Add Rating button.
...
Once the Rate Deck is added, the window changes to allow you to upload a CSV file. You can download a sample CSV file by selecting Download Sample.
...
From the Trunk Groups window in the Customer Relationship, click the three dots vertical ellipsis at the far left of the Origination Customer Trunk Group and then click Assign Rate Deck. Select a rate deck on the drop-down menus and then click Assign.
...
Name (example) | Location | Direction | Relationship | Deck Type |
Teams-US-TC-PJ-LRN | US & Canada | Termination | Customer | PJ (NPANXX) |
Teams-US-TC-TF | US & Canada | Termination | Customer | Toll-Free |
Teams-US-TC-D | US & Canada | Termination | Customer | Dialed |
If the Relationships menu is collapsed, click Relationships from the Tree View in the left panel to view All existing Relationships. If it is expanded, click on All under Relationships.
Select the Customer Relationship you created in Step 1.
Click the Rating menu tab.
Click the + Add Rate Deck button in the upper right window.
Enter an appropriate name for the Rate Deck in the Name field. See the above table.
Select the appropriate Location, Direction, Relationship, and Deck Type. See table for the Prefix Jurisdiction (NPANXX) Deck Type select LRN for the Rate by field.
Uncheck the Requires Confirmation field.
Click the Add Rating button.
Once you add a Rate Deck, the window changes to allow you to upload a CSV file. You can also download a sample CSV file by selecting Download Sample.
Click Upload document or drag the CSV file onto the window.
Match the column headers in the CSV file to the appropriate fields.
Optionally change the Effective Date or add an Expiration Date for the Rate Deck.
Click Save & Upload.
Repeat steps 4-13 for the other US & Canada Termination Customer Toll-Free Rate Decks.
Use one of the two ways to assign Rate Decks to the Termination Customer Trunk Group.
The Rating table in the Customer Relationship, when finished, should look something like this.
...
Name (example) | Location | Direction | Relationship | Deck Type |
Teams-US-OV-DID | US & Canada | Origination | Vendor | DID |
Teams-US-OV-TF | US & Canada | Origination | Vendor | Toll-Free |
If the Relationships menu is collapsed, click Relationships from the Tree View in the left panel to view All existing Relationships. If it is expanded, click on All immediately under Relationships
Select the Vendor Relationship you created in Step 2.
Click the Rating menu tab.
Select the + Add Rate Deck button in the upper right window.
Enter an appropriate name for the Rate Deck in the Name field. See table.
Select the appropriate Location, Direction, Relationship, and Deck Type. See the above table.
Click the Add Rating button. Once you add a Rate Deck, the window changes to allow you to upload a CSV file. You can also download a sample CSV file by selecting Download Sample.
Click Upload document or drag the CSV file onto the window.
Match the column headers in the CSV file to the appropriate fields.
Optionally change the Effective Date or add an Expiration Date for the Rate Deck.
Click Save & Upload.
Repeat Steps 4-11 for the US & Canada Origination Vendor Toll-Free Rate Deck.
Use one of the two ways to assign Rate Decks to the Origination Vendor Trunk Group.
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
...
Name (example) | Location | Direction | Relationship | Deck Type |
PTSN-US-TV-PJ-LRN | US & Canada | Termination | Vendor | PJ (NPANXX) |
PTSN-INTL-TV-D | US & Canada | Termination | Vendor | Dialed |
If the Relationships menu is collapsed, click Relationships on the Tree View in the left panel to view All existing Relationships. If it is expanded, click on All immediately under Relationships
Select the Vendor Relationship you created in Step 2.
Click the Rating menu tab.
Click the + Add Rate Deck button in the top right window.
Enter an appropriate name for the Rate Deck in the Name field. See table.
Select the appropriate Location, Direction, Relationship, and Deck Type. See table. For the Prefix Jurisdiction (NPANXX) Deck Type, select LRN for the Rate by field.
Uncheck the Requires Confirmation field.
Click the Add Rating button. After you add a Rate Deck, the window changes to allow you to upload a CSV file. You can also download a sample CSV file by selecting Download Sample.
Click Upload document or drag the CSV file onto the window.
Match the column headers in the CSV file to the appropriate fields.
Optionally change the Effective Date or add an Expiration Date for the Rate Deck
Click Save & Upload.
Repeat steps 4-12 for the other US & Canada Termination Vendor Dialed Rate Deck.
Use one of the two ways to assign Rate Decks to the Termination Vendor Trunk Group.
The Rating table in the Vendor Relationship, when finished, should look something like this.
...
Step 11. Create and assign an Origination Customer Routeplan
If the Relationships menu is collapsed, click Relationships in the Tree View in the left panel to view All existing Relationships. If it is expanded, click on All immediately under Relationships
Select the Customer Relationship you created in Step 1.
Click the Routing menu tab.
Click the + Add Routeplan button in the Origination section.
Add an appropriate name in the Routeplan Name field (e.g. To Teams RP).
Click the Create Button.
Select the Numbering Page.
To add one Telephone number at a time, click the + Add Number button.
Enter the e.164 number (less the + symbol) in the Number field.
Select the appropriate Number Type (e.g. DID).
For DID Number, select the Customer Tier (e.g. 1) and the Vendor Tier (e.g. 1).
Click the Add Number button.
...
Uploading a file
To upload a range of telephone numbers, click the Upload Number button.
You can download a sample CSV file by clicking Download Sample.
Select the appropriate Upload option.
Either drag the CSV file into the drop box or click Upload document to select the CSV file.
Click the Upload button.
...
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Step 12. Create and assign a Termination Customer Routeplan
If the Relationships menu is collapsed, click Relationships on the Tree View in the left panel to view All existing Relationships. If it is expanded, click on All immediately under Relationships
Click the Customer Relationship you created in Step 1.
Click the Routing menu tab.
Click the + Add Routeplan button in the Termination section.
Add an appropriate name in the Routeplan Name field (e.g. To PSTN RP).
Set the Profit Protection to Off.
Click the Create Button.
Select the Routing Rules Page.
Click the + Add Rule button.
Add an appropriate name in the Rule Name field (e.g. Route to PSTN).
In the Vendor Considers section, check the desired Trunk Group from the list.
Click Add Routing Rule.
...
Anchor | ||||
---|---|---|---|---|
|
...
The Dialpad should be visible in the Calls --> Phone window in the Teams Client.
Check to see if the Teams User is assigned Skype for Business Online (Plan 2) license and the Microsoft Phone System.
Check to see if the Teams User has been assigned a Telephone number.
Check to see if the Teams User has been assigned a Voice Routing Policy.
...
The CDR Diagnostic Report contains call detail records for every call between any Customer Relationship Trunk Group and any Vendor Relationship Trunk Group.
Termination filters All CDRs from Termination Customer Trunk Group (ingress call leg) to a Termination Vendor (egress call leg) (e.g. PSTN Outbound Calls).
CDR Export Download exported CDRs.
Origination filters All CDRs from an Origination Vendor Trunk Group (ingress call leg) to an Origination Customer (egress call leg) (e.g. PSTN Inbound Calls).
Live Calls Display all calls in progress. Optionally, select and kill individual calls.
The Time Filter This drop-down offers several command time frames to filter on.
The Date/Time selector Defines Defines a specific start date and time and end date and time.
All will display CDRs Based on the selected direction (Termination/Origination) and selected dime filters.
Completed Further filter the CDRs to just those with the 2xx Release Code.
Failed Further filter the CDRs to those with a 4xx/5xx/6xx Release Code.
The Table Columns button Select columns to display and arrange display order.
Filter button Refine your filter to specific Customer Trunk Groups, Vendor Trunk Groups, Minimum and Maximum call durations, a specific ANI, Dialed Number, SIP Call ID, or Cause Code.
Displays the CDRs that match the filter criteria. The Search box allows you to further filter on any text string within this set of CDRs.
Export Initiate an export task and create a CSV file containing all CDRs that match your filter criteria. Use the CDR Export to download the CDRs once they are generated.
Lookup LRN/Spam –
...
This button can be used to lookup an LRN associated to a specific DNIS or to check is a specific DNIS is in the Spam database.
If you click the three dots vertical ellipsis to the right of an individual CDR, the portal presents three options.
View the Call Path.
Download a trace file (which can be viewed in Wireshark or an application that can view pcap files.
Download this specific CDR record.
Below is an example of a Live Call window.
...