Microsoft Teams Direct Routing: SIP Trunk Setup Guide | NetviaVoice

πŸ“ž Microsoft Teams Direct Routing: SIP Trunk Setup – Complete Guide

Summary: Microsoft Teams Direct Routing connects your existing SIP trunk infrastructure to Teams Phone System, enabling PSTN calling without Microsoft calling plans. This guide provides a step-by-step walkthroughβ€”from prerequisites and SBC configuration to domain verification, voice routing policies, and PowerShell commands. Whether you're an IT administrator or a telecom manager, this comprehensive guide ensures a successful Direct Routing deployment.

πŸ” What is Microsoft Teams Direct Routing?

Microsoft Teams Direct Routing is a feature that allows you to connect your existing telephony infrastructure to Microsoft Teams Phone System. It enables Teams users to make and receive Public Switched Telephone Network (PSTN) calls using your own carrier's SIP trunks while leveraging Teams as their primary communication client [citation:3][citation:6].

Unlike Microsoft Calling Plans (which provide PSTN connectivity directly from Microsoft), Direct Routing gives you full control over your telephony carrier, number management, and call routing. It's the preferred choice for organizations that:

βœ… Why Choose Direct Routing

  • Maintain existing carrier relationships and contracts
  • Keep current phone numbers with no porting required
  • Leverage competitive international calling rates from your carrier
  • Have complex call routing requirements [citation:4]
  • Need to connect multiple on-premises PBXs to Teams [citation:6]

⚠️ Key Considerations

  • Requires a certified Session Border Controller (SBC) [citation:6]
  • Requires Teams Phone System licensing (E5 or add-on) [citation:3][citation:8]
  • Requires in-house or partner expertise for SBC management
  • Not available for users in the "Islands" mode [citation:8]

πŸ’‘ Key Insight: Direct Routing is designed for organizations that already have voice infrastructure and want to integrate it with Teams. If you're starting fresh without an SBC or carrier contracts, Microsoft Calling Plans or Operator Connect may be simpler options [citation:3].

πŸ“‹ Prerequisites & Requirements

Before you begin, ensure you have the following prerequisites in place [citation:3][citation:8]:

RequirementDetails
Microsoft 365 TenantAn active Microsoft 365 or Office 365 tenant
Certified SBCA Session Border Controller from Microsoft's certified partners list [citation:6]
Public Trusted CertificateCertificate signed by a CA in the Microsoft Trusted Root Program; must include Server Authentication (EKU) [citation:3][citation:5]
Domain RegistrationA domain registered in your tenant (e.g., contoso.com) – *.onmicrosoft.com is not supported [citation:2][citation:8]
Public DNS RecordAn A record mapping the SBC FQDN to its public IP address [citation:3]
LicensesTeams Phone license (E5 or Phone System add-on) + Microsoft Teams license [citation:3][citation:8]
Firewall AccessOpen ports for SIP signaling (5061) and media to Microsoft FQDNs [citation:3]

⚠️ Important: The SBC FQDN domain name must match a domain registered in your tenant. The domain portion cannot be *.onmicrosoft.com. For example, if you have contoso.com registered, use sbc.contoso.com [citation:2][citation:9].

🌐 Step 1: Domain Setup & Verification

Before connecting your SBC, you must set up and verify the domain that will be used for the SBC FQDN [citation:1].

  • 1 Add the domain in Microsoft 365: Go to Settings β†’ Domains, click Add domain, and enter your domain (e.g., contoso.com) [citation:1].
  • 2 Verify the domain: Select Use this domain, then Add a TXT record and save the provided TXT value (e.g., MS=ms83401203) [citation:1].
  • 3 Complete verification: Add the TXT record to your public DNS, then return to Microsoft 365 and select Verify. Choose More Options β†’ Skip and do this later [citation:1].
  • 4 Create a user with the domain: Go to Users β†’ Active users, click Add a user, and enter a username with your verified domain (e.g., test@contoso.com). Assign a Microsoft 365 license with Phone System [citation:1].

πŸ’‘ Note: It may take up to 24 hours for the domain to be fully provisioned in your tenant after verification [citation:1].

πŸ”§ Step 2: Connect Your SBC to Direct Routing

You can connect your SBC using the Microsoft Teams Admin Center or PowerShell [citation:2][citation:9].

