SIP.js 0.6.4 / Asterisk 11.14.1 => Audio stopped working some days ago

1,900 views
Skip to first unread message

mwoop

unread,
Jan 21, 2015, 7:43:06 AM1/21/15
to sip...@googlegroups.com
Hi guys,

I had a working demo where people could call us through our website using SIP.js 0.6.4 via Asterisk through websockets. 

The demo can be found here - german language, simply click "Anrufen" to start the call:

It worked perfectly for several weeks.

I don't know what happened but this demo stopped working a few days ago. Connection is established successfully but no audio is flowing. RTP debug shows packets of length 160 sent to and from public IP addresses of the end points.

In the console I can see the following:
Wed Jan 21 2015 13:39:05 GMT+0100 (CET) | sip.dialog | new UAC dialog created with status CONFIRMED
sip-0.6.4.min.js:36 Wed Jan 21 2015 13:39:05 GMT+0100 (CET) | sip.invitecontext.mediahandler | emitting event setDescription
sip-0.6.4.min.js:36 Wed Jan 21 2015 13:39:05 GMT+0100 (CET) | sip.invitecontext.mediahandler | stream added: default
sip-0.6.4.min.js:36 Wed Jan 21 2015 13:39:05 GMT+0100 (CET) | sip.invitecontext.mediahandler | emitting event addStream
sip-0.6.4.min.js:36 Wed Jan 21 2015 13:39:05 GMT+0100 (CET) | sip.invitecontext.mediahandler | ICE connection state changed to "checking"
sip-0.6.4.min.js:36 Wed Jan 21 2015 13:39:05 GMT+0100 (CET) | sip.inviteclientcontext | emitting event accepted

===> Call is connected here, no audio is flowing

sip-0.6.4.min.js:36 Wed Jan 21 2015 13:39:22 GMT+0100 (CET) | sip.transaction.ict | Timer B expired for INVITE client transaction z9hG4bK8575460
sip-0.6.4.min.js:36 Wed Jan 21 2015 13:39:22 GMT+0100 (CET) | sip.transaction.ict | Timer M expired for INVITE client transaction z9hG4bK8575460
sip-0.6.4.min.js:36 Wed Jan 21 2015 13:39:22 GMT+0100 (CET) | sip.transaction.ict | emitting event stateChanged
sip-0.6.4.min.js:36 Wed Jan 21 2015 13:39:22 GMT+0100 (CET) | sip.ua | emitting event transactionDestroyed

Right now I am bit lost and any help is appreciated. What does Timer B and Timer M mean? Why do they expire?

Thank you, Mark.

Joseph Frazier

unread,
Jan 21, 2015, 11:16:22 AM1/21/15
to sip...@googlegroups.com
Hi mwoop,

Thanks for using SIP.js! Can you set traceSip:true in the UA config, then provide a gist with the updated console log?

> What does Timer B and Timer M mean?

Timers B and M are defined in SIP RFCs 3261 and 6026, respectively. It's hard to say exactly why they expire, but hopefully the updated console logs will provide some clues.

Thanks,
Joseph

mwoop

unread,
Jan 21, 2015, 12:50:35 PM1/21/15
to sip...@googlegroups.com
Hi Joseph,

thanks for your quick reply.


Thanks for using SIP.js! Can you set traceSip:true in the UA config, then provide a gist with the updated console log?

Eric Green

unread,
Jan 21, 2015, 1:07:36 PM1/21/15
to sip...@googlegroups.com
Hi mwoop,

Joseph and I were discussing this, and we believe that the timers are unrelated to your media issue. It looks like ICE is never completing between the browser and Asterisk. This is most likely a problem with Asterisk itself. I would recommend looking at: https://wiki.asterisk.org/wiki/display/AST/Secure+Calling+Tutorial and following up with Asterisk.

-Eric Green

mwoop

unread,
Jan 21, 2015, 1:39:12 PM1/21/15
to sip...@googlegroups.com
Hi Eric,

thanks for your investigation - however everything was working perfectly. That's really frustrating.

The tutorial you recommended is the tutorial I followed when setting up TLS and generating keys.

However - I will try to verify everything again. Maybe there is somebody out there with a similar problem and solution.

