Help with ICE Negotiation Debugging

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?

Copy of our pjsip.conf file:

Asterisk Logs:
( is the client in the SIP flow. We are using Asterisk 15.5.0)


Your INVITE has no SDP, and your ACK has no SDP. SDP negotiation can’t occur so it fails.

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.

Here’s a log file of when we’ve gotten it to work in the past:

Is there another way to get Asterisk to generate an offer for us?


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.

Just to clarify, is this the sequence?

  1. We send an INVITE to Asterisk.
  2. Asterisk sends 200OK with SDP offer
  3. Client sends ACK, but it needs to include the SDP answer (which we’re not sending right now)?

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.

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