Asterisk and WebRTC problem

Hello to all,

I am building a small application that make a call to the asterisk server. The call works properly, arrive to server without problem, just as soon as the server responds, it is terminated (like if anyone sends a hangup message). With Zoiper this does not happens.

Can anyone tell me why? Thanks so much

You will need to provide console output and logging for someone to look at before any real information can be provided about why it might not be working.

Hi jcolp, thank you in advance.

Log are reported on http://pastebin.com/ZtExp4AD

You can see (at the end more or less) that the server receive a BYE message, but i don’t send it.

Help me please,

Cheers

Your Asterisk was not built with PJPROJECT[1] support so it does not support ICE. ICE is required for WebRTC.

[1] http://blogs.asterisk.org/2016/03/16/asterisk-13-8-0-now-easier-pjsip-install-method/

So you say that in order to use WebRTC I must install PJProject also?

Yes, Asterisk uses it for ICE support.

Ok, I proceed with the installation of PJPROJECT.

Thank you, for now :smiley:

Hi jcolp,

do you know why this error appears when I try to register with a user? Now I’m using PJSIP.conf

Contact 6002/sip:6002@192.168.0.105:5060;transport=UDP;rinstance=44cef6cd3468b5b4 is now Unknown. RTT: 0.000 msec
[Jul 19 15:26:32] WARNING[89735]: res_pjsip_pubsub.c:3008 pubsub_on_rx_publish_request: No registered publish handler for event presence
[Jul 19 15:26:32] WARNING[89735]: res_pjsip_pubsub.c:625 subscription_get_handler_from_rdata: No registered subscribe handler for event presence.winfo

Cheers

The device is trying to publish presence state, which is not implemented in Asterisk. It is also trying to subscribe to get data about presence.winfo which is also not implemented.

Are these a modules to install in asterisk? Or what?

They have not been implemented, there are no modules to install to support them and the messages can be ignored.

So, i must ignore them and go ahead? Thus, i can not connect to asterisk through Zoiper software…

No, those do not prevent Zoiper itself from working.

ok ok thank you. Returning to WebRTC, now with PJSIP does not ends immediately the call sending a BYE message to the server. However, after about 30 seconds reads console:

== WebSocket connection from '192.168.0.105:61227' for protocol 'sip' accepted version using '13'
    - Registered SIP '6001' at 192.168.0.105:61227
  == Using SIP RTP CoS mark 5
    - Executing [100 @ from-internal: 1] MeetMe ( "SIP / 6001-00000003," "1234, M, 0000") in new stack
       > 0x7f8548002580 - Probation passed - setting RTP source address to 192.168.0.105:49256
  == Parsing '/etc/asterisk/meetme.conf': Found
    - Created MeetMe conference 1020 conference for '1234'
    - <SIP / 6001-00000003> Playing 'conf-onlyperson.gsm' (language 'en')
    - Started music on hold, class 'default', on channel 'SIP / 6001-00000003'
    - Stopped music on hold on SIP / 6001-00000003
    - Started music on hold, class 'default', on channel 'SIP / 6001-00000003'
    - Got SIP response 500 "JsSIP Internal Error" back from 192.168.0.105:5060
    - Hungup 'DAHDI / pseudo-116508172'
  == Spawn extension (from-internal, 100, 1) non-zero on exited 'SIP / 6001-00000003'
    - Stopped music on hold on SIP / 6001-00000003

the problem is here: Got SIP response 500 “JsSIP Internal Error” back from […]

Any suggestions?

That’s an error from JsSIP as it mentions, you’d have to look at JsSIP to understand what is going wrong.

Hello jcolp,

Now I can finally connect to the asterisk server through WebRTC and Zoiper as well.

But the problem now is that I don’t hear the sound when connection established between two endpoints, until I am alone i can hear the music “music on hold” without problem.

Can you help me? is a routing problem in your opinion?