We are trying to establish a WebRTC audio call with Asterisk. We have Asterisk configured using pjsip.conf. We send a SIP INVITE and receive an SDP offer from Asterisk. We process the offer and create an answer to send back to asterisk. When a SIP ACK is sent to Asterisk for the offer, Asterisk immediately sends a BYE and the ice setup fails. The BYE message from Asterisk has reason: Q850;cause=0. Asterisk and the client are on the same network with no NAT.
We have set these in the Asterisk CLI:
pjsip set logger on
core set verbose 5
core set debug 5
Even though we have these logging options set, we still don’t seem to be getting enough information to properly debug what the problem is. Does anyone have any advice on further steps that we can take to better debug this?
We’re using the INVITE to get Asterisk to give us an SDP offer (instead of sending Asterisk an offer). We have done this previously and gotten it to work by using chan_sip, but now we are trying to get it to work with pjsip and dtls.
It is sending an offer, but it’s expecting an SDP answer so it can perform SDP negotiation. You don’t appear to be providing one. Even if things still worked without an answer then ICE and DTLS couldn’t, because information is exchanged to actually perform the negotiation. In the case of DTLS the fingerprint is exchanged. In the case of ICE the candidates and username/password are exchanged.
Yes that should work although I don’t know if anyone has strictly tried it with WebRTC, as it’s not common usage. Most usage is that the INVITE includes an SDP offer and then the 200 OK includes the SDP answer.