Thx, Mark.

mwoop

unread,
Jan 23, 2015, 2:31:36 AM1/23/15
to sip...@googlegroups.com
Hi Eric, hi Joseph,

I simplified our demo so we now just play an audio file once connected to our Asterisk PBX. 

I now traced SIP and RTP traffic on the Asterisk side which looks absolutely fine to me. I don't see any errors. Could you please have a look at this: https://gist.github.com/anonymous/ea6f93cf84587fb595db

Do you find anything suspicious or false behaviour? Connection is still established correctly but I don't hear any audio (tested in Chrome, Firefox and Opera).

Thank you so much, Mark.

Eric Green

unread,
Jan 23, 2015, 1:45:44 PM1/23/15
to sip...@googlegroups.com
Hi Mark,

It definitely looks like one way audio. In terms of SIP signaling and the browser though I do not see anything that looks out of place. I am not sure what your networks topology looks like. Is it possible to put the Asterisk server on a public IP address to avoid NAT scenarios?

Thanks,
-Eric Green

mwoop

unread,
Jan 24, 2015, 4:51:29 AM1/24/15
to sip...@googlegroups.com
Hi Eric, 

once again: thanks for looking into this. Our Asterisk machine is running on Amazon EC2 so we do have a public IP (which is 54.93.175.231).

In my last trace you can see that Asterisk is sending RTP packets to my client's public IP address (which was 46.115.144.187). However no audio can be heard on the client side (no firewall active on my computer/router). Doing a local wireshark trace I can also see the packets coming in from our Asterisk's public IP but I cannot hear anything. To make sure that my computer is doing well I tested on different computers with no success.

