Already fixed it here: https://freeswitch.org/jira/projects/FS/issues/FS-11978?filter=reportedbyme ________________________________ From: FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org> on behalf of Tulipa Frigo <tulipa.frigo@gmail.com> Sent: 15 August 2019 16:30:13 To: freeswitch-users@lists.freeswitch.org <freeswitch-users@lists.freeswitch.org> Subject: [Freeswitch-users] Teens Direct Routing - contact and record-route headers are missing Hi all, I'm trying to configure my freeswitch to send and receive calls from Teens Direct Routing . Then, I configured the SIP gateway /usr/local/freeswitch/sip_profiles/extern/gateway_teens.xml : <include> <gateway name="teens"> <param name="realm" value="sip.pstnhub.microsoft.com:5061<http://sip.pstnhub.microsoft.com:5061>"/> <param name="register" value="false"/> <param name="register-transport" value="tls"/> <param name="ping" value="25"/> </gateway> </include> The Teens Direct Routing only enable the sip trunk after receive and send SIP OPTIONS with success, in both direction. The OPTIONS FLOW description from Direct Routing Configure page, https://docs.microsoft.com/en-us/microsoftteams/direct-routing-configure: "The SBC sends a OPTIONS messages to Teens Direct Routing and receives a 200OK. When Direct Routing sees incoming OPTIONS, it will start sending outgoing SIP Options messages to the SBC FQDN configured in the Contact header field in the incoming OPTIONS message and the SBC reply with 200OK." The problem is that the freeswitch (SBC) is receiving the response FORBIDDEN , with reason : Q.850;cause=21;text="29175f0d-ebe8-43ea-836f-708b6d4b0d4f;Record-Route and Contact headers are missing" . Folowing is the OPTIONS msg sent from freeswitch to Teens Direct Rounting and the response: ------------------------------------------------------------------------ send 597 bytes to tls/[52.114.76.76]:5061 at 11:10:15.890560: ------------------------------------------------------------------------ OPTIONS sip:sip.pstnhub.microsoft.com:5061;transport=tls SIP/2.0 Via: SIP/2.0/TLS 177.53.17.168:5081;rport;branch=z9hG4bKg5DyZ09c7Bv2r Max-Forwards: 70 From: <sip:sip.pstnhub.microsoft.com:5061<http://sip.pstnhub.microsoft.com:5061>>;tag=ge55jU7NBK1rr To: <sip:sip.pstnhub.microsoft.com:5061<http://sip.pstnhub.microsoft.com:5061>> Call-ID: 3f0f42b7-3a09-1238-5e8a-00155d11a606 CSeq: 8385268 OPTIONS User-Agent: FreeSWITCH-mod_sofia/1.8.6+git~20190606T190249Z~93b4c92e75~64bit Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY Supported: timer, path, replaces Allow-Events: talk, hold, conference, refer Content-Length: 0 ------------------------------------------------------------------------ recv 545 bytes from tls/[52.114.76.76]:5061 at 11:10:16.070876: ------------------------------------------------------------------------ SIP/2.0 403 Forbidden FROM: <sip:sip.pstnhub.microsoft.com:5061<http://sip.pstnhub.microsoft.com:5061>>;tag=ge55jU7NBK1rr TO: <sip:sip.pstnhub.microsoft.com:5061<http://sip.pstnhub.microsoft.com:5061>> CSEQ: 8385268 OPTIONS CALL-ID: 3f0f42b7-3a09-1238-5e8a-00155d11a606 VIA: SIP/2.0/TLS 177.53.17.168:5081;branch=z9hG4bKg5DyZ09c7Bv2r;rport REASON: Q.850;cause=21;text="29175f0d-ebe8-43ea-836f-708b6d4b0d4f;Record-Route and Contact headers are missing" CONTENT-LENGTH: 0 ALLOW: INVITE ALLOW: ACK ALLOW: OPTIONS ALLOW: CANCEL ALLOW: BYE ALLOW: NOTIFY SERVER: Microsoft.PSTNHub.SIPProxy v.2019.7.4.9 i.EUNO.2 ------------------------------------------------------------------------ How can I add these headers into OPTIONS msg ? Thanks and Regards Tulipa Frigo