Direct Routing with Microsoft Teams allows businesses to connect external phone lines to Microsoft Teams and use Teams as an office phone system instead of a legacy PBX system. This means you can maintain your existing SIP trunks and PSTN connectivity -- retaining control over your numbers and realizing cost savings over the MS Teams Calling Plans.
This article will guide you on how to use Telnyx as a PSTN provider for Microsoft Teams Direct Routing. Once set up is complete, Telnyx customers will be able to by Numbers on the Mission Control Portal and have the ability to receive and send calls via the PSTN from the same Teams account.
NOTE: This integration is carried out via the Telnyx MS Teams SBC, which interconnects Microsoft Teams with the Telnyx telephony platform. Telnyx SBC uses the base domain mstsbc.telnyx.tech, and Telnyx customers will be able to interconnect using a subdomain of mstsbc.telnyx.tech and a token for authentication.
This guide will consist of 4 sections:
1. Telnyx Portal Setup
In order to use Telnyx as a PSTN provider for MS Teams Direct Routing, you'll need a Telnyx account with a purchased number. You can find step by step instructions for doing this within this guide. Once you have completed these steps, you can proceed with MS Teams Direct Routing setup.
Create your Telnyx Portal SIP Connection
Once you have set up your Telnyx account, you will have to set up a new connection for the Telnyx SBC on the SIP Connections Page.
Click on the green Add SIP Connection button and choose a name for your connection. You should see a pop-up window appear which will allow you to choose a SIP Connection Type. For this connection we must choose MS Teams SBC.
You will want to take note of the auto-generated subdomain that appears as it will be needed at different stages of the set up. Click Save & Finish Editing.
Assign a number to the Telnyx SBC Connection
You are now required to assign a Number to the MS Teams connection you just created.
To do this, you will first have to purchase a Number in the Mission Control Portal using the guide previously provided.
If you already possess a number, you can navigate to the 'Numbers' page of your portal and assign your MS Teams connection to the desired DID as shown below.
Add your SIP Connection to your Outbound Voice Profile
Lastly, you'll want to assign the SIP Connection to the Outbound Voice Profile we created in the introduction of this guide.
To do this, navigate to the SIP Connections tab in your sidebar. Click the small pencil icon to the right of your SIP connection. Click on the Outbound tab at the top of the pop up, and you should see an Outbound Voice Profile drop-down which will allow you to assign a profile to your connection. Once selected, click Save All Changes.
Note: If you're using either the DOD, GCC or GOV MS Teams environment you will need to notify the Telnyx support team (email@example.com) so that we can make necessary adjustments on the Telnyx MS Teams SBC.
2. Microsoft 365 Admin Center: Telnyx Subdomain Setup
Now that your Mission Control Portal is set up and ready to go, you’ll need to activate the subdomain in the Microsoft admin portal before setting up Direct Routing in Microsoft Teams.
In order to set this up, you'll need a Microsoft license. You can find different license options in the table below. You'll need one of these base plans and an add-on if necessary:
ADD ON REQUIRED FOR DIRECT ROUTING
Microsoft Business Basic / Standard / Premium
Microsoft 365 Business Voice without Calling Plan
Microsoft Office 365 Enterprise E1 / E3 / F3 / A1 / A3
Microsoft Office 365 Enterprise E5
No add on required
Before you start, please ensure that you have the appropriate rights in the customer tenant. New domains can only be added if you have signed in to the Microsoft 365 admin center as a Global Administrator. To validate the role you have, please sign in to the Microsoft 365 admin center (https://portal.office.com) and go to Users → Active Users. Click your user and under Account → Roles click Manage roles. Verify that you have a Global Administrator role applied.
Adding a subdomain to the customer tenant
Search "Domains" within the Microsoft 365 admin center search bar at the top of your screen. Click the Add Domain option at the top left and add the auto generated subdomain that corresponds to the SIP Connection we created in Section 1.
Verify the subdomain
Click Use This Domain and verify the domain on the following page. Select the Add a TXT record instead option.
Click Next and take note of the TXT value displayed.
Input the TXT value
Navigate back to your MS Teams SBC SIP Connection settings in the Mission Control Portal. Navigate to the 'Domain Validation' header in the top right corner of the window and paste the TXT Value from MS Teams into the 'TXT Value' text box. Click Save All Changes.
Note: The TXT Name and TLL fields should match the fields shown in the MS 365 admin center, hence why they cannot be edited.
Once you have saved your changes, navigate back to Microsoft 365 admin center and click on the Verify button at the bottom.
Update DNS settings
On the next page, select More Options and the select Skip and do this later and click Next.
After this you will be prompted that setup has been complete.
Activate the subdomain
After you have registered a domain name, you’ll need to activate it. You can do this by adding at least one user and assigning the domain that matches the subdomain that was automatically generated when the SIP Connection was created in Section 1.
Navigate to Users → Active Users → Add a user in the Microsoft admin center.
Next, fill in the User details, select the Telnyx subdomain (i.e. yyyy.mstreams.telnyx.com), assign E5 license under "Product Licenses" and click Add. You can remove the E5 license from this user once you're able to add this domain to Direct Routing.
3. Microsoft Teams: Direct Routing Setup
Next, we'll need to set up the Telnyx SBC subdomain in the Microsoft Teams admin center. To do this, you’ll have to have a Microsoft Teams E5 license assigned to each user who will be making and receiving calls to the PSTN. Keep in mind that the changes on the MS Teams admin portal may take up to 24 hours to take effect.
Adding the Telnyx SBC in Direct Routing
In the left tab of the Microsoft Teams admin center, navigate to ‘Voice → Direct Routing’. Click the SBCs tab.
Enter the SBC settings
Click Add and enter the subdomain that was automatically generated in your SIP Connection from Section 1. Set the SBC to use SIP signaling port 5061, check that SIP options and the connection are enabled. If you would like anonymous calls to connect, enable the option “Forward P-Asserted-Identity header”. When you’re done click Save.
Upon successful settings changes, your connection should resemble the example
Create PSTN usage records
This step enables PSTN usage for Direct Routing. In the left tab, navigate to Voice → Direct Routing. In the upper right-hand corner, select Manage PSTN usage records.
Click Add, type TELNYX, and click Apply.
Creating Voice Routes
Now you’ll need to create a pass-through voice route. In the left-hand tab of the admin center, navigate to Voice → Direct Routing. When on the Directing Routing page, select the Voice routes tab.
Click Add, and enter a name and description for your voice route.
Set the priority and specify the dialed number pattern as per your service providers number plan.
To enroll the SBC with the voice route, navigate to 'SBCs enrolled' on the Direct Routing page. Click ‘Add SBCs’, select the SBCs you want to enroll, and then click Apply.
To add PSTN usage records, navigate to the PSTN usage records section. Click Add PSTN usage, select the PSTN records you want to add, and then click Apply.
Voice Routing Policies
In the left-hand tab of the Microsoft Teams admin center, navigate to Voice → Voice routing policies, and then click Add. Type TELNYX as the name and add a description.
PSTN usage records
Under PSTN usage records, click Add PSTN usage, select the "TELNYX" PSTN usage record, and then click Apply.
Assigning Dialplan and Voice routing policies
Under ‘Users’ in the tab on the left-hand side, click Policies. Select Edit and assign "TELNYX" Dial plan and Voice routing policy, and then click Apply.
Assigning Telnyx DID to On-premises PSTN Connectivity
Finally, to provision a user with an on-premises phone number using powershell run the following cmdlet:
Ps> Set-CsUser -Identity "<User name>" -OnPremLineURI tel:<+E164 phone number>
To activate a user with enterprise voice using power shell, run the following cmdlet:
4. Making Test Calls with Microsoft Teams
Your set up for Microsoft Teams Direct Routing should now be complete. The last step is to make both inbound & outbound test calls from Microsoft Teams to verify the service has been set up correctly. Please follow the steps below:
Call a PSTN number from the Microsoft Teams client. You'll want to confirm that the call connects through Telnyx and that there is two-way audio.
Call a Telnyx DID that is assigned to both your new Microsoft Teams SIP Connection and one of your Microsoft Teams users from the PSTN (i.e. a cell phone). Confirm that the call is received in Microsoft Teams and that two-way audio is functioning correctly.
Check the CDRs from the Reporting section of your Telnyx Mission Control Portal to validate that both calls went through correctly.
If you encounter any issues during these tests, please contact us at firstname.lastname@example.org with a note of the number dialled and the date/time. We'll do our best to help you resolve the issue.
This concludes your set up of Microsoft Teams Direct Routing with Telnyx.
Can't find what you're looking for? Click the chat bubble at your lower right-hand corner and talk to the support team!