Open SidemenuDocs
Docs
Close Sidemenu

How to set up Microsoft Teams Direct Routing using Telnyxhow-to-set-up-microsoft-teams-direct-routing-using-telnyx

Introduction to using Telnyx with Microsoft Teamsintroduction-to-using-telnyx-with-microsoft-teams

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:

  1. 1Telnyx Portal Setup
  2. 2Microsoft 365 Admin Center: Telnyx Subdomain Setup
  3. 3Microsoft Teams: Direct Routing Setup
  4. 4Making Test Calls

1. Get Your Telnyx Portal Setup1--get-your-telnyx-portal-setup

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 PortalTelnyx Developers. 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:


  1. 1Navigate to the ‘Numbers’ tab on the menu and click ‘Search and Buy Numbers’.
  2. 2Perform a Number Search based on region and features.
  3. 3Enter your chosen criteria and click the ‘Search Numbers’ button. A list of all available numbers with your chosen features will appear.
  4. 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 TrunkingTelnyx Developers’ 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 support@telnyx.com, 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 (192.34.58.13) in the relevant fields as in the image below.

Creating an FQDN Connection on the Telnyx Mission Control Portal

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

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

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.

Assigning a Telnyx Number to a Microsoft Teams DID connection.

2. Microsoft 365 Admin Center: Telnyx Subdomain Setup2--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. 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 PlanAdd on required for Direct Routing
Microsoft Business Basic / Standard / PremiumMicrosoft 365 Business Voice without Calling Plan
Microsoft Office 365 Enterprise E1 / E3 / F3 / A1 / A3Phone System
Microsoft Office 365 Enterprise E5No 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.comTelnyx Developers) 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

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

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 support@telnyx.com, with this information.

Information required to verify the domain.

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.

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.

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

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

Activating the subdomain

3. Microsoft Teams: Direct Routing Setup3--microsoft-teams--direct-routing-setup

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.

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 the SBC settings in MS Teams

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

Manage PSTN Usage Records

Click Add, type TELNYX, and then click Apply.

Creating New PSTN Usage Records

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

Creating Voice Routes in Microsoft Teams

Enroll SBC

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.

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

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

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 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

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>

4. Making Test Calls with Microsoft Teams4--making-test-calls-with-microsoft-teams

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:

  1. 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.
  2. 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.
  3. 3Check that both calls went through your Telnyx portal account by checking your CDRs present in the Reporting section of the Telnyx Mission Control PortalTelnyx Developers. If there's any difficulty with making/receiving calls, then please send us an email to support@telnyx.com (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.

Happy Calling!


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 pageTelnyx Developers 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 touchTelnyx Developers.

Was this page helpful?