Configuring Trunk Translation and SBA

Earn 25 points (50 with Pro) in two steps

  1. ① Read through the lesson — each section gets a ✓ as you scroll through it.
  2. ② When every section has a ✓, tap Complete lesson.

0 of 9 read · keep scrolling

✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro

Configuring Trunk Translation and Survivable Branch Appliance (SBA) for Microsoft Teams Phone

Introduction: The Architecture of Voice Reliability

In the modern enterprise, moving telephony to the cloud via Microsoft Teams Phone is a major step toward simplifying communications. However, when you choose the Direct Routing path—connecting your own Session Border Controller (SBC) to the Microsoft 365 cloud—you take on the responsibility of managing the bridge between your local provider and the Microsoft network. This is where Trunk Translation and Survivable Branch Appliances (SBA) become critical components of your infrastructure.

Trunk translation is the mechanism that ensures the phone numbers presented by your local telephone provider match the format required by Microsoft Teams, and vice versa. Without proper translation, calls will fail because the signaling packets will not contain the expected number formats, leading to dropped calls or "number not in service" errors. Similarly, the Survivable Branch Appliance (SBA) provides a safety net. If your branch office loses connectivity to the Microsoft 365 data centers, the SBA allows your local users to continue making and receiving calls through the local gateway.

Understanding these two components is the difference between a telephony system that works "most of the time" and one that is truly enterprise-grade. In this lesson, we will dissect the configuration logic for trunk translation, explore how to deploy and manage SBAs, and look at the best practices that keep your voice traffic flowing reliably.


Not read yet

Part 1: Deep Dive into Trunk Translation

Trunk translation, often referred to as number normalization or manipulation, is the process of modifying the Calling Party or Called Party numbers as they traverse the SBC. Microsoft Teams requires numbers to be in E.164 format (starting with a '+'), but many legacy SIP trunks or local Public Switched Telephone Network (PSTN) providers send numbers in local, national, or abbreviated formats.

Why Translation is Necessary

When a call enters your SBC from the PSTN, it might arrive as a 7-digit local number or a 10-digit national number. If you pass this directly to Microsoft Teams without translation, the Teams client will not recognize the number as a valid user or contact, and the call will likely be rejected. Conversely, when a user in Teams makes an outbound call, they dial a number that the provider might not understand unless it is formatted exactly to their specific requirements.

Normalization Rules and Regex

The heavy lifting of trunk translation is done using Regular Expressions (Regex). While Regex can be intimidating, the logic is consistent across most enterprise-grade SBCs like AudioCodes, Ribbon, or Oracle.

  • Calling Party Manipulation: This ensures that the caller ID is formatted correctly so that the recipient sees a valid, returnable number.
  • Called Party Manipulation: This ensures that the destination number is routed correctly to the intended user or external entity.

Callout: The E.164 Standard E.164 is the international public telecommunication numbering plan that defines the format for telephone numbers. It includes the country code, area code, and subscriber number, all preceded by a plus sign (e.g., +12125550199). Microsoft Teams Phone is designed to work natively with this format, which is why your SBC must act as the translator between your provider's local quirks and the global E.164 standard.

Practical Example: Converting Local to E.164

Imagine your provider sends a 10-digit number like "2125550199". Your Teams environment expects "+12125550199". You need a translation rule that identifies the 10-digit string and prepends the "+1" country code.

  1. Match Pattern: ^(\d{10})$
    • This tells the SBC to look for a string of exactly 10 digits.
  2. Replace Pattern: +1\1
    • This takes the captured 10 digits and places them behind a "+1".
  3. Result: The SBC transforms "2125550199" into "+12125550199" before sending it to the Microsoft cloud.

Not read yet

Part 2: Implementing Survivable Branch Appliances (SBA)

The SBA is a specialized software component that runs on a certified SBC. It acts as a local proxy for the Microsoft Teams registration service. If the WAN connection to the Microsoft 365 cloud is severed, the Teams client detects the outage and attempts to register with the SBA instead of the cloud.

How the SBA Functions

Normally, a Teams client communicates with the Microsoft 365 infrastructure for authentication, presence, and call signaling. When the SBA is configured, the client maintains a secondary registration path. If the primary cloud path fails, the client switches to the SBA. The SBA then handles the call signaling locally, routing calls through the local PSTN gateway, ensuring that the office remains operational.

Prerequisites for SBA Deployment

  • SBC Hardware/Virtualization: You must use an SBC that is specifically certified by Microsoft for SBA functionality.
  • Teams Phone License: Users must be enabled for Teams Phone, and their primary registrar must be set to the cloud.
  • Connectivity: The SBC must have both a connection to the local PSTN and a stable connection to the local area network (LAN) where the Teams clients reside.
  • Certificate Management: The SBA requires valid certificates to establish trust with the Teams clients.

