Configuring SBC Connectivity
Earn 25 points (50 with Pro) in two steps
- ① Read through the lesson — each section gets a ✓ as you scroll through it.
- ② When every section has a ✓, tap Complete lesson.
0 of 11 read · keep scrolling
✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro
Configuring SBC Connectivity for Microsoft Teams Direct Routing
Introduction to Direct Routing and SBC Connectivity
In the landscape of modern enterprise communications, Microsoft Teams Phone has become the primary hub for collaboration. While Microsoft provides its own calling plans, many organizations find that they require more flexibility, specific geographic coverage, or the ability to retain existing telephony contracts. This is where Direct Routing comes into play. Direct Routing allows an organization to connect their own Session Border Controller (SBC) to the Microsoft Phone System, essentially bridging the gap between the public switched telephone network (PSTN) and the cloud-based Teams environment.
Configuring the connection between your Session Border Controller and Microsoft Teams is arguably the most critical technical step in your telephony deployment. If this connection is misconfigured, your users will experience dropped calls, one-way audio, or complete failures in call routing. Understanding how to establish, secure, and maintain this connection is essential for any voice engineer or IT administrator tasked with managing a Teams Phone environment. In this lesson, we will dive deep into the technical requirements, the configuration steps, and the best practices for ensuring a stable SBC-to-Teams link.
Not read yet
Understanding the Role of the Session Border Controller
The Session Border Controller (SBC) acts as the intermediary between your local telephony infrastructure (like an on-premises PBX or a SIP trunk from a service provider) and the Microsoft Teams cloud. It is a specialized networking device or software application that handles signaling and media traffic. Think of it as a sophisticated translator and security guard combined into one unit. It ensures that the signaling protocols (SIP) and the media streams (RTP) from your local carrier are translated into a format that Microsoft Teams can understand and process.
The SBC is responsible for several key functions that are vital to the health of your voice network. First, it handles security by acting as a firewall, protecting your internal network from malicious traffic coming from the outside world. Second, it performs protocol normalization, which is the process of adjusting SIP headers to ensure compatibility between disparate systems. Finally, it manages the media flow, ensuring that even if your internal network is behind a NAT (Network Address Translation) device, the audio packets reach their destination correctly.
Callout: Why the SBC is the Heart of Direct Routing Unlike Microsoft’s Calling Plans, which are entirely managed by Microsoft, Direct Routing places the responsibility of the PSTN connection squarely on your shoulders. The SBC is the gatekeeper; if the gatekeeper is not configured correctly, the entire communication chain breaks. Because you own the SBC, you have full control over routing policies, number manipulation, and security, but you also inherit the burden of troubleshooting connectivity issues directly with your carrier or your own infrastructure.
Not read yet
Prerequisites for SBC Connectivity
Before you attempt to configure your SBC, you must satisfy several prerequisites. Without these in place, the configuration will not succeed, and you will likely encounter errors during the connection testing phase.
1. Public IP Address and FQDN
Your SBC must have a dedicated public-facing IP address. This address must be static and reachable by Microsoft’s data centers. Furthermore, you need a Fully Qualified Domain Name (FQDN) for your SBC. This FQDN must be registered in your public DNS and must resolve to the public IP address of your SBC.
2. Digital Certificates
Security is non-negotiable when dealing with voice traffic. Microsoft requires that the connection between your SBC and their cloud be encrypted using TLS (Transport Layer Security). You must obtain a certificate from a trusted public Certificate Authority (CA). Microsoft maintains a list of supported root certificate authorities. You cannot use self-signed certificates for production environments, as the connection will be rejected by the Teams service.
3. Firewall Configuration
Your organization’s firewall must be configured to allow traffic to and from Microsoft’s specific IP ranges and ports. Microsoft uses specific ranges for signaling (SIP) and media (RTP). If your firewall blocks these ports, your signaling will fail, or your users will experience "one-way audio" where they can hear the other party, but the other party cannot hear them.
Tip: Keeping Up with Microsoft’s IP Ranges Microsoft frequently updates its IP ranges for Teams. It is highly recommended to use an automated script or a service that monitors the official Microsoft 365 IP address and URL web service to ensure your firewall rules stay up to date. Relying on manual updates is a recipe for an outage.
Not read yet
Step-by-Step Configuration of the SBC Connection
Configuring the connection involves actions on two fronts: the SBC itself and the Microsoft Teams admin portal (or PowerShell). We will focus on the PowerShell approach, as it is the standard for professional deployments.
Step 1: Preparing the SBC
On your SBC (whether it is an Audiocodes, Ribbon, Oracle, or another certified vendor), you must perform the following:
- Configure the SIP Interface: Define the listening port for signaling, which is typically 5061 for TLS.
- Configure the Media Interface: Define the ports for RTP traffic, usually a range like 49152 through 53247.
- Install the Certificate: Import the public certificate and the corresponding private key into the SBC’s certificate store.
- Define the Peer: Create a "SIP Peer" or "Trunk Group" that points to the Microsoft Teams FQDNs (
sip.pstnhub.microsoft.com,sip2.pstnhub.microsoft.com, andsip3.pstnhub.microsoft.com).
Step 2: Configuring Teams via PowerShell
Once the SBC is prepared, you must inform Microsoft Teams that a new SBC is ready to connect. You will use the New-CsOnlinePSTNGateway cmdlet.
# Establish a connection to the Microsoft Teams service
Connect-MicrosoftTeams
# Create the gateway configuration for your SBC
New-CsOnlinePSTNGateway -Identity "sbc.yourdomain.com" `
-SipSignalingPort 5061 `
-MaxConcurrentSessions 1000 `
-Enabled $true
Explanation of the Parameters:
- Identity: This is the FQDN of your SBC. It must match the common name or subject alternative name (SAN) on the certificate installed on the SBC.
- SipSignalingPort: This is the port you configured on the SBC to listen for incoming SIP traffic.
- MaxConcurrentSessions: This limits the number of simultaneous calls through this gateway to prevent overwhelming your bandwidth.
- Enabled: This boolean flag ensures the gateway is ready to accept traffic immediately.
Not read yet
Advanced Routing: Voice Routing Policies
Once the SBC is connected, it is essentially a "pipe." To make it useful, you must define how calls are routed through that pipe. This is done via Voice Routing Policies.
A Voice Routing Policy consists of two parts:
- PSTN Usages: These act as containers for your routing logic.
- Voice Routes: These define the specific number patterns (using regex) that should be sent to a specific SBC.
Creating a PSTN Usage and Route
# Create a new PSTN Usage
Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="US_Domestic"}
# Create a Voice Route associated with that usage
New-CsOnlineVoiceRoute -Identity "US_Route" `
-NumberPattern "^\+1(\d{10})$" `
-OnlinePstnGatewayList "sbc.yourdomain.com" `
-Priority 1 `
-OnlinePstnUsages "US_Domestic"
In this example, the NumberPattern regex ^\+1(\d{10})$ targets any North American number starting with +1 followed by 10 digits. Whenever a user dials such a number, the Teams cloud checks the user's assigned policy, sees the "US_Domestic" usage, and routes the call to the specified SBC.
Callout: Understanding Regex in Voice Routing Regular Expressions (Regex) are the backbone of voice routing. The pattern
^\+1(\d{10})$means: "Start at the beginning of the string (^), look for a literal+1, followed by exactly 10 digits (\d{10}), and end the string ($)." Mastering basic regex is essential for troubleshooting why a call might be failing to route; if your pattern is too restrictive, valid calls will be dropped.
Not read yet
Security Best Practices for SBC Connectivity
Because the SBC is an exposed point of entry, you must implement strict security measures. A common mistake is to leave the SBC open to the entire internet.
1. Access Control Lists (ACLs)
Your SBC should only accept SIP signaling traffic from Microsoft’s known IP ranges. By restricting incoming traffic to these specific IPs, you prevent attackers from attempting to register unauthorized devices or perform toll fraud against your SBC.
2. SIP Registration Hardening
Ensure that your SBC is not configured to allow public SIP registrations. Only your internal PBX or the Microsoft Teams service should be allowed to send calls to your SBC. Disable any "anonymous" call acceptance unless it is specifically required by your business model.
3. Monitoring and Logging
SBCs generate a wealth of logs. You should configure your SBC to export these logs to a central Syslog server or a SIEM (Security Information and Event Management) system. Monitor for spikes in failed authentication attempts, which may indicate a brute-force attack on your SIP trunk.
Not read yet
Common Pitfalls and Troubleshooting
Even with careful configuration, issues will arise. Here is how to handle the most common scenarios.
Scenario 1: One-Way Audio
This is almost always caused by NAT or firewall misconfiguration. If the SBC is behind a NAT, it must be configured to include its public IP address in the SIP SDP (Session Description Protocol) headers. If the SBC sends its private internal IP address in the SIP INVITE, the Teams client will attempt to send audio to an unreachable private address, resulting in silence.
- The Fix: Check your SBC "NAT Traversal" or "Topology Hiding" settings to ensure the public IP is being correctly advertised.
Scenario 2: TLS Handshake Failures
If you see errors related to TLS, it usually means the SBC and the Microsoft cloud cannot agree on a certificate.
- The Fix: Ensure that the root CA of your certificate is on the Microsoft Supported List. Also, verify that the FQDN in your SBC configuration matches the FQDN in the certificate exactly.
Scenario 3: Call Routing Failures (404 Not Found)
If a user tries to place a call and receives a "404 Not Found" error, it means the Teams cloud does not know which SBC to send the call to.
- The Fix: Check the user's
OnlineVoiceRoutingPolicy. Ensure that the policy is assigned to the user, the policy contains aPSTNUsagethat matches your route, and that the route is correctly pointing to your SBC.
Not read yet
Comparison of SBC Connectivity Options
When choosing how to connect your SBC, you generally have two main architectures:
| Feature | Single SBC (High Availability) | Multiple SBCs (Geographic Redundancy) |
|---|---|---|
| Complexity | Low | High |
| Cost | Lower | Higher |
| Fault Tolerance | Limited to SBC hardware failure | High (Protects against site failure) |
| Deployment | Quick | Requires complex routing logic |
For most small to medium businesses, a single pair of SBCs in a High Availability (HA) cluster is sufficient. For global enterprises with offices in multiple continents, deploying regional SBCs is the industry standard to minimize latency and comply with local data residency laws.
Step-by-Step Verification Process
Once you believe everything is configured, do not just hope it works. Follow this verification sequence:
- Check SBC Status in Teams: Run
Get-CsOnlinePSTNGatewayin PowerShell. TheStatusproperty should showActive. If it showsUnknownorInactive, your SBC is not successfully connecting to the Microsoft cloud. - Test Internal-to-External: Place a test call from a Teams client to a mobile phone. Watch the SBC logs to see the incoming
INVITEfrom Microsoft. - Test External-to-Internal: Place a call from a mobile phone to a DID (Direct Inward Dialing) number assigned to a Teams user. Check if the SBC receives the call and forwards it to the Teams user.
- Inspect Signaling Logs: Use a tool like Wireshark or the built-in diagnostic logging on your SBC to inspect the SIP signaling. Look for
200 OKresponses. If you see403 Forbiddenor488 Not Acceptable, look at the SIP headers to determine why the call is being rejected.
Not read yet
Best Practices for Long-Term Maintenance
Direct Routing is not a "set it and forget it" configuration. To keep your system running smoothly, adhere to these maintenance habits:
- Certificate Lifecycle Management: Set alerts for certificate expiration 60 days in advance. Replacing a certificate requires planning, as you must update the certificate on the SBC and potentially re-verify the connection with Microsoft.
- Regular Firmware Updates: SBC vendors release firmware updates that include security patches and support for new SIP features. Schedule these updates during off-peak hours and always have a rollback plan.
- Capacity Planning: Regularly review your
MaxConcurrentSessionsusage. If you are consistently hitting 80% of your capacity, it is time to upgrade your license or add additional SBC nodes to your cluster. - Documentation: Keep an up-to-date diagram of your voice network. Include IP addresses, firewall rules, and the specific routing logic you have implemented. This is invaluable when you need to troubleshoot an issue under pressure.
Not read yet
Addressing Common Questions
Q: Can I use a self-signed certificate for testing?
A: While you can technically configure it, Microsoft Teams will generally reject the connection. You should use a certificate from a trusted public CA even for a "lab" or "test" environment to ensure the configuration behaves exactly as it will in production.
Q: Do I need a specific SBC vendor?
A: Yes, Microsoft maintains a list of "Certified SBCs for Direct Routing." You should only purchase or deploy SBCs that are on this list. Using a non-certified SBC may work, but you will not receive support from Microsoft if you encounter interoperability issues.
Q: What is "Media Bypass"?
A: Media Bypass is a feature that allows the media traffic (the audio) to flow directly between the Teams client and the SBC, rather than routing it through the Microsoft cloud. This significantly reduces latency and improves audio quality. It is highly recommended to enable this if your network architecture supports it.
Warning: Media Bypass and Firewall Complexity Enabling Media Bypass requires that your internal firewall allows the Teams client to talk directly to the SBC's media ports. This can increase the complexity of your firewall rules, as you must now account for traffic coming from your internal user subnets to the SBC, not just from the Microsoft cloud.
Not read yet
Key Takeaways
- SBC as the Gateway: The SBC is the critical bridge between your local PSTN and Microsoft Teams; its configuration directly impacts call quality and reliability.
- Strict Security: Always use trusted public certificates and restrict incoming SIP traffic to Microsoft’s known IP ranges to prevent unauthorized access and toll fraud.
- PowerShell is Essential: While some configuration can be done via web interfaces, PowerShell is the most reliable way to manage Gateways, PSTN Usages, and Voice Routes at scale.
- Regex Proficiency: Your ability to define and troubleshoot call routing depends on your understanding of Regular Expressions. Practice these patterns to ensure calls go to the right destination.
- Proactive Monitoring: Do not wait for users to report issues. Monitor your SBC status, certificate expiration dates, and concurrent session limits to maintain a proactive posture.
- Documentation is Vital: In the complex world of voice routing, clear documentation of your network topology and routing logic is the best tool for rapid troubleshooting.
- Maintenance Cycles: Treat your SBC like any other piece of critical infrastructure; perform regular firmware updates and capacity reviews to ensure your telephony system scales with your business needs.
By following these guidelines, you will be well-equipped to manage the connectivity between your organization and the Microsoft Teams Phone environment. Remember that the goal is to provide a seamless communication experience, and the SBC is the foundation upon which that experience is built. Take the time to master the configuration, prioritize security, and maintain your system with diligence.
Not read yet
Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.
- Planning for Teams Meetings Webinars and Town Halls
- Teams Meetings Planning Quiz5q
- Designing Teams Meeting Policies and Settings
- Meeting Policies Design Quiz5q
- Planning for PSTN Audio Conferencing
- PSTN Audio Conferencing Quiz5q
- Recommending Teams Premium and Copilot
- Teams Premium Copilot Quiz5q
- Recommending Meeting Types Based on Requirements
- Meeting Types Quiz5q
- Policy Assignment Methods and Policy Packages
- Policy Assignment Quiz5q
- Identifying Licensing for Teams Phone
- Teams Phone Licensing Quiz5q
- Identifying PSTN Connectivity Requirements
- PSTN Connectivity Quiz5q
- Planning for Teams Phone Mobile and Operator Connect
- Teams Phone Mobile Quiz5q
- Planning SMS and Billing Methods
- SMS Billing Methods Quiz5q
- Planning Shared Calling and Phone Numbers
- Shared Calling Quiz5q
- Designing Auto Attendant and Call Queue Flows
- Auto Attendant Call Queue Quiz5q
- Designing Dynamic Emergency Calling
- Dynamic Emergency Calling Quiz5q
- Recommending Devices and Direct Routing
- Devices Direct Routing Quiz5q
Spend your points to unlock exam-style practice questions
Spend points to unlock MS-721 exam-style practice questions.
Practice for MS-721