Early media / ringing tone on invite

459 views
Skip to first unread message

adej...@gmail.com

unread,
Mar 1, 2018, 8:52:49 AM3/1/18
to SIP.js
I'm trying out SIP.js and JsSIP to make calls from the browser, via our Asterisk server - to landlines.

Using the JsSIP library, upon "call"ing I get a ringing tone, and whatever is going on on the landline side of things. My dangerous assumption is that this is somehow related to early media that is connected up via the peer connection.

Using SIP.js I don't get the same "early media" - i.e. no ringing tone. Once the call is connected the audio works just fine.

I've stumbled across various pieces of information about this, i.e.:
- this pull request: https://github.com/onsip/SIP.js/pull/502
- this 'monkey patch': https://github.com/onsip/SIP.js/issues/211#issuecomment-132993517

Eric mentioned that "You need to do 100 rel and invite without sdp." - but to no avail.

Am I missing something - is there a particular kind of magic sauce of config that I have to use to get this to work?

I am quite keen to use SIP.js because of the pluggability of the authenticationFactory.

Eric Green

unread,
Mar 1, 2018, 9:57:30 AM3/1/18
to SIP.js
You are most likely using early media. I would need to see the SIP trace to be sure. Early media certainly works with SIP.js and the comments in that PR are still accurate. If you provide your SIP.js logs (in a gist) with traceSip enabled I can most likely tell you what is going on. 
Message has been deleted

adej...@gmail.com

unread,
Mar 1, 2018, 10:39:50 AM3/1/18
to SIP.js
Sure - here it is: https://gist.github.com/adejongh/245bdbc0430e2312c5639b99a763d21b
I hope I've removed everything that is sensitive!

The other issue is that sometimes using the rel100 and invite without sdp options the call gets dropped from the Asterisk server - happened in this case. Not sure why :-(

Eric Green

unread,
Mar 2, 2018, 10:47:03 AM3/2/18
to SIP.js
In that gist I see 2 calls each with a separate issue.

First of all Invite w/ SDP with 100rel enabled (outgoing invite), getting a 183 appears to make SIP.js go into a bad state. I will certainly fix this. However, you are not sending SDP in the 200 OK on this, and the work to fix this will make it so that the 183 is ignored, due to issues outlined in the Github issue.

Secondly, it appears that on the invite you are receiving (incoming invite). The call appears to set up successfully and then Freepbx hangs up the call. This looks to be an issue with freepbx.

adej...@gmail.com

unread,
Mar 2, 2018, 3:52:35 PM3/2/18
to SIP.js
Thank you Eric. I think the Asterisk server does not like the 100rel plus the invite without SDP very much.
Reply all
Reply to author
Forward
0 new messages