How to Set Up Microsoft Teams Direct Routing with SBC? - United World Telecom Knowledgebase

How to Set Up Microsoft Teams Direct Routing with SBC?

This document outlines the process to integrate Microsoft Teams with our Session Border Controller (SBC).

Prerequisites

Before beginning the integration process, ensure the following prerequisites are met:

  • A Tenant configured with a license to use Teams (like 365 Business Basic license)
  • A DNS record configured and able to create zones.
  • Microsoft Teams Phone System license
  • Microsoft Teams Calling Plan
  • Firewall rules configured to allow necessary traffic
  • Administrator access to Microsoft Teams admin center
  • If you will receive inbound calls, your phone numbers provided by United World Telecom / Global Call Forwarding
  • A TLS certificate to encrypt the calls using the same domain used to create the SBC inside Microsoft Teams

How to Set Up & Use Teams Direct Routing

In this guide, we’ll cover the following:

1. Configure Microsoft Teams for Direct Routing:

Follow these steps to integrate Microsoft Teams with our SBC:

1. Log in to the Microsoft Teams admin center. https://admin.teams.microsoft.com/dashboard.

configure direct routing

2. Navigate to Voice > Direct Routing.

direct routing add

3. Add the SBC’s FQDN. An example of FQDN: sbc.customerdomain.com

Note: You must use the SBC’s FQDN that has the hostname registered in DNS. For example, if your organization owns contoso.com then sbc.contoso.com is a good name for the SBC, but sbc.contoso.onmicrosoft.com isn’t. You will need to configure your DNS settings to create an SBC subdomain (e.g., sbc.customerdomain.com) and point a hostname entry to our Edge SBCs 66.165.168.103 and 66.165.168.107.

enter FQDN

4. Set up these additional configurations (as shown above):

  • Enabled: ON
  • SIP signaling port: 5061
  • Send SIP options: ON
  • Concurrent call capacity: Check with your United World Telecom/Global Call Forwarding client team

5. Click Save and validate the connection status.

If everything is correctly set up, in some seconds the connection between United World Telecom and MS Teams will become active.

validate chart

2. Setting Up Inbound and Outbound Routes

1. To receive external inbound calls, you must first import your desired phone lines to Microsoft Teams.

2. Go to Voice > Phone Numbers and click Add.

add phone numbers

2. Then, select From Direct Routing to upload a CVS file. Follow this CSV sample.

from direct routing

3. Click Next to submit your request.

In some time, the phone numbers that you bought from United World Telecom / Global Call Forwarding should appear on the Phone Numbers page, so let’s configure the routes.

phone numbers validate

Setting Up Inbound Routes

1. To configure the inbound calls, select the phone number and click on Edit. You can assign the phone number to users and applications inside Microsoft Teams.

2. Click Apply to assign the phone number to this user. Now, inbound calls are ready to be received by this user or application. This change will be propagated to all Tenant:

user card with numbers

Setting Up Outbound Routes

To configure outbound calling (calling an external number from Teams), you must create an external route using Voice Policies, following these steps:

1. Go to Voice > Direct Routing. In the upper right corner, select PSTN usage records.

pstn usage

2. Here, click Add to create a PSTN record for the route you would like to use. An example, to call using local US and Canada routes, create a US and Canada record. For US only, create a US Only route. For international calling, create an International record. This determines what PSTN route will be used to make the outbound call.

Click Apply to save the PSTN record.

apply pstn usage

3. Then, go to Voice Routes on the Direct Routing page, select Add, and put the desired Dialed Number Pattern.

A quick note on the Dialed Number Pattern: The template for the Dialed Number Pattern is ^(\+1[0-9]{10})$. Let’s understand with this example:

  • ^ – start of the string
  • +1 – country code (+1 for the US and Canada)
  • [0-9] {10} – Exactly 10 digits (0–9) after the +1. This represents the standard 3-digit toll-free or area code + 7-digit local number format (561-123-4567)
  • $ – end of the string.

Therefore, this Dialed Number Pattern ^(\+1[0-9]{10})$ will match any North American phone numbers in E.164 format, like +1214xxxxxxx or +1561xxxxxx, where 214 is the Dallas area code and 561 is the Florida area code.

To make external international calls, use this as the Dialer Number Pattern: .*

Scroll down for a list of Number Patterns for other countries.

This rule will match every time a user dials numbers for this pattern.

rules pattern

Note: The order (priority) of PSTN usages in voice routing policies is critical. The usages are applied in order, and if a match is found in the first usage, then other usages are never evaluated.

4. Click Save.

5. Now, create a policy and add this route created. Go to Voice > Voice Routing Policies.

voice routing policy

6. Add a name, and select your PSTN usage (as created in step 1). Then, click Save.

to sbc policy

7. Now, assign the user who will use this rule. Go to User > Manage Users and select the desired user.

8. Then select Policies > Edit. Scroll down to Select Voice routing policy, select the policy created in step 6, and click Apply.

edit policy assignment

Additional Information on Call Encryption – United World Telecom / Global Call Forwarding

The calls between the United World Telecom SBC and Microsoft are encrypted using TLS protocol. So we will need a certificate to insert on our SBC and be able to send and receive call packets with Microsoft. If you use the domain sbc.customerdomain.com to create the SBC, we’ll need the customerdomain.com TLS certificate.

Direct Routing SIP interface will only trust certificates that are signed by Certificate Authorities (CAs) that are part of the Microsoft Trusted Root Certificate Program. Make sure that a CA that is part of the program signs your SBC certificate. Also, make sure that the Extended Key Usage (EKU) extension of your certificate includes Server Authentication and Client Authentication. You can learn more about this here.

Make & Receive External Calls Using Teams Direct Routing

With these configurations in place, your assigned user should be able to make and receive calls. Have them run tests to make sure everything is working properly.

Make a test call from Microsoft Teams to an external number:

  1. Log in to the Teams desktop app and click on Calls.
  2. Type a name or number of the external contact and click Call.

Make a test call from an external number to a Microsoft Teams user:

  1. Call the phone number assigned to your account from an external contact.
  2. In the History tab, click the three dots to see other options such as: Call back, Create a contact, Add to speed dial, etc.

Dialed Number Pattern Guide

Dialed Number Pattern for different countries:

Country Country Code Example Number Regex Pattern Notes
USA/Canada +1 +12135551234 ^\+1\d{10}$ 10 digits after +1
UK +44 +447911123456 ^\+44\d{10}$ UK mobiles are usually 10 digits
France +33 +33612345678 ^\+33\d{9}$ 9 digits after +33
Germany +49 +4915112345678 ^\+49\d{10,12}$ Varies by area code
Australia +61 +61412345678 ^\+61\d{9}$ Mobile starts with 4
India +91 +919812345678 ^\+91\d{10}$ Fixed 10-digit mobile format
Mexico +52 +5215512345678 ^\+52\d{10,11}$ 10 or 11 digits depending on format
Brazil +55 +5511987654321 ^\+55\d{10,11}$ Mobile typically 11 digits
UAE +971 +971501234567 ^\+971\d{9}$ 9 digits after +971
International .*

Matching specific area codes: You can create more complex patterns to match specific country codes/area codes or block certain number ranges.
Use | to create alternatives. For example: ^\+(44|33|49)\d{9,12}$ will match UK, France, and Germany numbers with 9-12 digits.

Troubleshooting Tips

If issues arise during integration, consider the following: