TechBuzzPro

Microsoft Teams Direct Routing: Setup & VoIP Call Guide

· 5 min read · Apps & Browsers

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To configure Microsoft Teams Direct Routing and make VoIP calls, you connect a supported Session Border Controller (SBC) to Teams, configure the SIP trunk and voice routing, and assign phone numbers and dial plans to users. This guide walks you through the essential steps, from prerequisites to troubleshooting, so you can enable PSTN calling without Microsoft Calling Plans.

What You'll Need

  • A Microsoft Teams Phone license (or Teams Enterprise Voice) for each user who needs calling.
  • A certified Session Border Controller (SBC) and a SIP trunk from a carrier. The SBC must be on Microsoft's certified list for Direct Routing.
  • A public DNS name and a valid public certificate for the SBC (subject name matching the SBC FQDN).
  • Global Administrator or Teams Administrator rights in Microsoft 365.
  • PowerShell with the MicrosoftTeams module installed (for configuration commands).
  • PSTN phone numbers from your carrier, in E.164 format, and the carrier's SIP signaling IPs/FQDNs.

Step-by-Step

  1. Verify your SBC is certified. Check Microsoft's list of certified SBCs for Direct Routing. If your model isn't listed, it may still work but isn't officially supported. Ensure the SBC firmware is current and supports the required SIP headers for Teams.
  2. Configure the SBC for Teams. On the SBC, set up a SIP trunk pointing to Teams. You'll need the Teams SIP proxy FQDN: sip.pstnhub.microsoft.com (primary), sip2.pstnhub.microsoft.com (secondary), and sip3.pstnhub.microsoft.com (tertiary). Configure TLS on port 5061 and use the public certificate. Also set the SBC to send and receive calls for your phone numbers.
  3. Set up DNS and firewall rules. Create a public DNS A record for your SBC's FQDN pointing to its public IP. Open the following ports from your SBC to Microsoft's SIP proxy IP ranges: SIP signaling over TLS 5061, and media ports (typically UDP 49152-53247, but check your SBC's documentation). Microsoft publishes its IP ranges; allow them in your firewall.
  4. Enable Direct Routing in Teams. Connect to Teams PowerShell as an admin. Run Set-CsOnlinePSTNGateway -Identity -Enabled $true -SipSignalingPort 5061 to register your SBC. Then verify with Get-CsOnlinePSTNGateway. The SBC should show as enabled and online after a few minutes.
  5. Create a voice routing policy. Define a PSTN usage, voice route, and voice policy. For example:
    • Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="PSTN-Usage"}
    • New-CsOnlineVoiceRoute -Identity "Route to SBC" -NumberPattern ".*" -OnlinePstnGatewayList -Priority 1 -OnlinePstnUsages "PSTN-Usage"
    • New-CsOnlineVoiceRoutingPolicy -Identity "VoicePolicy" -OnlinePstnUsages "PSTN-Usage"
    Then assign the policy to users with Grant-CsOnlineVoiceRoutingPolicy -Identity user@domain.com -PolicyName "VoicePolicy".
  6. Assign phone numbers to users. Use the Teams admin center or PowerShell to assign a phone number to each user. In the admin center, go to Users > Manage users, select the user, and under Voice, assign a number. Or use Set-CsPhoneNumberAssignment -Identity user@domain.com -PhoneNumber +1234567890 -PhoneNumberType DirectRouting.
  7. Configure dial plans (optional but recommended). Create a dial plan to normalize numbers dialed by users (e.g., adding country codes). Use New-CsTenantDialPlan and assign it to users. This ensures calls are routed correctly.
  8. Test calls. Have a user make a call to an external number and receive one. Check the SBC logs and Teams call analytics for errors. If calls fail, review the SBC configuration and voice routing policies.

Common Mistakes

  • Using an uncertified SBC or outdated firmware. This can cause intermittent call failures or one-way audio. Always verify certification and update firmware.
  • Incorrect certificate setup. The SBC certificate must be trusted by Microsoft and match the FQDN. Self-signed certificates won't work.
  • Forgetting to enable the SBC in Teams. After configuring the SBC, you must enable it with PowerShell; otherwise, Teams won't route calls to it.
  • Misconfigured voice routing policies. If the PSTN usage isn't linked to a route and policy, calls won't go through. Double-check the order: usage > route > policy > user assignment.
  • Not opening the correct firewall ports. Media ports are often overlooked, leading to no audio. Ensure both signaling and media ports are open.
  • Assigning numbers in the wrong format. Phone numbers must be in E.164 format (e.g., +1234567890).

Tips

  • Use the Microsoft Teams admin center's call analytics to troubleshoot call quality and failures.
  • Test with a small pilot group before rolling out to everyone.
  • Keep your SBC firmware and Teams PowerShell module up to date.
  • Document your voice routing configuration for future reference.
  • Consider setting up a secondary SBC for redundancy if high availability is required.

Troubleshooting

If calls fail, start with the simplest checks: ensure the SBC is online and enabled in Teams (Get-CsOnlinePSTNGateway). Verify the certificate is valid and trusted. Check firewall rules for both signaling and media ports. Use the SBC's built-in tools to test connectivity to Microsoft's SIP proxy. In Teams admin center, review call logs for error codes. Common issues include incorrect SIP headers, mismatched TLS settings, or voice routing misconfiguration. If you see one-way audio, it's almost always a media port or NAT issue. For persistent problems, engage your SBC vendor's support and Microsoft support with detailed logs.

Frequently Asked Questions

Do I need a Microsoft Calling Plan for Direct Routing?

No. Direct Routing lets you use your own SIP trunk and PSTN carrier, so you don't need a Microsoft Calling Plan. You only need Teams Phone licensing.

Can I use any SBC for Direct Routing?

Microsoft recommends using a certified SBC for full support. Uncertified SBCs may work but are not officially supported and may have compatibility issues.

How do I assign phone numbers to users?

You can assign numbers in the Teams admin center under Users > Manage users > Voice, or via PowerShell using Set-CsPhoneNumberAssignment.

What ports need to be open for Direct Routing?

At minimum, SIP signaling over TLS 5061 and the media port range specified by your SBC (often UDP 49152-53247). Check Microsoft's documentation for the latest IP ranges.

Can I use Direct Routing with Teams on mobile and desktop?

Yes, Direct Routing works across all Teams clients, including desktop, mobile, and Teams phones, as long as the user has the correct license and voice policy.

How do I test if Direct Routing is working?

Make a test call from a Teams user to an external number and check the SBC logs and Teams call analytics for success. Also test inbound calls.