Method A: Microsoft Teams Admin Center

  • 1 Sign in to the Microsoft Teams Admin Center [citation:1].
  • 2 Go to Voice β†’ Direct Routing, then select the SBCs tab [citation:2].
  • 3 Click Add [citation:2].
  • 4 Enter the SBC FQDN (e.g., sbc.contoso.com) – the domain must match a registered tenant domain [citation:2].
  • 5 Configure settings: SIP signaling port (5061), enable Send SIP options for health monitoring, and set MaxConcurrentSessions [citation:1].
  • 6 Click Save [citation:2].

Method B: PowerShell

Connect to Teams PowerShell and use the New-CsOnlinePSTNGateway cmdlet [citation:2][citation:9]:

# Connect to Teams PowerShell Connect-MicrosoftTeams# Add the SBC gateway New-CsOnlinePSTNGateway -Fqdn sbc.contoso.com -SipSignalingPort 5061 -MaxConcurrentSessions 100 -Enabled $true

⚠️ Important: The SBC FQDN domain must match a verified domain in your tenant. The Get-Command *onlinePSTNGateway* command confirms the required cmdlets are available [citation:2][citation:9].

πŸš€ Need Expert Help with Direct Routing? NetviaVoice Can Assist

Our certified Teams consultants can handle your entire Direct Routing deploymentβ€”from SBC selection and configuration to voice routing policies and user enablement.

πŸ’¬ WhatsApp US
πŸ“ž +92 333 5908806 (Global)
🌐 Our Services
Visit NetviaVoice

πŸ“€ Step 3: Configure Voice Routing

Voice routing policies define how calls are routed from Teams users to the PSTN via your SBC [citation:4][citation:7].

Create PSTN Usage Records

  • 1 In the Teams Admin Center, go to Voice β†’ Direct Routing [citation:4].
  • 2 Select Manage PSTN usage records [citation:4].
  • 3 Click Add and create usage records (e.g., "US and Canada", "International") [citation:4].

Create Voice Routes

Voice routes map dialed number patterns to SBCs and PSTN usages [citation:4][citation:7]:

Route NameNumber PatternPrioritySBC(s)PSTN Usage
Redmond 1^\+1(425|206)(\d{7})$1sbc1.contoso.com, sbc2.contoso.comUS and Canada
Redmond 2^\+1(425|206)(\d{7})$2sbc3.contoso.com, sbc4.contoso.comUS and Canada
Other +1^\+1(\d{10})$3sbc5.contoso.com, sbc6.contoso.comUS and Canada

πŸ’‘ Pro Tip: Routes are tried in priority order. If the highest-priority SBC is unavailable, the system automatically falls back to the next SBC in the route [citation:4][citation:7].

Create and Assign Voice Routing Policies

A voice routing policy is a container for PSTN usage records. You can use the global policy or create custom policies [citation:4][citation:10].

# Create a voice routing policy using PowerShell New-CsOnlineVoiceRoutingPolicy -Identity "US Only" -OnlinePstnUsages "US and Canada"

πŸ‘€ Step 4: Enable Users & Assign Policies

Once your SBC and voice routes are configured, enable users for Direct Routing [citation:1][citation:5]:

  • 1 Enable Enterprise Voice: Set EnterpriseVoiceEnabled $true for the user [citation:5].
  • 2 Assign Voice Routing Policy: Grant the voice routing policy to the user [citation:4][citation:5].
  • 3 Set On-Premise Line URI: Specify the user's phone number in E.164 format (e.g., tel:+10001001008) [citation:5].
  • 4 Assign Calling Policy: Grant a calling policy that allows PSTN calls [citation:5].
  • 5 Assign Teams Upgrade Policy: Set the user to Teams mode [citation:5].
# Enable a user for Direct Routing Set-CsUser -Identity "user1@contoso.com" -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI "tel:+10001001008"# Assign voice routing policy Grant-CsOnlineVoiceRoutingPolicy -Identity "user1@contoso.com" -PolicyName "US Only"# Grant calling and upgrade policies Grant-CsTeamsCallingPolicy -Identity "user1@contoso.com" -PolicyName "AllowCalling"Grant-CsTeamsUpgradePolicy -Identity "user1@contoso.com" -PolicyName "UpgradeToTeams"

πŸ” Certificate Requirements

