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.
In this user guide, we’ll show Telnyx customers how to use Telnyx as a PSTN provider for Microsoft Teams Direct Routing.
Once set up, Telnyx customers will be able to buy Numbers on the Telnyx Mission Control Portal, receive calls from the PSTN to their Teams account, and send calls to the PSTN from the same Teams account.
This integration is carried out via the Telnyx SBC, which interconnects Microsoft Teams with the Telnyx telephony platform. Telnyx SBC uses the base domain msteams.telnyx.tech, and Telnyx customers will be able to interconnect using a subdomain of msteams.telnyx.tech and a token for authentication.
This guide is broken down into 4 sections:
- 1Telnyx Portal Setup
- 2Microsoft 365 Admin Center: Telnyx Subdomain Setup
- 3Microsoft Teams: Direct Routing Setup
- 4Making Test Calls
In order to use Telnyx as a PSTN provider for Microsoft Teams Direct Routing you’ll need a Telnyx account, which you can create in our Mission Control Portal. New users are gifted $10 of free testing credit on signup. Since you’ll need a number to receive calls from the PSTN, why not use your testing credit to buy one from the Numbers tab?
To explore and buy numbers on the Mission Control Portal you can follow these four quick steps:
- 1Navigate to the ‘Numbers’ tab on the menu and click ‘Search and Buy Numbers’.
- 2Perform a Number Search based on region and features.
- 3Enter your chosen criteria and click the ‘Search Numbers’ button. A list of all available numbers with your chosen features will appear.
- 4Click the ‘Add to Cart’ button to purchase a number and navigate to the ‘Cart’ at the top right-hand corner of the screen to check out.
Next, you’ll need to set up an Outbound Voice Profile to make outbound calls to the PSTN. This can be created from the ‘Outbound Voice Profiles’ tab in the Mission Control Portal. Follow along with our ‘Getting Started with SIP Trunking’ video on how to set your profile, billing, and anti-fraud preferences.
Once you have your Portal Account up and running you’ll need the Telnyx SBC subdomain and Token. You can request your Telnyx SBC subdomain and token by sending an email to firstname.lastname@example.org, specifying that you need to use Telnyx as a Microsoft Teams Direct Routing provider.
The Telnyx support team will reply with the Telnyx SBC subdomain and Token that will be used during the setup as explained later in this user guide.
Let’s get started!
Create your Telnyx Portal Connection
When you have set up an account in the Mission Control Portal, the first thing you need to do is to set up a new Connection for the Telnyx SBC on the SIP Connections Page.
Click ‘Add SIP Connection’ and name your connection. A pop-up window will appear. In the ‘Basics’ tab under SIP Connection Type choose FQDN. Add the Telnyx SBC subdomain, token and the Telnyx SBC IP address (18.104.22.168) in the relevant fields as in the image below.
Creating an FQDN Connection on the Telnyx Mission Control Portal
Add inbound connection settings
Next, you’ll need to add inbound connection settings. On the ‘Inbound’ tab, navigate to the SIP Transport Protocol dropdown and select ‘TCP’. Please also make sure to set both number formats to +E.164 format.
Adding inbound connection settings in the Telnyx Mission Control Portal
Add outbound connection settings
On the outbound tab, choose which Outbound Voice Profile to assign to this connection. Then navigate to the ‘Encrypted Media’ dropdown and select SRTP as Encrypted Media.
Select ‘SRTP’ as Encrypted Media
Assign a number to the Telnyx SBC Connection
Lastly, you’ll need to assign a Number to the Telnyx SBC Connection.
In order to do this, you’ll first have to buy a number in the Mission Control Portal, as explained in the Introduction of this guide.
If you have an existing number, navigate to the ‘Numbers’ page and assign your Microsoft Teams connection to the desired DID as shown below.
Assigning a Telnyx Number to a Microsoft Teams DID connection.
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. We’ve listed different license options in the table below. You’ll need one of the base plans and an add-on if necessary:
|Base Plan||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||Phone System|
|Microsoft Office 365 Enterprise E5||No add on required|
License Options and Add Ons required to activate subdomain in Microsoft admin portal
Before you start, ensure you have the appropriate rights in the customer tenant. You can only add new domains if you 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 and then verify that you have a Global Administrator role.
Add a subdomain to the customer tenant
Navigate to Setup → Domains → Add Domain in the Microsoft 365 admin center. Add the subdomain provided by Telnyx.
Adding a subdomain in Microsoft 365
Verify the subdomain
Click on Next and verify the domain on the following page. Then select Add a TXT record instead.
Verifying the domain on Microsoft Teams
Share the TXT details with Telnyx
Click Next and take note of the values in the following fields: -TXT name -TXT value -TTL.
Reply back to the same email thread that you used to request the Telnyx SBC subdomain and Token at email@example.com, with this information.
Information required to verify the domain.
The Telnyx Support Team will confirm that the TXT records have been added to the subdomain. Once you have the confirmation, click on Verify.
Update DNS settings
On the next page, select I’ll add the DNS records myself and click Next.
Check the ‘I’ll add the DNS records myself' box to update your DNS settings.
This will take you to the page to choose your online services. Here you should untick all options and click Next.
Untick all options when choosing your online services.
Click Finish on the Update DNS settings page and ensure that the status is set as ‘Setup 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 a SIP address, where the FQDN portion of the SIP address matches the created subdomain in the customer tenant. The license can be revoked from the user after the subdomain activation (note this can take up to 24 hours).
To do this, navigate to Users → Active users → Add a user in the Microsoft admin center.
Adding users to activate the subdomain
Next, fill in the User details, select the Telnyx subdomain (i.e yyyy.msteams.telnyx.com), assign license and click Add.
Activating the subdomain
Here, we’ll take a look at how 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.
Direct Routing in the Microsoft Teams admin center.
Enter the SBC settings
Click Add and enter a FQDN for the SBC. Set the SBC to use SIP signaling port 5061, check that SIP options are disabled and the connection is enabled. When you’re done click Save.
Enter SBC settings in Microsoft Teams
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.
Manage PSTN Usage Records
Click Add, type TELNYX, and then click Apply.
Creating PSTN Usage Records
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 then enter a name and description for the voice route.
Set the priority and specify the dialed number pattern as per your service provider’s numbering plan.
Creating Voice Routes in Microsoft Teams
To enroll 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.
Enrolling SBC’s and adding PSTN usage records in Microsoft Teams.
Voice Routing Policies
In the left 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.
Adding Voice Routing Policies in Microsoft Teams
PSTN usage records
Under PSTN usage records, click Add PSTN usage, select the "TELNYX" PSTN usage record, and then click Apply.
Adding PSTN Usage Records
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 the Telnyx dial plan and voice routing policy in Microsoft Teams.
Assigning Telnyx DID to On-premises PSTN Connectivity
There are 2 ways to assign a Telnyx DID to On-premises PSTN connectivity.
A: Using Skype for Business admin center
To provision a user with an on-premises phone number, go to Skype for Business and navigate through admin center → voice users → Select User, and click Change.
Assigning a Telnyx DID to On-Premises PSTN Connectivity
B: Using Powershell
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 powershell, run the following cmdlet:
Ps> Set-CsUser -Identity "<User name>" -EnterpriseVoiceEnabled $true
To activate a user with enterprise voice and assign a phone using powershell, run the following cmdlet:
Ps> Set-CsUser -Identity "<User name>" -EnterpriseVoiceEnabled $true -OnPremLineURI tel:<+E164 phone number>
Don’t worry, you’re nearly there!
The last step is to test inbound and outbound calls from Microsoft Teams to verify the service is working. To do this, follow these short steps:
- 1Call a PSTN number from the Microsoft Teams client. You’ll want to confirm the call connects through Telnyx and that there is two-way audio.
- 2Call a Telnyx DID assigned to both your new Microsoft Teams Portal Connection and one of your Microsoft Teams users in the Microsoft Admin Center from the PSTN (i.e. a cell phone. Confirm that the call is received in Microsoft Teams and there is two-way audio.
- 3Check that both calls went through your Telnyx portal account by checking your CDRs present in the Reporting section of the Telnyx Mission Control Portal. If there's any difficulty with making/receiving calls, then please send us an email to firstname.lastname@example.org (including a note of the number dialed and the date/time) and we'll do our best to help you out.
And that’s it. You’ve successfully set up Microsoft Teams Direct Routing using Telnyx.
Can’t find what you’re looking for?
If you’re looking for more information about Telnyx SIP Trunking, take a look at our product page where you’ll find details about our features and pricing.
If you need some extra help, our support team is always on hand to answer any questions.- don’t hesitate to get in touch.