Step-by-Step Configuration Workflow

Configuring an SBA is not a task performed solely in the Teams Admin Center; it requires coordination between your SBC configuration and the Microsoft 365 tenant.

  1. Register the SBA in the Tenant: You must use the PowerShell module for Microsoft Teams to register the SBC as an SBA. This informs Microsoft that this specific device is capable of providing survivability.

    # Register the SBA
    New-CsTeamsSurvivableBranchAppliance -FQDN "sba.yourdomain.com" -SiteId "NewYorkBranch"
    
  2. Configure the SBC: Log into your SBC management interface. You will need to define the "Teams Registrar" and "SBA" settings. This involves inputting the FQDN and ensuring the trust certificates are uploaded.

  3. Assign Users to the SBA: Not every user needs to be assigned to an SBA. Only users physically located at the branch office where the SBA is deployed should be assigned.

    # Assign a user to the SBA
    Set-CsUser -Identity "[email protected]" -SurvivableBranchAppliance "sba.yourdomain.com"
    
  4. Verify Registration: Once configured, check the client status. In the Teams client, you can typically see if the client is "Registered via SBA."

Note: The SBA does not provide all Teams features. It is designed for core telephony. Features like presence, chat, and file sharing rely on the cloud; if the internet is down, those features will remain unavailable even if voice calls are working through the SBA.


Not read yet

Part 3: Advanced Trunk Translation Techniques

Beyond simple digit manipulation, you may encounter scenarios involving complex PBX integrations or multi-tenant environments. This requires a more nuanced approach to translation.

Handling Multi-Tenant Environments

If you are an MSP or a large organization with multiple business units, you might have one SBC serving multiple Teams tenants. In this case, your trunk translation rules must be tenant-aware. You might need to inspect the "Diversion" or "Remote-Party-ID" headers in the SIP invite to determine which tenant the call belongs to, and then apply specific translation rules based on that identity.

Dealing with SIP Header Manipulation

Sometimes, the issue isn't the number itself, but the SIP headers. For example, some providers require a specific "From" header format to allow outbound calls. If your SBC sends a header that doesn't match the provider's expectations, the call will be rejected with a 403 Forbidden error.

  • Best Practice: Always capture a SIP trace during initial configuration.
  • Tooling: Use tools like Wireshark or the built-in logging features of your SBC (like the AudioCodes Syslog) to see the raw SIP packets.
  • Adjustment: If the provider complains about the "From" header, create a rule to "Rewrite From Header" using regex to match the provider’s required format while keeping the original caller identity in the "P-Asserted-Identity" header.

Warning: Never modify the "To" header indiscriminately. This header is used by the receiving network to determine the final destination of the call. If you mangle this header, you will break call routing, leading to calls being sent to the wrong destination or failing entirely.


Not read yet

Part 4: Common Pitfalls and Troubleshooting

Even with a perfect plan, issues arise. Telephony is complex, and the interaction between the cloud, the SBC, and the PSTN provider is prone to configuration drift.

Common Mistake 1: Normalization Rule Ordering

SBCs process translation rules in a specific order (usually top-to-bottom). If you have a generic rule at the top that matches too broadly, your more specific rules underneath will never be triggered.

  • Fix: Always place your most specific rules at the top of the list and your broad, catch-all rules at the bottom.

Common Mistake 2: Certificate Mismatch

The SBA and the Teams client communicate over TLS. If the certificate on the SBC does not match the FQDN defined in the Teams Admin Center, the client will refuse to register, and the SBA will remain "Disconnected" or "Inactive."

  • Fix: Ensure that the Subject Alternative Name (SAN) of your certificate includes the FQDN of the SBA.

Common Mistake 3: Ignoring PSTN Gateway Limits

An SBC has a finite number of concurrent calls it can handle. If you configure your SBA but do not account for the total number of users who might fail over to it simultaneously, the SBC will hit a resource limit during a WAN outage.

  • Fix: Perform a load calculation. Determine how many concurrent calls your branch makes during peak hours and ensure your SBC hardware is rated for that capacity, plus a safety margin.

Not read yet

Part 5: Comparison Table: Normalization vs. Survivability

Feature Trunk Translation Survivable Branch Appliance (SBA)
Primary Purpose Format adjustment for PSTN compatibility Call continuity during WAN failure
Location Configured on the SBC Configured on SBC + Teams Tenant
Dependency Dependent on Provider requirements Dependent on Internet/WAN status
Scope Applies to all inbound/outbound calls Applies to specific branch users
Complexity High (Requires Regex knowledge) Medium (Requires certificate/trust setup)

Part 6: Best Practices for Production Environments

