Microsoft Teams Direct Routing Outbound Calls not working (error 504)

New Contributor



I am trying to configure Direct Routing on my tenant, using my carrier's hosted multi-tenant SBC.


They connected to my tenant with powershell and made all the needed configurations with these Powershell commands, after they validated the SBC domain in my office 365 tenant and created a user with that domain:

  1. Set-CsOnlinePstnUsage -Identity Global -Usage @{Add ="TeamsVoice"}
  2. New-CSOnlineVoiceRoute -Identity "DefaultRoute" -NumberPattern ".*" -OnlinePstnGatewayList <sbc fqdn> -Priority 1 -OnlinePstnUsages "TeamsVoice"
  3. New-CsOnlineVoiceRoutingPolicy "VP-TeamsUser" -OnlinePstnUsages "TeamsVoice"
  4. Set-CsUser -Identity -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI tel:<phonenumber>
  5. Grant-CsOnlineVoiceRoutingPolicy -Identity "" -PolicyName "VP-TeamsUser"


Don't need to add the SBC because of the multi-tenant config as specified in this article


Inbound calls are working correctly, but outbound calls are not.


My carrier's SBC is not receiving anything, and if I go to my PSTN direct routing report I get the SIP Error 504 "Unable to deliver INVITE: No such host is known" with the microsoft final code 569002.


Immagine 2020-12-10 161457.png


My carrier believes it is a Microsoft Teams backend problem because they have other customers with the same config and they work properly.


What can I do? I also opened a ticket with Microsoft but I wanted to double up by also asking in here.


My user has got Office 365 E3 + Microsoft Phone System licenses and I have access to the number dial pad in the calls section of the app.


Thanks for the help

7 Replies
best response confirmed by Lopicl (New Contributor)

Ok me and my carrier found the issue.


The DNS record for the SBC FQDN was not properly set, thus not redirecting to the SBC IP.

Can you expand on what was not correctly configured on the DNS record? I'm having exactly the same issue. Thanks in advance.

@bluecat In our case the DNS A record for the SBC was misspelled.

For instance instead of it was set as, so it was not possible to reach, as teams was looking for

From what I understood this error comes from a misspelled SBC hostname, or unreachable DNS name.

OK, Thanks for the reply.
where it was wrong? in the domains in office365 or in the SBC side? we are having the exact same issue.
hey @bluecat did you solved that issue? what it was?

@SergioGaray We did not solve the issue, we had to work around it by adding the the SBC's (i.e. New-CsOnlinePSTNGateway -Fqdn <SBC FQDN> -SipSignalingPort <SBC SIP Port> -MaxConcurrentSessions <Max Concurrent Sessions the SBC can handle> -Enabled $true)