Your SBC certificate must meet specific requirements for Direct Routing [citation:3][citation:5]:

RequirementDetails
Certificate AuthorityMust be from a CA in the Microsoft Trusted Root Program [citation:3][citation:5]
Extended Key Usage (EKU)Must include Server Authentication [citation:3]
TLS VersionMust support TLS 1.2 [citation:9]
Cipher SuitesMust support TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 and others [citation:9]
Wildcard SupportWildcard certificates are supported [citation:5]

⚠️ Important: The certificate must be installed in the SBC's trusted root store. Microsoft service certificates use root CAs listed in the Azure Certificate Authority details page [citation:3].

πŸ“Š Direct Routing vs Microsoft Calling Plans

Understanding the differences helps you choose the right PSTN connectivity option:

FeatureDirect RoutingMicrosoft Calling Plans
CarrierYour own carrier or partnerMicrosoft's carrier
Number PortingKeep existing numbersPort numbers to Microsoft
International RatesYour carrier's ratesMicrosoft's rates
InfrastructureRequires SBCNo SBC required
Routing ControlFull controlLimited to Microsoft's routing
ComplexityHigherLower

πŸ† Direct Routing Best Practices

βœ… SBC Configuration

  • Set a maximum call limit on the SBC matching the MaxConcurrentSessions value [citation:9]
  • Configure SIP OPTIONS for health monitoring
  • Use multiple FQDNs (sip.pstnhub.microsoft.com, sip2, sip3) for failover [citation:3]
  • Open firewall ports for all Microsoft IP subnets [citation:3]

βœ… Voice Routing

  • Create multiple routes with different priorities for failover [citation:4]
  • Use specific number patterns rather than broad matches
  • Document all PSTN usage records and policies
  • Test routes with test users before full deployment

βœ… Security

  • Ensure TLS 1.2 is enabled on the SBC [citation:9]
  • Use certificates from trusted CAs [citation:3]
  • Implement strong encryption ciphers [citation:9]
  • Monitor for fraud and unauthorized usage

βœ… Management

  • Use PowerShell scripts for bulk user enablement [citation:4]
  • Regularly review voice routing policies [citation:10]
  • Test failover scenarios periodically
  • Maintain up-to-date documentation of the configuration

❓ Frequently Asked Questions

1. What is Microsoft Teams Direct Routing?

Direct Routing is a feature that allows you to connect your existing telephony infrastructure (SIP trunks and Session Border Controllers) to Microsoft Teams Phone System. It enables Teams users to make and receive PSTN calls using your own carrier while leveraging Teams as their primary communication client [citation:3][citation:6].

2. What are the prerequisites for setting up Direct Routing?

Key prerequisites include: a certified SBC, a Microsoft Teams Phone System license (E5 or Phone System add-on), a public trusted certificate for the SBC, a public DNS record mapping the SBC FQDN to its IP address, and a domain registered in your Microsoft 365 tenant [citation:3][citation:8].

3. How do I connect my SBC to Direct Routing?

You can connect your SBC using the Microsoft Teams Admin Center or PowerShell. In the Admin Center, go to Voice > Direct Routing > SBCs tab and click Add. In PowerShell, use the New-CsOnlinePSTNGateway cmdlet to pair the SBC. The SBC FQDN domain must match a registered domain in your tenant, excluding *.onmicrosoft.com [citation:2][citation:9].

4. What FQDNs are used for Direct Routing?

Direct Routing uses three FQDNs: sip.pstnhub.microsoft.com (primary), sip2.pstnhub.microsoft.com (secondary), and sip3.pstnhub.microsoft.com (tertiary). These provide geographic redundancy and failover capability. The SBC should be configured to try these in order [citation:3][citation:8].

5. What are the license requirements for Direct Routing?

Users require a Teams Phone license (included in E5 or available as an add-on for E3) and Microsoft Teams. Users with a Microsoft Calling Plan license can also use Direct Routing, with the calling plan serving as the default route when no voice routing policy matches [citation:3][citation:8].

πŸ“’ Ready to set up Direct Routing for Microsoft Teams? Let NetviaVoice guide your deployment.

Β© 2025 NetviaVoice β€” Microsoft Teams Direct Routing Experts, VoIP Solutions & Cloud Communications.

NetviaVoice provides SIP trunk services and Microsoft Teams integration support for businesses of all sizes.