Source record · tier 2 current vendor documentation
Plan for media bypass with Direct Routing
- Publisher
- Microsoft
- URL
- https://learn.microsoft.com/en-us/microsoftteams/direct-routing-plan-media-bypass
- Published
- 2026-09-10
- Updated
- unknown
- Accessed
- 2026-09-16
- HTTP status
- 200
- License
- not stated on page; Microsoft Learn Terms of Use apply; no-redistribution; short excerpts and locators only
Source notes citing this source
- With media bypass, clients send UDP/SRTP from source ports 50000-50019 to SBC-defined ports on the SBC's public IP, and the SBC sends back to client ports 50000-50019. in context
- Media bypass is supported with standalone Teams desktop clients, Android and iOS clients and Teams Phone devices; calls from other endpoints such as Teams web clients are automatically converted to non-bypass. in context
- Media bypass uses ICE on the Teams client and ICE Lite on the SBC. in context
- On a media-bypass trunk, Teams Media Processors are still inserted when a call escalates from 1:1 to a group call, goes to a federated Teams user, or is forwarded or transferred to a Skype for Business user. in context
- Even with media bypass, Media Processors are always in the media path for voice applications such as Call Park, auto attendants and call queues and for web clients, so the non-bypass Media Processor firewall requirements still apply. in context
- Media bypass is controlled per SBC with Set-CsOnlinePSTNGateway -MediaBypass set to true or false, and enabling it does not mean all media stays inside the corporate network. in context
- To pilot media bypass, Microsoft describes two trunks with different FQDNs on the same SBC, one with media bypass and one without, using different TLS signaling ports but the same media ports, a certificate covering both names (SAN or wildcard), and a separate online voice routing policy assigned to test users. in context
- For direct media with media bypass the Teams client must reach the SBC's public IP address even from the internal network; otherwise media can flow via Teams Transport Relays, and signaling always flows via the Microsoft cloud. in context
- With media bypass, Transport Relays reach the SBC from UDP ports 50000-59999, and the SBC must be able to send to relay ports 50000-59999 and 3478-3481 because Microsoft runs two relay versions (v4 on 50000-59999, v6 on 3478-3481). in context
- Media Processors are B2BUAs that can transcode (for example SILK to G.711), whereas Transport Relays only relay audio, so on bypassed calls the codec is never changed between the client and the SBC. in context
- For SIP/TLS, the Microsoft SIP Proxy connects to the SBC from source ports 1024-65535 to a destination port defined on the SBC, and the SBC connects to the SIP Proxy on port 5061. in context
- Teams Direct Routing media bypass keeps media between the SBC and the Teams client to shorten the media path and reduce hops. in context
- In Teams Direct Routing the Media Processor is a B2BUA that can transcode (for example SILK to G.711), whereas Transport Relays only relay audio and never change the codec. in context
- Teams Media Processors are always in the media path for voice applications such as Call Park, Auto Attendant and Call Queues, and for group escalation, federated calls and Teams web clients, even when the trunk has media bypass enabled. in context
- For direct bypass media, Teams clients must reach the SBC's public IP: UDP/SRTP from client ports 50000-50019 to ports defined on the SBC, and back. in context
- Media bypass keeps media between the SBC and the Teams client using ICE on the client and ICE Lite on the SBC, is set per SBC with Set-CsOnlinePSTNGateway -MediaBypass, and signaling still always flows through the Microsoft cloud. in context
- Even on a media bypass trunk, Microsoft media processors stay in the path for voice applications (call park, auto attendants, call queues), web clients, escalations to group calls, calls to federated Teams users and transfers to Skype for Business users. in context
- To pilot media bypass, Microsoft describes a second trunk FQDN on the same SBC with media bypass enabled, a different TLS signaling port, the same media ports, a certificate covering both names, and a separate voice routing policy for the test users. in context
- With media bypass, Teams Transport Relays send from ports 50000-59999 to the SBC, and the SBC must be able to reach relays on 50000-59999 and 3478-3481 because two relay versions are in use. in context
- The media bypass planning page lists only 52.112.0.0/14 as the media processor and transport relay range for Microsoft 365, Office 365 and GCC. disputed in context
- To trial media bypass, Microsoft describes two trunks with different FQDNs pointing to the same SBC (different TLS signaling ports, same media ports, a certificate covering both names) and a separate voice routing policy for test users. in context
- Media bypass is controlled per SBC with Set-CsOnlinePSTNGateway -MediaBypass; with bypass, media can flow directly between the Teams client and the SBC, but SIP signaling always flows through the Microsoft cloud. in context
- Teams Media Processors are always in the media path for voice applications such as Call Park, auto attendants and call queues, even when the trunk uses media bypass. in context
- Media bypass keeps media between the SBC and the client instead of sending it via Microsoft Teams Phone, and to configure it the SBC and the client must be in the same location or network. in context
- For direct media between a Teams client and the SBC, UDP/SRTP is required on destination ports 50000-50019 at the SBC, whereas media to and from Microsoft Media Processors uses 3478-3481 and 49152-53247. in context
- Media bypass is supported with standalone Teams desktop clients, Android and iOS clients and Teams Phone devices; for other endpoints that don't support media bypass, including Skype for Business 3PIP phones and WebRTC-based web clients, the call is converted to non-bypass automatically. in context
- Media bypass uses ICE on the Teams client and ICE Lite on the SBC, and Microsoft points readers to RFC 5245 for those protocols. in context
- Teams Transport Relays have two versions - v4 requiring port range 50000 to 59999 and v6 working with 3478 to 3481 - and Microsoft recommends at least two ports per concurrent call on the SBC. in context
- To move from non-media bypass to media bypass while confirming functionality first, Microsoft documents creating a second trunk with a different FQDN pointing at the same SBC, with different TLS SIP signalling ports, a separate Online Voice Routing policy, and that policy assigned only to identified pilot users. in context
- Media bypass is controlled per SBC with the Set-CSOnlinePSTNGateway command and the -MediaBypass parameter set to true or false, and enabling it does not mean all media traffic stays within the corporate network. in context
- Media Processors are always in the media path for non-bypassed end-user calls and always in the media path for voice applications such as Call Park, Organizational Auto Attendant and Call Queues, and never in the path for bypassed end-user calls. in context
- Media Processors are a B2BUA and can transcode (for example SILK from the Teams client to G.711 toward the SBC), while Transport Relays are not a B2BUA and never change the codec between the client and the SBC even when traffic flows via relays. in context
- For direct bypass media, Teams clients use source ports 50000-50019 toward the SBC; for relayed bypass media, Transport Relays use 50000-59999 (v4 relays) and 3478-3481 (v6 relays). in context
- Media bypass is enabled per SBC with Set-CsOnlinePSTNGateway -MediaBypass; with bypass, media runs between the Teams client and the SBC using ICE on the client and ICE Lite on the SBC, but signaling always flows through the Microsoft cloud. in context
- Media Processors are always in the media path for voice applications such as Call Park, auto attendants and call queues, and for Teams web clients, even on trunks configured for media bypass. in context
- For direct bypass media, the Teams client must be able to reach the SBC's public IP address, even from the internal network, with client UDP/SRTP ports 50000-50019 to and from SBC-defined ports. in context
- Media bypass is supported on standalone Teams desktop clients, Android and iOS clients and Teams Phone devices; calls on other endpoints such as Teams web clients are converted to non-bypass automatically. in context
- Media bypass keeps media between the SBC and the Teams client using ICE on the client and ICE Lite on the SBC, signaling still always flows through the Microsoft cloud, and it is switched per SBC with Set-CsOnlinePSTNGateway -MediaBypass $true or $false. in context
- Even on a media-bypass trunk, Teams Media Processors stay in the media path for voice applications (Call Park, auto attendants, call queues), web clients, calls escalated from 1:1 to group, calls to federated Teams users and forwards or transfers to Skype for Business users. in context
- When the client cannot reach the SBC directly, bypass media goes through Teams Transport Relays in 52.112.0.0/14 (commercial), which send from ports 50000-59999 to the SBC and receive from the SBC on 50000-59999 and 3478-3481. in context
- To trial media bypass, Microsoft describes two trunks with different FQDNs on the same SBC and public IP, one with bypass enabled, using different TLS signaling ports but the same media ports, a certificate covering both names (two SANs or a wildcard) and a separate online voice routing policy for test users. in context
- In a bypassed Direct Routing call the Media Processor is never in the path, so the client and SBC must share a codec directly because no Microsoft component transcodes. inferred in context
- The Teams Media Processor is a B2BUA that can transcode (for example SILK toward the client and G.711 toward the SBC), whereas Transport Relays never change the codec between client and SBC. in context
- Media Processors are always in the media path for Teams voice applications such as Call Park, Auto Attendant and Call Queues, and for web clients, even on media-bypass trunks. in context
- Media bypass is controlled per SBC with the -MediaBypass parameter of Set-CsOnlinePSTNGateway. It uses ICE on the Teams client and ICE Lite on the SBC, and signaling always flows through the Microsoft cloud. in context
- With media bypass, Teams clients send media to the SBC's public IP from UDP source ports 50000–50019. Transport Relays use 50000–59999 (v4 relays) and 3478–3481 (v6 relays) toward the SBC. in context
- GCC High uses the single Direct Routing FQDN sip.pstnhub.gov.teams.microsoft.us (52.127.88.0/21), and DoD uses sip.pstnhub.dod.teams.microsoft.us (52.127.64.0/21). Neither has secondary or tertiary FQDNs. in context
- The media bypass planning article lists only 52.112.0.0/14 as the Media Processor and Transport Relay IPv4 range for Office 365 and GCC. disputed in context
- Even on media-bypass trunks, Teams Media Processors are always in the media path for voice applications such as Call Park, Auto Attendant and Call Queues, and for web clients. in context
- For direct bypass media the Teams client must reach the SBC's public IP address, with UDP/SRTP between client ports 50000 to 50019 and the media ports defined on the SBC. in context
- Media bypass is supported on standalone Teams desktop clients, Android and iOS clients and Teams Phone devices, and calls on other endpoints such as Teams web clients and Skype for Business 3PIP phones are automatically converted to non-bypass. in context
- Even on a bypass trunk, Media Processors stay in the media path for voice applications such as Call Park, auto attendants and call queues, for web clients, and when a call escalates to a group call, goes to a federated Teams user or is transferred to a Skype for Business user. in context
- Media bypass is controlled per SBC with Set-CsOnlinePSTNGateway -Identity <FQDN> -MediaBypass set to $true or $false. in context
- Microsoft's recommended phased migration to media bypass creates a second trunk with a different FQDN on the same SBC, using a different TLS signaling port but the same media ports, and a separate online voice routing policy assigned to test users. in context
- When bypass media flows through Teams Transport Relays (52.112.0.0/14 in commercial and GCC), relay-to-SBC traffic uses source ports 50000 to 59999 and SBC-to-relay traffic uses destination ports 50000 to 59999 and 3478 to 3481. in context
- SIP/TLS from the SBC to the Microsoft SIP proxy uses destination port 5061. Traffic from the proxy to the SBC uses the port configured on the SBC, from source ports 1024 to 65535. in context
- When two trunks share one SBC, the SBC certificate must cover both FQDNs, either as two SAN names or with a wildcard certificate. in context
- Direct media between client and SBC is UDP/SRTP with client ports 50000-50019 and SBC ports defined on the SBC, in both directions; if a network device translates client source ports, the translated ports must be opened towards the SBC. in context
- For media bypass the Teams client must be able to reach the SBC's public IP address even from the internal network; Microsoft notes hairpinning can be configured on the NAT device so that traffic never leaves enterprise network equipment. in context
- Media bypass is supported on standalone Teams desktop clients, Android and iOS clients and Teams Phone devices; calls on other endpoints, including Teams web clients and Skype for Business 3PIP phones, are automatically converted to non-bypass. in context
- With media bypass, Direct Routing media is kept between the SBC and the Teams client instead of passing through Microsoft Teams Phone, and Microsoft states the SBC and client must be in the same location or network for it to apply. in context
- Microsoft recommends not exposing the SBC public IP to external clients and instead opening it only to the Microsoft cloud so external users' bypassed media is relayed by Teams Transport Relays; letting external clients reach the SBC public IP directly is listed as not recommended. in context
- Media bypass uses ICE on the Teams client and ICE Lite on the SBC to find the most direct media path. in context
- Even on a bypass trunk, Media Processors are always inserted when a call escalates from 1:1 to a group call, goes to a federated Teams user, or is forwarded or transferred to a Skype for Business user. in context
- Media Processors are never in the media path for bypassed end-user calls but are always in the path for voice applications such as Call Park, Auto Attendant and Call Queues, and for Teams web clients. in context
- Media bypass is controlled per SBC with Set-CsOnlinePSTNGateway and the -MediaBypass parameter set to true or false; enabling it does not mean all media stays inside the corporate network. in context
- Microsoft's media bypass planning page lists both 52.112.0.0/14 and 52.120.0.0/14 in its Media Processor and Transport Relay summary and as the subnets the pstnhub signaling FQDNs resolve to, but its Transport Relay and Media Processor port-requirement sections for Microsoft 365, Office 365 and GCC list 52.112.0.0/14 only. in context
- For bypassed calls relayed by Teams Transport Relays, the SBC must allow UDP/SRTP from relays on source ports 50000-59999 and send to relays on 50000-59999 and 3478-3481, because relay version v4 uses only 50000-59999 and v6 uses 3478-3481. in context
- Transport Relays for bypassed calls use the same ranges as Media Processors: 52.112.0.0/14 for Microsoft 365, Office 365 and GCC, 52.127.88.0/21 for GCC High and 52.127.64.0/21 for DoD. in context
- Transport Relays are in the path of a bypassed end-user call only when the client cannot reach the SBC on its public IP address, and because relays are not B2BUAs the codec is never changed between client and SBC. in context
- To trial media bypass, Microsoft describes creating a second trunk with a different FQDN on the same SBC with media bypass enabled, using a different TLS signaling port but the same media ports, then a new Online Voice Routing Policy routing to that trunk assigned to the test users. in context
- With media bypass, SIP signaling always flows via the Microsoft cloud; only media takes the direct path. in context
- For direct media between the Teams client and the SBC, the client uses UDP/SRTP ports 50000-50019 and must reach the media ports defined on the SBC. in context
- Media bypass is controlled per SBC with Set-CsOnlinePSTNGateway and its -MediaBypass parameter set to true or false. in context
- For media bypass the Teams client must have access to the public IP address of the SBC even from an internal network, and hairpinning can be configured on the NAT device so that traffic never leaves the enterprise network equipment. in context
- With media bypass enabled in normal operation, SIP signaling still always flows via the Microsoft cloud; only media stays local. in context
Cite this source record
APA
WarmTransfer. (2026, September 10). Plan for media bypass with Direct Routing. WarmTransfer. https://warmtransfer.net/knowledge/sources/ms-learn-dr-media-bypass
BibTeX
@misc{warmtransfer-ms-learn-dr-media-bypass,
title = {Plan for media bypass with Direct Routing},
author = {{WarmTransfer}},
year = {2026},
url = {https://warmtransfer.net/knowledge/sources/ms-learn-dr-media-bypass},
note = {Microsoft, accessed 2026-09-16}
}