Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Teams Direct Routing 403 "No trunk config was found" (510532): the SBC name is not registered under the tenant

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

A Direct Routing call reaches Microsoft's SIP proxy from a session border controller (SBC) that the business runs or hires. Before Teams accepts the call it has to work out which tenant the SBC belongs to, and it does that from the SBC's fully qualified domain name (FQDN). SIP 403 with Microsoft response code 510532 is the answer when no SBC configuration is found for the tenant under the name the call arrived with.

The sections below show how to read the two 510532 rows, how to compare the name the SBC presents with the name registered in Teams, which tenant settings the name depends on, and how to correct the mismatch with a record to undo from. The other 403 rows on the same Microsoft page are covered in the 510560 page and the 510559 page.

What the error means

Microsoft's SIP 403 page carries two rows for code 510532, both with SIP response code 403.

The first is "510532 403 No trunk config was found". Its suggested action reads: "Verify that the calls are sent from the correct Session Border Controller (SBC) Fully Qualified Domain Name (FQDN) that's associated with your tenant. Also, verify that the FQDN in the Contact header of the SIP INVITE message is registered under your tenant."

The second is "510532 403 Get Inbound Direct Routing - RuntimeApi trunk config not found for customer". Its suggested action reads: "Verify the trunk (gateway) configuration for the specific tenant, and make sure that it's set up correctly."

Microsoft's word for the SBC's entry in the tenant is the trunk or gateway. The page applies to Direct Routing PSTN calls only, not to Microsoft Calling Plan or Operator Connect deployments.

Likely causes

Microsoft's SBC connectivity, SBC connection and planning pages describe these mismatches. The connectivity page lists its items under the symptom "The SBC doesn't receive a SIP 200 OK response from the SIP proxy". Our own reading: the same mismatches can give 510532.

Cause Where Microsoft's pages describe it
The FQDN the SBC puts in the Contact or Record-Route header is different from the one configured in Teams The SBC connectivity page, SIP OPTIONS section
The Contact header holds an IP address instead of the FQDN The same page
The SBC was never paired with the tenant, so no gateway exists under that name The SBC connection page: the SBC is connected to the tenant with the New-CsOnlinePSTNGateway cmdlet
The domain part of the FQDN is not a domain registered in the tenant, or it is a *.onmicrosoft.com name The SBC connection and planning pages
A subdomain such as sbc1.sip.contoso.com is used and sip.contoso.com is not registered The planning page
The domain is registered but not validated, or not activated because no user with that domain has an E3 or E5 licence The SBC connectivity and SBC connection pages
Several IP addresses are mapped to the same FQDN on the SBC side The SBC connection page: not supported

Prove the cause before changing anything

All of these steps only read.

  1. Read the name the SBC sent. In the SBC's own SIP trace for a failing call, find the FQDN in the Contact header of the INVITE and, if present, in the Record-Route header. Write down the exact characters. Microsoft's SBC connectivity page lists, as a fault to look for, a Contact header that holds an IP address instead of the FQDN.

  2. Read the name registered in Teams. Microsoft's SBC connection page gives this read-only command to list paired SBCs:

Get-CsOnlinePSTNGateway -Identity sbc.contoso.com

Replace the example name with the SBC's name. The page says the paired gateway should appear with Enabled showing True. To list every gateway in the tenant, Microsoft's outbound-calls page gives this read-only command:

Get-CsOnlinePSTNGateway | fl Identity,Fqdn,SipSignalingPort,MaxConcurrentSessions,Enabled

Compare the Fqdn column with the name from step 1, character by character. Microsoft says the FQDN configured through the Teams admin center or Teams PowerShell must match the FQDN the SBC presents in the Contact and Record-Route headers.

  1. Check the domain. Microsoft's pages say the domain part of the FQDN must be a domain registered in the tenant, that *.onmicrosoft.com is not supported, and that for a subdomain the subdomain itself must also be registered. Compare the domain part of the SBC name with the domains listed under Domains in the tenant.

  2. Check that the domain is activated. Microsoft's SBC connection page says there must be a user with that domain and an assigned E3 or E5 licence, and that the authentication type of the domain must be "Managed". The SBC connectivity page says that, once the requirements are met, activation can take up to 24 hours.

  3. Check that the FQDN resolves. Microsoft's SBC connectivity page says to verify that the SBC FQDN resolves to a public IP address when queried through public DNS servers.

  4. Look for the pairing error message. If someone tried to pair the SBC with a name Microsoft did not accept, the page gives these error texts: Can not use the "sbc.contoso.com" domain as it was not configured for this tenant on the connection page, and Can't use the "sbc1.sip.contoso.com" domain as it wasn't configured for this tenant on the planning page.

