Help Center
All integration guides

Connect Microsoft Teams Direct Routing to TelecomsXchange

Guide 18 of 285-minute readUpdated 23 October 2026

In short: Teams Direct Routing talks only TLS and SRTP to a Microsoft-certified SBC, so TelecomsXchange can't connect to Teams directly. Run an SBC such as AudioCodes Mediant or Ribbon: pair it with Teams using New-CsOnlinePSTNGateway, a PSTN usage, voice route and voice routing policy, and point its carrier side at sip01.telecomsxchange.com over UDP 5060, adding TECH_PREFIX and authenticating by IP or digest.

Teams to a purchased route, through your SBC
  1. Microsoft TeamsDirect Routing voice route
  2. then, TLS 5061, SRTP, +447700900123, Your certified SBCAudioCodes or Ribbon
  3. then, 80039#447700900123, TelecomsXchangesip01, UDP 5060
  4. Seller's routeThe route you purchased
On this page
  1. How does the call flow?
  2. Before you start
  3. How do I connect Teams to the SBC?
  4. How do I send calls to TelecomsXchange?
  5. How do I receive calls from TelecomsXchange?
  6. How do I receive calls on numbers I bought?
  7. How do I test it?
  8. What if something goes wrong?
  9. References
  10. Common questions

This guide connects Microsoft Teams Phone to TelecomsXchange with Direct Routing: Teams users call out through a purchased route, and numbers bought on TelecomsXchange ring in Teams. Teams never talks to TelecomsXchange directly; a certified SBC that you run sits between them. For the full list of TelecomsXchange values, see Connect a SIP platform.

Warning

Direct Routing requires TLS signalling and SRTP media between Teams and a Microsoft-certified SBC. TelecomsXchange supports SIP over UDP only, no TLS or SRTP, and does not accept REGISTER, so it can't be the Direct Routing endpoint. The SBC terminates TLS and SRTP towards Teams and talks plain SIP and RTP over UDP to TelecomsXchange.

How does the call flow?#

Leg From → to Transport Number format
Teams side Teams SIP proxies (sip.pstnhub.microsoft.com, sip2.pstnhub.microsoft.com, sip3.pstnhub.microsoft.com) ↔ your SBC's FQDN, for example sbc.contoso.com:5061 TLS, SRTP E.164 with +: +447700900123
Carrier side Your SBC, for example 203.0.113.10 ↔ sip01.telecomsxchange.com:5060 UDP, RTP Tech prefix + E.164 without +: 80039#447700900123

Before you start#

  • A SIP account with the SBC's public IP, for example 203.0.113.10, or a VoIP login and password from Edit Account → Add SIP Digest Auth.
  • A purchased route and its tech prefix from My Interconnections, for example 80039#.
  • An SBC on Microsoft's certified list for Direct Routing, with a public IP, an FQDN in a domain verified in your Microsoft 365 tenant (for example sbc.contoso.com), and a certificate from a public CA trusted by Microsoft.
  • Users with a Teams Phone licence, and Teams PowerShell (Install-Module MicrosoftTeams, then Connect-MicrosoftTeams).
  • Firewall rules for both sides: the Microsoft 365 signalling and media ranges (52.112.0.0/14, 52.122.0.0/15) on TLS 5061 and the SBC's media ports, and 174.136.44.213 on UDP 5060 and your RTP range.

How do I connect Teams to the SBC?#

Run these in Teams PowerShell. They're the minimum for one SBC and one route; see Microsoft's Direct Routing documentation for the full options.

  1. Add the SBC as a PSTN gateway:
Powershell
New-CsOnlinePSTNGateway -Fqdn sbc.contoso.com -SipSignalingPort 5061 `
  -MaxConcurrentSessions 100 -ForwardCallHistory $true -ForwardPai $true -Enabled $true

Use Set-CsOnlinePSTNGateway -Identity sbc.contoso.com … to change it later.

  1. Create a PSTN usage and a voice route that sends all numbers to the SBC:
Powershell
Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="TCXC"}
New-CsOnlineVoiceRoute -Identity "TCXC-All" -NumberPattern "^\+\d+$" `
  -OnlinePstnGatewayList sbc.contoso.com -OnlinePstnUsages "TCXC" -Priority 1
  1. Create a voice routing policy and grant it to users:
Powershell
New-CsOnlineVoiceRoutingPolicy -Identity "TCXC" -OnlinePstnUsages "TCXC"
Grant-CsOnlineVoiceRoutingPolicy -Identity user@contoso.com -PolicyName "TCXC"
  1. Give each user a Direct Routing number (one you bought on TelecomsXchange, below):
Powershell
Set-CsPhoneNumberAssignment -Identity user@contoso.com -PhoneNumber +14165551234 -PhoneNumberType DirectRouting

Check pairing with Get-CsOnlinePSTNGateway and, after a few minutes, the SBC's health in the Teams admin center → Voice → Direct Routing.

How do I send calls to TelecomsXchange?#

On the SBC, the carrier side is an ordinary UDP peer. The AudioCodes SBC and Ribbon SBC guides give the exact menus; the settings are:

SBC setting Value
Carrier peer (AudioCodes: Proxy Set and IP Group; Ribbon: SIP Server Table and Signaling Group) sip01.telecomsxchange.com, port 5060, transport UDP
Registration Off. TelecomsXchange is peering only
Keepalive (OPTIONS) Off. TelecomsXchange answers OPTIONS only within a call
Authentication Send from the SBC's IP authorised on the account, or answer the 401/407 challenge with VOIP_LOGIN and VOIP_PASSWORD (the account's VoIP Login and VoIP Password)
Media RTP, no SRTP; G.711 or G.729 as your route supports. TelecomsXchange doesn't transcode, so let the SBC transcode if Teams and the route share no codec
NAT The SBC's public IP in SIP and SDP on the carrier interface

Add the tech prefix in the number manipulation for calls from the Teams side to TelecomsXchange: remove the leading +, then add TECH_PREFIX in front. +447700900123 must leave the SBC as 80039#447700900123. Then add the routing rule: calls from the Teams IP Group (or signalling group) go to the TelecomsXchange one.

Tip

For several routes, add one manipulation and routing rule per destination prefix, each with its own tech prefix, or dial a routing group prefix such as 444101# and let TelecomsXchange choose.

How do I receive calls from TelecomsXchange?#

Calls come from 174.136.44.213 over UDP, from source ports 5060 to 5072, with the number in E.164 without +, such as 14165551234.

  1. On the SBC, classify 174.136.44.213 as the TelecomsXchange peer, and allow it on the firewall for UDP 5060 and the RTP range.
  2. Add a number manipulation for calls from TelecomsXchange to Teams that adds +, so 14165551234 reaches Teams as +14165551234.
  3. Route those calls to the Teams IP Group. Teams rings the user assigned that number with Set-CsPhoneNumberAssignment.

Selling routes that terminate in Teams isn't a use case for Direct Routing: Teams only rings numbers assigned to your own users.

How do I receive calls on numbers I bought?#

Set each number's SIP Endpoint (Primary) in DID Settings on TelecomsXchange to the SBC's carrier side, for example sip:14165551234@203.0.113.10:5060, and assign the same number, with +, to a Teams user, resource account (auto attendant or call queue) as a Direct Routing number.

How do I test it?#

  1. In Teams, call a number covered by the route from a user with the voice routing policy.
  2. On the SBC, follow the call in its trace tool (AudioCodes Syslog Viewer or Wireshark; Ribbon's Monitoring and trace logs): the TLS INVITE from Teams with +447700900123, then the UDP INVITE to 80039#447700900123 (or 80039%23447700900123) and TelecomsXchange's reply.
  3. In the TelecomsXchange portal, watch the call in Live Calls and find its SIP code in Logs → CDR (Voice).
  4. In the Teams admin center → Analytics & reports → PSTN usage report (Direct Routing tab), and in Call Quality Dashboard, check the Teams leg.

What if something goes wrong?#

You see What to do
SBC shows inactive in the Teams admin center TLS problem on the Teams side: certificate, FQDN not in a verified domain, or port 5061 blocked from Microsoft's ranges. This is between Teams and the SBC, not TelecomsXchange.
401 or 407 repeated, then the call fails The SBC isn't answering TelecomsXchange's challenge. Check the VoIP login and password in its account or authentication settings.
403 Forbidden The SBC's public IP isn't authorised and no credentials were sent. Compare with IP Address and Additional Allowed IPs on Edit Account; check balance.
404 Not Found Tech prefix missing or + still in the number. Check the outbound number manipulation in the SBC trace.
408 or 503 from TelecomsXchange The SBC can't reach sip01 on UDP 5060, or the route is blocked or failed. Check the firewall and My Interconnections.
One-way audio The SBC advertises a private IP on the carrier side, or RTP from 174.136.44.213 is blocked. Check NAT and media settings on the carrier interface.
Inbound calls don't ring in Teams No + on the number, the number isn't assigned with -PhoneNumberType DirectRouting, or 174.136.44.213 isn't classified to the TelecomsXchange peer.

References#

Common questions

Can Microsoft Teams register to TelecomsXchange?

No. TelecomsXchange is peering only and does not accept REGISTER. Teams doesn't connect to carriers at all: it pairs with your SBC, and the SBC peers with TelecomsXchange by IP or digest authentication.

Can Teams connect to TelecomsXchange without an SBC?

No. Direct Routing requires TLS for signalling and SRTP for media to a certified SBC with a public certificate. TelecomsXchange supports only SIP over UDP, so it can't be that endpoint.

Which SBC should I use?

Any SBC on Microsoft's certified list for Direct Routing. AudioCodes Mediant and Ribbon SBC SWe are common; see the AudioCodes and Ribbon guides for the carrier-side settings.

Where does the tech prefix go?

On the SBC, in the number manipulation for calls from Teams to TelecomsXchange. Teams sends +447700900123; the SBC sends 80039#447700900123 to sip01.

Can Microsoft Teams register to TelecomsXchange?
No. TelecomsXchange is peering only and does not accept REGISTER. Teams doesn't connect to carriers at all: it pairs with your SBC, and the SBC peers with TelecomsXchange by IP or digest authentication.
Can Teams connect to TelecomsXchange without an SBC?
No. Direct Routing requires TLS for signalling and SRTP for media to a certified SBC with a public certificate. TelecomsXchange supports only SIP over UDP, so it can't be that endpoint.
Which SBC should I use?
Any SBC on Microsoft's certified list for Direct Routing. AudioCodes Mediant and Ribbon SBC SWe are common; see the AudioCodes and Ribbon guides for the carrier-side settings.
Where does the tech prefix go?
On the SBC, in the number manipulation for calls from Teams to TelecomsXchange. Teams sends +447700900123; the SBC sends 80039#447700900123 to sip01.