I am totally confused because everything was working perfectly and however suddenly stopped working some days ago :(

I am close to do a total re-install which I already tried with a system image I created from the last working configuration. Even this AMI (Amazon machine image) is no longer working.

Could there be any issues with the STUN dialog? We are using Google's public STUN server.

Best regards, Mark.

Eric Green

unread,
Jan 24, 2015, 8:29:21 AM1/24/15
to mwoop, sip...@googlegroups.com
If you are doing a wireshark on the client machine you should be able to see if there is a STUN issue or not. You could also try a different STUN server. We use Google STUN server and have no issues.

Eric Green



--
You received this message because you are subscribed to the Google Groups "SIP.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sip_js+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mwoop

unread,
Jan 25, 2015, 4:16:15 AM1/25/15
to sip...@googlegroups.com, wie...@woop.la

If you are doing a wireshark on the client machine you should be able to see if there is a STUN issue or not. You could also try a different STUN server. We use Google STUN server and have no issues.

Ok, STUN seems to work fine. I can see several Binding Requests and Binding Success Responses reporting the correct public IPs and ports of the endpoints involved (Chrome client and Asterisk server).

I guess I will need to re-configure everything at this point. I will start to re-design my HTML/JS code - maybe there is an issue hidden in there as I absolutely cannot find anything wrong elsewhere. Last step might be to start from scratch and setup a new server :(

Anyway: thanks for your help & support.

Mark.

joo...@gmail.com

unread,
Jan 26, 2015, 1:21:08 AM1/26/15
to sip...@googlegroups.com, wie...@woop.la
Hello mwoop, I have experienced exactly the same problem. All was working right since last Friday, all IPs are correct, audio comes to chrome but no audio heard.

Have you discovered where can the problem come from??.

Thank you.

mwoop

unread,
Jan 26, 2015, 1:49:50 AM1/26/15
to sip...@googlegroups.com, wie...@woop.la, joo...@gmail.com
Hi Joorge,
 
Hello mwoop, I have experienced exactly the same problem. All was working right since last Friday, all IPs are correct, audio comes to chrome but no audio heard.

Have you discovered where can the problem come from??.

no, I have no idea yet. Sorry. Have you tried your application in different browsers?

Cheers, Mark.

joo...@gmail.com

unread,
Jan 26, 2015, 3:18:47 AM1/26/15
to sip...@googlegroups.com, wie...@woop.la, joo...@gmail.com
hi!.

Yes, I've tried with Chrome and Firefox and the result is the same.

What I only see is that the Chrome console stops on:

ICE connection state changed to "checking"

and the normally what should be:

ICE connection state changed to "checking"
ICE connection state changed to "completed"

I have tried in local network in order to discard NAT problems and also with different STUN server, but no solution.

You can see my simple implementation in: http://freevoice.com.es/cubitos/

Just click on "Call" and you chould listen monkeys from PBX.

mwoop

unread,
Jan 26, 2015, 3:31:40 AM1/26/15
to sip...@googlegroups.com, wie...@woop.la, joo...@gmail.com
Hi Joorge,

ok - this looks like my type of problem as well.

Please post updates here in case you will find a solution to this one. I will do so as well.

Thx, Mark.

joo...@gmail.com

unread,
Jan 26, 2015, 5:25:29 AM1/26/15
to sip...@googlegroups.com, wie...@woop.la, joo...@gmail.com
I have tried in Firefox, and the console log shows ICE state changes to connected:

ICE connection state changed to "checking"
emitting event accepted
stream added: undefined
emitting event addStream
ICE connection state changed to "connected""

But no audio.

Also in chrome://webrtc-internals/ I see how bytes are received when audio comes, but no audio.

joo...@gmail.com

unread,
Jan 27, 2015, 4:33:14 PM1/27/15
to sip...@googlegroups.com, wie...@woop.la, joo...@gmail.com
Hi mwoop.

Have you found any solutions?.

I have tried ubuntu and centos. Asterisk versions 11, 12 and 13. Different implementations of srtp and many other things...

I'm sure it's not a problem of client implementation, I've tried http://sipjs.com/demo-phone/ and also jssip demo and sipml5 demo.

All of them with the same result, I receive bytes in chrome://webrtc-internals but no audio heard. Also tried in Windows with chrome and firefox and MacOS with Chrome, Firefox and opera.

I think it's a problem in asterisk, but I'm not able to find it. I'm desperate because it was working for las two weeks and suddently it doesn't work.

Thank you!!!

mwoop

unread,
Jan 28, 2015, 2:36:06 AM1/28/15
to sip...@googlegroups.com, wie...@woop.la, joo...@gmail.com
Hi Joorge,

unfortunately I am currently unable to do intensive testing. I hope I will be able to continue testing in 1-2 weeks.

However I agree that this is an Asterisk issue and I am desperate as well because of the sudden malfunction. I am running Asterisk 11.14.1 which was working perfectly. 

I will try to do a new install in 1-2 weeks to see if this fixes it. I will keep you updated.

Thx, Mark.

mwoop

unread,
Feb 2, 2015, 4:46:33 AM2/2/15
to sip...@googlegroups.com, wie...@woop.la, joo...@gmail.com
Joorge, Eric, Joseph,

I re-installed everything but experience a new problem:

Asterisk answers the call but immediately disconnects the call when an audio prompt should be played. Check line 329 in the GIST file:
Failed to set remote answer sdp: Called with SDP without ice-ufrag and ice-pwd.

According to several examples on the web this error is because of a missing uuid/libuuid or uuid-devel/libuuid-devel. I am running the sever on Amazon Linux. Here is the SIP debug:

I am not sure how to verify if everything is installed in the right place but I did install libuuid and uuid before configuring Asterisk.

Any ideas?

Thx, Mark.

joo...@gmail.com

unread,
Feb 2, 2015, 5:34:15 AM2/2/15
to sip...@googlegroups.com, wie...@woop.la, joo...@gmail.com
Hello.

To solve that problem verify the following steps:

- Install libsrtp, uuid and libuuid.
- In asterisk source directory, do a "make clean" and "make distclean"
- Now run ./configure (with --libdir=/usr/lib64 if centos)

Then make and make install as usually.

That solved me that problem.


-

sats...@gmail.com

unread,
Feb 3, 2015, 2:50:55 AM2/3/15
to sip...@googlegroups.com, wie...@woop.la, joo...@gmail.com
понедельник, 2 февраля 2015 г., 12:34:15 UTC+2 пользователь joo...@gmail.com написал:
i tryed


asterisk 11.11
11.15.1
13.1.1

webrtc:
http://sipjs.com/demo-phone/
http://tryit.jssip.net/
http://sipml5.org/call.htm?svn=222

Browsers:
Chrome 40 & 37
Firefox 35

no audio
before i tryed about 3 month ago---EVERYTHING WORKED!


mwoop

unread,
Feb 3, 2015, 5:31:28 AM2/3/15
to sip...@googlegroups.com, wie...@woop.la, joo...@gmail.com
Hi Joorge,

I finally got it working again - not sure if this will solve your issues too.

In sip.conf I set: 
externaddr = MY PUBLIC ASTERISK IP
media_address = MY PUBLIC ASTERISK IP

In the peer/user config (WebRTC client definition) I changed:
dtlsverify=fingerprint to dtlsverify=no

I haven't changed anything in the HTML/Javascript code. Everything is working like before right now.

Good luck, Mark.

wintjens...@gmail.com

unread,
Feb 11, 2015, 5:10:18 AM2/11/15
to sip...@googlegroups.com, wie...@woop.la, joo...@gmail.com
Hello,

I have the same issue, my configuration was working perfectly then since few days (maybe week didn't try my application for quite some time) I have no sound when I make call with my browser. My asterisk server is working with softphones.

I think the problem comes from the ICE connection. When I answer the call the ice state becomes: ICEConnectionStateChecking. And the connection is never made. Same problem with Firefox.

Maybe the problem is in the update of the browsers and some changes in the ICE protocol.

I tried the solution of Mark but no luck.

Does anyone find another solution to the problem?

Kind regards.

joo...@gmail.com

unread,
Feb 11, 2015, 5:36:35 AM2/11/15
to sip...@googlegroups.com, wie...@woop.la, joo...@gmail.com, wintjens...@gmail.com
Hello, I haven't found the solutions.

I only checked with chrome before stop working. Now it doesn't work in any browser, I have also tried Mark solution but no luck.

If you find the solution please inform. Thx

Santiago Gimeno

unread,
Feb 11, 2015, 6:01:28 AM2/11/15
to joo...@gmail.com, sip...@googlegroups.com, wie...@woop.la, wintjens...@gmail.com
Hi,

I had similar problems for a few days. They were related with DTLS handshake was broken with latest openssl versions. I had to downgrade openssl so it worked again. Apparently a workaround has been added in latest asterisk versions. See:

https://issues.asterisk.org/jira/browse/ASTERISK-24711

I hope this helps.

Santi

wintjens...@gmail.com

unread,
Feb 11, 2015, 7:03:49 AM2/11/15
to sip...@googlegroups.com, joo...@gmail.com, wie...@woop.la, wintjens...@gmail.com
Upgrading Asterisk to 13.2.0 solved my problem. Thank you for your quick answer Santiago.

Hope it will solved the initial problem as well.

joo...@gmail.com

unread,
Feb 11, 2015, 3:13:36 PM2/11/15
to sip...@googlegroups.com, joo...@gmail.com, wie...@woop.la, wintjens...@gmail.com
Yes!!!!, finally it solved the problem. really thanks to Santiago for the solution.

I updated to 11.16 (latest trunk version) and it solved the problem.

Антон Сацкий

unread,
Feb 12, 2015, 8:41:34 AM2/12/15
to joo...@gmail.com, sip...@googlegroups.com, wie...@woop.la, wintjens...@gmail.com
SORRY for stupid question  but
HOW TO DOWNLOAD  11.16 (latest trunk version)
THANKS

You received this message because you are subscribed to a topic in the Google Groups "SIP.js" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sip_js/d5Tivv02Ct0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sip_js+un...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Best regards
Antony
моб (066) 919-75-33
моб (063) 656-43-40

joo...@gmail.com

unread,
Feb 12, 2015, 9:00:18 AM2/12/15
to sip...@googlegroups.com, joo...@gmail.com, wie...@woop.la, wintjens...@gmail.com, sats...@gmail.com
You can download from:

http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-11-current.tar.gz

This is always the latest one, you will see after uncompress that it corresponds (today) to 11.16.

I hope it helps.
Bye!
Reply all
Reply to author
Forward
0 new messages