MSBA-230 · Lesson 4 of 12 · 19 min

Direct Routing and session border controllers

▶ Video coming soon A video version of this lesson is on the way.

Direct Routing was the part of the design that worried Ines. She had spent years in hospital IT, where telephony servers lived in a locked room and failed at three in the morning. Ludovica's job in the fourth workshop was to show exactly what Corvallin would and would not be responsible for, and why Direct Routing was needed at all when Operator Connect handled the ordinary desk users.

The answer was the short list from Felix's inventory: five fax machines, two door intercoms and a satellite office with an unreliable internet link. None of those could be served by a cloud option alone. This lesson explains how Direct Routing works, what an SBC does, how it connects to Teams, and how the pieces are configured.

The architecture

In Direct Routing, Teams connects to the PSTN through a session border controller (SBC) that the organization or a partner manages. On one side, the SBC connects to Microsoft's SIP proxy over the internet using SIP over TLS. On the other side, it connects to one or more carrier trunks, to analog gateways, or to another phone system. Calls from a Teams user to a phone number go from the Teams client to Microsoft, from Microsoft to the SBC, and from the SBC to the carrier. Incoming calls take the reverse path.

Signaling and media can follow different paths. The SIP signaling always goes between Microsoft's SIP proxy and the SBC. The audio, called the media, can either flow through Microsoft's media processors, or, with media bypass, flow directly between the Teams client and the SBC when they can reach each other. Media bypass shortens the path, keeps audio inside the building when the user and the SBC are on the same network, and is required for some features, including the Survivable Branch Appliance covered in lesson 10.

Direct Routing architecture. A Teams client sends signaling to the Microsoft SIP proxy in the cloud. The SIP proxy connects over SIP TLS to the session border controller. The SBC connects to the carrier trunk, to analog gateways for fax and door intercoms, and optionally to a legacy phone system. With media bypass, audio flows directly between the Teams client and the SBC; without it, audio passes through Microsoft media processors.
Signaling always goes through Microsoft's SIP proxy; media can bypass the cloud when the client can reach the SBC.

What an SBC does

An SBC is a specialized SIP device. It terminates the TLS connection with Microsoft, translates between the SIP dialects of Microsoft and the carrier, manipulates numbers so that each side receives the format it expects, transcodes audio between codecs when needed, enforces security such as allowed IP addresses and call rate limits, and keeps statistics. It can run as a physical appliance, a virtual machine on site, or a virtual appliance in a public cloud.

Microsoft only supports SBCs that are certified for Direct Routing, and only on the firmware versions listed as certified. Vendors such as AudioCodes, Ribbon and Oracle publish configuration guides for Teams. Corvallin would not buy one: Northlight would run two certified SBC instances in a cloud region as a managed service, and install one small certified SBC at the satellite office.

What the SBC needs

Before an SBC can talk to Teams, several things have to be in place. The SBC needs a public fully qualified domain name (FQDN) in a domain that is registered and verified in the Microsoft 365 tenant, such as sbc1.voice.corvallincare.example. It needs a public IP address reachable from Microsoft, and firewall rules allowing SIP signaling to Microsoft's SIP proxy addresses and media to the ranges Microsoft publishes. It needs a certificate from a public certificate authority that Microsoft trusts, matching its FQDN, and it must trust the certificate authorities that sign Microsoft's SIP interface.

That last point caused work in 2026. Microsoft moved the certificates on its Direct Routing SIP interface to new root certificate authorities, announced in December 2025 and rolled out in production during July 2026, after a testing endpoint was offered so that operators of SBCs could check that their devices trusted the new roots. SBCs that did not have the new roots in their trust store would have stopped connecting. Northlight had updated its customers' SBCs in the spring, and Ludovica used the episode to explain why Direct Routing needs someone watching Microsoft's announcements.

RequirementCorvallin design
SBC certified for Direct RoutingTwo cloud-hosted instances run by Northlight, plus one small appliance at the satellite office
FQDN in a verified tenant domainsbc1 and sbc2.voice.corvallincare.example; sba1 for the satellite appliance
Public certificate trusted by MicrosoftIssued by a public CA; renewal tracked by Northlight
Trust of Microsoft's SIP interface rootsNew 2026 roots installed in the spring
Firewall rulesSIP signaling to Microsoft's SIP proxy; media to Microsoft's published ranges
Carrier trunkA small trunk from Tidelink for the analog gateways and the satellite office

Pairing the SBC with Teams