To keep your voice infrastructure stable, follow these industry-standard practices.

  1. Use Canonical Numbering: Always store your internal user numbers in E.164 format within Active Directory and Microsoft 365. This minimizes the amount of translation required at the SBC level.
  2. Regular Audits: PSTN providers occasionally update their signaling requirements. Review your translation rules every six months to ensure they still align with current provider specifications.
  3. Monitor SBA Health: Don't just set it and forget it. Use monitoring tools (like the Teams Admin Center or your SBC’s SNMP traps) to alert you if an SBA goes offline.
  4. Documentation: Keep a detailed spreadsheet of your regex rules. Include a "Before" and "After" example for every rule. This is invaluable when you need to troubleshoot a call flow at 2:00 AM.
  5. Test Before Deployment: Use a test user or a dedicated test trunk to verify new translation rules before applying them to the production traffic.

The Role of Testing

Never assume a rule works just because it looks correct on paper. Use the "Test Call" feature in your SBC if available. If not, perform a controlled test by placing a call from a test user and watching the real-time SIP logs. If the call fails, look at the SIP error code. A 404 Not Found usually means the translation rule didn't match or the destination is unreachable. A 403 Forbidden usually means a header issue or an authentication problem.


Not read yet

Part 7: Managing the Lifecycle of SBC Configurations

The configuration of your SBC is not static. As your organization grows, adds new area codes, or changes PSTN providers, your translation rules will evolve.

Version Control for Configurations

Treat your SBC configuration like code. Many modern SBCs allow you to export the configuration as an XML or text file. Store these files in a version control system like Git. If a configuration change causes an outage, you can immediately revert to the previous "known good" state.

Scaling the SBA

If you have a large branch, you might need multiple SBCs operating in a high-availability (HA) pair. When configuring the SBA, ensure that the HA pair is configured correctly so that if the primary SBC fails, the secondary takes over the SBA role without dropping existing calls. This requires shared virtual IPs and synchronized state information between the SBC nodes.

Callout: The "Split-Brain" Scenario In high-availability deployments, a "split-brain" occurs when both nodes in an HA pair think they are the primary. This can cause massive issues with call routing and SBA registration. Always ensure your heartbeat interface between HA nodes is dedicated and redundant to prevent this, and set strict priorities for which node should act as the master.


Not read yet

Part 8: Frequently Asked Questions (FAQ)

Q: Can I use an SBA for users who are not in a branch office? A: No. The SBA is specifically designed for branch office scenarios where the office relies on a local gateway. Users who are remote or at the headquarters usually rely on the cloud-based Teams service.

Q: Does trunk translation affect internal Teams-to-Teams calls? A: No. Internal calls within the Microsoft Teams environment do not traverse your SBC and are not affected by your trunk translation rules. These rules only trigger when a call is routed to or from the PSTN via Direct Routing.

Q: What if my provider uses a non-standard SIP header? A: Most enterprise SBCs have a "Header Manipulation" engine. You can create rules to add, remove, or modify any SIP header before the packet is forwarded to the Microsoft cloud or the provider.

Q: How do I know if my SBA is working correctly? A: You can check the "Survivability" tab in the Microsoft Teams Admin Center. It will show the status of all registered SBAs. Additionally, you can check the logs on the SBC to see if the Teams clients are successfully sending "REGISTER" requests to the local SBA address.


Not read yet

Key Takeaways

  1. Normalization is Mandatory: Trunk translation is not optional; it is the fundamental bridge that allows your legacy PSTN provider to communicate with the modern Microsoft Teams environment.
  2. Regex is Your Best Friend: Mastering basic Regular Expressions is essential for any voice engineer working with SBCs. It is the primary tool for manipulating calling and called party numbers.
  3. SBA Provides Business Continuity: The Survivable Branch Appliance is the only way to ensure local voice services remain active during a total internet outage. It is a critical component for offices where voice is a mission-critical utility.
  4. Security and Trust: Always treat your SBC configuration as a security-sensitive asset. Use proper TLS certificates and ensure your SBC is hardened against unauthorized access, as it sits at the edge of your network.
  5. Monitoring is Essential: Do not wait for a user to report that they cannot make calls. Proactive monitoring of your SBC’s health, SIP trunk availability, and SBA registration status is the only way to ensure long-term stability.
  6. Consistency is Key: Use standard E.164 formatting across your entire organization to reduce the complexity of your SBC rules and make troubleshooting significantly easier.
  7. Test, Test, Test: Never modify a production trunk translation rule without a clear rollback plan and a verified test case. Small errors in regex can lead to widespread outages for your entire voice system.

By mastering these configurations, you transition from being a simple administrator to an architect of reliable communications. The combination of well-planned trunk translation and a robust SBA deployment ensures that your organization's voice traffic remains clear, reachable, and resilient, regardless of the challenges posed by the public internet or local provider limitations.

Not read yet

Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.