Fix

Choose Route 1 or Route 2, whichever matches the proof.

Route 1: correct the name on the SBC

Write down the SBC's current FQDN setting, the Contact and Record-Route header settings of its Teams-facing SIP profile, and the time.

Disruptive step: the next change alters the name the SBC presents to Microsoft on every call. Microsoft's planning page says the certificate should carry the SBC FQDN as its Common Name or Subject Alternative Name, Our own advice: a new name also needs a certificate that contains it. Microsoft's SBC connectivity page lists an FQDN that does not match the CN or SAN in the certificate as a cause of an SBC shown as Inactive.

Microsoft's SBC connectivity page says the FQDN configured in Teams must match the FQDN the SBC presents in the Contact and Record-Route headers, and lists a Contact header that holds an IP address instead of the FQDN as a fault. In the SBC's management interface, set the FQDN and the Contact and Record-Route header settings so they carry the name registered in Teams.

To undo it: set the SBC's FQDN and header settings back to the values you wrote down.

Route 2: pair the SBC with the tenant

Write down the output of the Get-CsOnlinePSTNGateway command from the proof and the time.

Risk: the next command creates a gateway under the tenant and, because it sets Enabled to $true, turns the SBC on for outbound calls straight away. Microsoft's SBC settings table says Enabled is used to turn on the SBC for outbound calls and that its default is False. The command fails with the "was not configured for this tenant" error if the domain is not registered or has no licensed user.

Microsoft's SBC connection page gives this form of the command:

New-CsOnlinePSTNGateway -Fqdn <SBC FQDN> -SipSignalingPort <SBC SIP Port> -MaxConcurrentSessions <Max Concurrent Sessions the SBC can handle> -Enabled $true

To undo it, if the SBC was not paired before: Microsoft's cmdlet page for Remove-CsOnlinePSTNGateway gives this command. Removing the gateway deletes its configuration, and the page says the SBC must be removed from all voice routes before the command is run:

Remove-CsOnlinePSTNGateway -Identity sbc.contoso.com

Replace the example name with the SBC's name.

What Microsoft's pages say about registering the domain

No steps are given for the domain, because it is a tenant change that belongs to the person who administers the Microsoft 365 domains. Microsoft's planning page sets out this order for a subdomain: register the domain name in Domains in the tenant before pairing the SBC, then create a user with a UPN on that domain, for example user@sip.contoso.com, and assign a Teams licence. The page says it may take up to 24 hours to fully provision the domain after it is added, the user is created and the licence is assigned. Microsoft's SBC connection page adds that the domain's authentication type must be "Managed" to assign a user.

Confirm the fix

  • Run Get-CsOnlinePSTNGateway -Identity sbc.contoso.com again, with the SBC's name. The Fqdn matches the name in the SBC's Contact header, and Enabled reads True.
  • Validate the pairing as Microsoft's SBC connection page describes. In the SBC's management interface, confirm that the SBC receives 200 OK responses to its outgoing OPTIONS messages, and that it replies 200 OK to the OPTIONS messages coming in from Direct Routing.
  • Place a test call. The 510532 refusal no longer appears.

What to watch afterwards

  • The SBC status in the Teams admin center. Microsoft's SBC connectivity page says the health status is based only on the SIP OPTIONS exchange, and that calls can work while the SBC shows as Inactive. The Inactive page covers that.
  • A change of name on the SBC after a certificate renewal or a move to a new address. Microsoft says the certificate must contain the FQDN, so the name and the certificate change together.
  • DNS changes to the SBC's name. Microsoft says the name must resolve to a public IP address from public DNS servers.
  • Multiple IP addresses mapped to one FQDN on the SBC side, which Microsoft says are not supported.

Risks and limits

These steps come from Microsoft's pages and have not been run or lab-tested. They apply to Direct Routing only.

Route 1 changes the SBC's own settings, in its own management interface. Domain registration and licensing are changes to the tenant that affect more than telephony, so the person who owns those settings should make them.

Sources