In Teams, an SBC is represented as an online PSTN gateway. Pairing means creating the gateway in the Teams admin center, under Voice, then Direct Routing, or with PowerShell using New-CsOnlinePSTNGateway. The gateway's identity is the SBC's FQDN, and its settings include the SIP signaling port, whether media bypass is used, the maximum number of concurrent sessions, whether it forwards call history and, in a newer setting, whether it uses IPv4 or IPv6 when media bypass is not used.

Once the gateway is created and enabled, Microsoft's SIP proxy starts sending SIP OPTIONS messages to the SBC, and the SBC sends its own OPTIONS to Microsoft. These keep-alive messages are how each side knows the other is healthy. If OPTIONS stop flowing, Microsoft marks the gateway as unavailable and stops routing calls to it. The Teams admin center's SBC health dashboard shows the TLS connection status, OPTIONS status and the effectiveness of calls for each SBC.

Creating an online PSTN gateway. The SBC side must also be configured, following the vendor's guide.
# Pair a Direct Routing SBC with the tenant (fictional names)
New-CsOnlinePSTNGateway -Identity sbc1.voice.corvallincare.example `
    -SipSignalingPort 5061 -Enabled $true `
    -MediaBypass $true -MaxConcurrentSessions 40 -ForwardCallHistory $true
# Check the gateways and their settings
Get-CsOnlinePSTNGateway | Select-Object Identity, Enabled, MediaBypass, SipSignalingPort

Analog devices and other phone systems

Direct Routing can connect devices that Teams cannot run. An analog telephone adapter or analog gateway converts between analog lines and SIP, so a fax machine or a door intercom plugs into the gateway and the gateway registers with the SBC. Calls from the device go to the SBC, which routes them to the carrier or to a Teams user. Microsoft supports this model and lets administrators manage analog devices as part of Direct Routing.

Fax over IP works, but it is fragile. Fax is sensitive to delay and to compression, so it needs the right codec settings and often the T.38 fax protocol on the gateway and the carrier trunk. Ludovica was frank: if the pharmacies and hospitals would accept referrals by secure email or a portal, retiring the fax machines would be better than moving them. Dr. Ostrander-Bey agreed to ask the two hospitals that still required fax, but the machines had to keep working in the meantime.

An SBC can also connect to an existing phone system during a migration. Many organizations move to Teams in phases, with Teams users and old-system users calling each other through the SBC until the last site moves. Corvallin did not need this, because head office had already moved and the branches would move in one phase per branch through Operator Connect, but the option is part of the exam.

Managed Direct Routing

Direct Routing does not have to mean owning hardware. Many partners run SBCs as a service, either hosted in a cloud region or in their own data centers, and handle certificates, firmware, monitoring and carrier trunks. The organization still configures Teams: the gateway objects, the routing policies and the user assignments are in its tenant. Corvallin's contract with Northlight covered the SBC instances, certificates, firmware updates, monitoring with alerts to Felix, and a four-hour response for outages. Felix kept the Teams side, because he wanted the routing logic documented in Corvallin's own change records.

Worked problem

Gateway shows no OPTIONS

Northlight brings sbc2 online for testing. In the SBC health dashboard, the TLS connection to sbc2 is active, but the OPTIONS status shows a warning that no OPTIONS have been received from the SBC. Calls routed to sbc2 fail. What should be checked?

Show solution
  1. Confirm that the gateway object in Teams has the same FQDN the SBC uses in its Contact header.
  2. Confirm that the SBC is configured to send OPTIONS to Microsoft's SIP proxy, with its own FQDN in the Contact header, not its IP address.
  3. Check the SBC's certificate: it must match the FQDN and be trusted by Microsoft.
  4. Check the domain: the FQDN must be in a domain verified in the tenant.

Answer: Ludovica found that sbc2 was sending OPTIONS with its IP address in the Contact header. Microsoft could not match the messages to the gateway. After she set the FQDN in the SBC configuration, OPTIONS were received within minutes and the gateway became available.

Redundancy

A single SBC is a single point of failure. Microsoft's SIP proxy runs in several regions, and a well-designed Direct Routing deployment has at least two SBCs, or two instances of a hosted SBC, so that calls can fail over. In Teams, failover is expressed in the voice routes covered in lesson 5: a route can list several gateways, and Teams tries them in turn if one is unavailable. On the carrier side, the SBCs need their own redundant trunks.

Corvallin's analog devices were the exception. A fax machine in the East Branch plugs into one analog gateway in that building, so if the gateway fails, the fax fails. Northlight would keep a spare gateway at head office, preconfigured, so that Felix could courier it to a branch the same day. Ludovica described this as matching the redundancy to the importance of the service: the fax machines were important but not urgent, and a spare on a shelf was enough.

