SOLVED

Inbound calls to derived direct routing trunk fails with 404

New Contributor

I'm working on setting up a multi-tenant SBC but I can't get inbound calls to work (inbound to Teams).

 

Domains:

  • teams1.example.com - This i registered in the Carrier tenant
  • teams2.example.com - This is registered in the Carrier tenant
  • customer1.teams1.example.com - This is registered in the customers tenant
  • customer1.teams2.example.com - This is registered in the customers tenant

I have successfully registered all the domains and validated them by adding temporary users with phone licenses, I have setup two OnlinePstnGateways in the carrier tenant, SIP Options works in both ways and it looks good in the teams admin console.

 

 

get-csOnlinePstnGateway

Identity                            : teams1.example.com
InboundTeamsNumberTranslationRules  : {}
InboundPstnNumberTranslationRules   : {}
OutboundTeamsNumberTranslationRules : {}
OutboundPstnNumberTranslationRules  : {}
Fqdn                                : teams1.example.com
SipSignalingPort                    : 5061
FailoverTimeSeconds                 : 10
ForwardCallHistory                  : True
ForwardPai                          : True
SendSipOptions                      : True
MaxConcurrentSessions               : 500
Enabled                             : True
MediaBypass                         : False
GatewaySiteId                       :
GatewaySiteLbrEnabled               : False
GatewayLbrEnabledUserOverride       : False
FailoverResponseCodes               : 408,503,504
PidfLoSupported                     : False
MediaRelayRoutingLocationOverride   :
ProxySbc                            :
BypassMode                          : None
Description                         :

Identity                            : teams2.example.com
InboundTeamsNumberTranslationRules  : {}
InboundPstnNumberTranslationRules   : {}
OutboundTeamsNumberTranslationRules : {}
OutboundPstnNumberTranslationRules  : {}
Fqdn                                : teams2.example.com
SipSignalingPort                    : 5061
FailoverTimeSeconds                 : 10
ForwardCallHistory                  : True
ForwardPai                          : True
SendSipOptions                      : True
MaxConcurrentSessions               : 500
Enabled                             : True
MediaBypass                         : False
GatewaySiteId                       :
GatewaySiteLbrEnabled               : False
GatewayLbrEnabledUserOverride       : False
FailoverResponseCodes               : 408,503,504
PidfLoSupported                     : False
MediaRelayRoutingLocationOverride   :
ProxySbc                            :
BypassMode                          : None
Description                         :

 

 

In the customers tenant I have done the following

 

Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="Example"}

New-CsOnlineVoiceRoute -id "ExampleVoiceRoute" -NumberPattern ".*" -OnlinePstnGatewayList @{add="customer1.teams1.example.com"} -OnlinePstnUsages Example
Set-CsOnlineVoiceRoute -id "ExampleVoiceRoute" -OnlinePstnGatewayList @{add="customer1.teams2.example.com"}

New-CsOnlineVoiceRoutingPolicy "ExampleVoiceRoutingPolicy" -OnlinePstnUsages "Example"

Set-CsPhoneNumberAssignment -Identity "the-user@customer-domain.com" -PhoneNumber "+4611111111" -PhoneNumberType DirectRouting

Grant-CsOnlineVoiceRoutingPolicy -Identity the-user@customer-domain.com -PolicyName ExampleVoiceRoutingPolicy

 

 

 And that worked.

I can make outbound calls (from Teams to PSTN) via the derived trunk.

But when I try to make a call to Teams I get the the following 404 Not found back

 

SIP/2.0 404 Not Found
REASON: Q.850;cause=1;text="some-uuid;RNL"

 

 

 

INVITE sip:+4611111111@sip.pstnhub.microsoft.com:5061;transport=tls;user=phone SIP/2.0
Record-Route: <sip:teams1.example.com;transport=tls;r2=on;ftag=tsipTsQXP39y0q2RVS;lr>
Record-Route: <sip:teams1.example.com;transport=udp;r2=on;ftag=tsipTsQXP39y0q2RVS;lr>
Call-ID: 83f1c358adaf4296d60a2056eaf439dd
CSeq: 1 INVITE
From: <sip:+468888888@customer1.teams1.example.com:5060>;tag=tsipTsQXP39y0q2RVS
To: <sip:+4611111111@sip.pstnhub.microsoft.com:5061;transport=tls;user=phone>
Via: SIP/2.0/TLS IP_OF_SBC:5061;branch=z9hG4bKf0d8.3861ded29751ad19ec28cfbfa6db9770.0
Via: SIP/2.0/UDP IP_OF_OTHER_SERVICE:5060;rport=5060;branch=z9hG4bK-373238-b364b879dd564de5c745b3c199a0aefd
Max-Forwards: 69
Record-Route: <sip:IP_OF_OTHER_SERVICE;lr>
Content-Type: application/sdp
Supported: 100rel,replaces
Allow: ACK,INVITE,BYE,CANCEL,PRACK,UPDATE,REFER
Content-Length: 325
Contact: <sip:+468888888@customer1.teams1.example.com:5061;transport=tls>

SDP..

 

 

Verifying the settings looks good to me

 

get-csonlineuser -Identity "the-user@customer-domain.com" | fl EnterpriseVoiceEnabled, LineUri, OnPremLineUri, OnPremEnterpriseVoiceEnabled, OnlineVoiceRoutingPolicy
EnterpriseVoiceEnabled       : True
LineUri                      : tel:+4611111111
OnPremLineUri                :
OnPremEnterpriseVoiceEnabled : False
OnlineVoiceRoutingPolicy     : ExampleVoiceRoutingPolicy

 

 

Any advice on what to do or try next?

2 Replies
I'm sure you have but ust want to check that customer1.teams1.example.com has been added as a sub-domain in the customer tenant and a licensed user has been added to that domain to activate it?

404 normally means it got to the end tenant but couldn't find the number which in your screenshot shows the number is. Can you also check that the user doesn't have a Calling Plan license, they just need Phone System.
best response confirmed by magnusbrange (New Contributor)
Solution
Thanks for the reply.

I found the problem and it was that I used the carrier domain teams1.example.com / teams2.example.com as domains in the record route headers. Changing to using the customer tenants sbc-domain (sub-domain) customer1.teams1.example.com / customer1.teams2.example.com in the record route headers made it work.

I thought that the Contact header was the important one. But apparently not