Connecting to Microsoft SBC

I saw a lot of topics about connecting “FreePBX” to “Microsoft Teams” and most of them closed without any solution. I tried myself to check to see if I could connect these two wonderful technology.
I face a problem with the audio TLS and looking for help for this step.

[2023-09-30 06:46:15] ERROR[13138]: res_pjsip_session.c:938 handle_incoming_sdp: anonymous: Couldn’t negotiate stream 0:audio-0:audio:sendrecv (nothing)
<— Transmitting SIP response (511 bytes) to TLS: —>
SIP/2.0 488 Not Acceptable Here
Via: SIP/2.0/TLS;rport=31044;received=;branch=z9hG4bKea7c9cb6
Call-ID: 5b7cd43f970c54c49f89f59ad4c400eb
From: “Vahid Jamali” sip:[email protected];user=phone;tag=ea97c761a997406c9b7bc2ee4bc61f3b
To: sip:[email protected];user=phone;tag=64549dd4-deab-44ca-8beb-670a39ec352e
Server: FPBX-
Content-Length: 0

<— Received SIP request (533 bytes) from TLS: —>
ACK sip:[email protected]:5061;user=phone;transport=tls SIP/2.0
FROM: "Vahid Jamali"sip:[email protected]:5061;user=phone;tag=ea97c761a997406c9b7bc2ee4bc61f3b
TO: sip:[email protected];user=phone;tag=64549dd4-deab-44ca-8beb-670a39ec352e
CALL-ID: 5b7cd43f970c54c49f89f59ad4c400eb
VIA: SIP/2.0/TLS;branch=z9hG4bKea7c9cb6
USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2023.9.27.1 i.EUWE.2

Your log is incomplete; it doesn’t contain the SDP to which Asterisk is objecting.

The last useful line on the log is:

Everything after that is a consequence of that.

This can be caused by incompatible codecs or by incompatible encryption settings, but all that information precedes your first line.

I cannot help you with the error you are facing but I can add the following.

The main reason that FreePBX cannot connect with MS Teams is that the Sangoma Distro Version bundled asterisk uses resolved IPs instead of domain names in SIP Headers. MS Teams on the other hand needs a domain name in the header in order to verify with TLS.

It is doable, though only for homelab purposes, by installing asterisk from source code and apply a change. There was a proof-of-concept guide somewhere which I used out of curiosity and it worked.

Again, not for production. An SBC, and to be exact a Microsoft Certified SBC is the best way to go about it.

If for any reason find a way to actually set it up, I would be really curious on how you managed.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.