Who sees what

Because the routing configuration lives in Corvallin's tenant and the SBCs live in Northlight's platform, both sides needed visibility. Felix gave Northlight's engineers a scoped Teams administrator role through PIM, limited to voice, and Northlight gave Felix read-only access to its SBC monitoring portal. Every change on either side went through Corvallin's change log, so that an incident review could see what had changed and when.

Certificates and names

Every SBC paired with Direct Routing needs a fully qualified domain name in a domain that the Microsoft 365 tenant has verified, and a certificate for that name issued by a public certificate authority that Microsoft trusts. Teams uses the name to find the SBC and the certificate to confirm it is talking to the right device. Self-signed certificates and private authorities are not accepted. When Microsoft changes the root certificates it uses, as it did for Direct Routing during 2026, SBCs must trust the new roots before the change or calls stop. Certificate expiry is one of the most common causes of a sudden, complete Direct Routing outage, which is why Northlight puts every SBC certificate on a renewal calendar with reminders sixty and thirty days ahead.

Codecs and media

A codec turns sound into data and back. Teams prefers its own wideband codecs between Teams clients, and the SBC negotiates codecs that the carrier supports, such as G.711 for standard telephone quality. When the SBC sits between two networks that prefer different codecs, it may transcode, converting audio from one to the other, which uses processing power and can add delay. Ludovica's advice was to let the SBC vendor's Teams configuration guide set the codecs, and to change them only when a specific problem needs it.

Choosing an SBC

Microsoft certifies SBC models for Direct Routing and publishes the list with the firmware versions tested. An uncertified SBC may work, but Microsoft support can ask you to reproduce a problem on a certified one. When choosing, Felix's checklist was: certified for Direct Routing and, if needed, for Local Media Optimization and SBA; available as a virtual appliance or cloud-hosted; supported by a partner with Canadian hours; able to connect the analog devices at the satellite office; and with clear licensing for sessions, so the number of concurrent calls could grow without a new device.

For Corvallin, the satellite office's SBC would be hosted by Tidelink in its data center, with Northlight managing the configuration. That kept Corvallin out of patching SBCs, which none of its IT staff had done before, while giving Felix read access to the SBC health dashboard in the Teams admin center.

Common mistakes

  • MistakeUsing an SBC model or firmware that is not certified for Direct Routing.

    InsteadUse a certified SBC on a certified firmware version.

  • MistakeGiving the SBC an FQDN in a domain that is not verified in the tenant.

    InsteadRegister the SBC's domain in Microsoft 365 before pairing.

  • MistakeIgnoring Microsoft's certificate announcements.

    InsteadKeep the SBC's trust store current with Microsoft's SIP interface roots.

  • MistakeTreating fax over IP as an ordinary call.

    InsteadPlan codecs and T.38, test with every fax partner, or retire fax.

Summary and key terms

  • Direct Routing connects Teams to carriers, analog gateways or other phone systems through a certified SBC.
  • Signaling goes through Microsoft's SIP proxy; media can bypass the cloud with media bypass.
  • The SBC needs an FQDN in a verified domain, a trusted public certificate and firewall rules.
  • In Teams, an SBC is an online PSTN gateway created in the admin center or with New-CsOnlinePSTNGateway.
  • SIP OPTIONS keep the gateway healthy; the SBC health dashboard shows their status.
  • Partners can run SBCs as a managed service; the routing configuration stays in the tenant.
SIP proxy
Microsoft's cloud service that exchanges SIP signaling with Direct Routing SBCs.
Media bypass
Sending call audio directly between the Teams client and the SBC instead of through Microsoft's media processors.
Online PSTN gateway
The Teams object that represents a paired SBC.
SIP OPTIONS
Keep-alive messages exchanged between the SBC and Microsoft to confirm health.
Carrier trunk
A SIP connection from the SBC to a phone carrier.
Analog telephone adapter
A device that connects analog phones or fax machines to a SIP system.
T.38
A protocol for sending fax reliably over IP networks.
FQDN
A fully qualified domain name, such as sbc1.voice.example.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. What does Teams call a paired SBC?

    Show answer

    An online PSTN gateway.

  2. Which messages keep the connection between the SBC and Microsoft healthy?

    Show answer

    SIP OPTIONS messages.

  3. Why did Corvallin need Direct Routing at all?

    Show answer

    For analog fax and intercom devices and for survivability at the satellite office.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz