# Asterisk and WebRTC problem

**URL:** <https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411>\
**Category:** Asterisk General\
**Created:** [July 19, 2016, 9:09am UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411 "2016-07-19T09:09:37Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![enzodd](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@enzodd](https://community.asterisk.org/u/enzodd)\
**Post date:** [July 19, 2016, 9:09am UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/1 "2016-07-19T09:09:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [July 19, 2016, 10:40am UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/2 "2016-07-19T10:40:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![enzodd](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@enzodd](https://community.asterisk.org/u/enzodd)\
**Post date:** [July 19, 2016, 11:07am UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/3 "2016-07-19T11:07:01Z")

</div>

Hi jcolp, thank you in advance.

Log are reported on [http://pastebin.com/ZtExp4AD](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

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [July 19, 2016, 11:19am UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/4 "2016-07-19T11:19:27Z")

</div>

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/](http://blogs.asterisk.org/2016/03/16/asterisk-13-8-0-now-easier-pjsip-install-method/)

---

<div class="post-metadata">

**Author:** ![enzodd](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@enzodd](https://community.asterisk.org/u/enzodd)\
**Post date:** [July 19, 2016, 12:04pm UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/5 "2016-07-19T12:04:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [July 19, 2016, 12:05pm UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/6 "2016-07-19T12:05:57Z")

</div>

Yes, Asterisk uses it for ICE support.

---

<div class="post-metadata">

**Author:** ![enzodd](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@enzodd](https://community.asterisk.org/u/enzodd)\
**Post date:** [July 19, 2016, 12:09pm UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/7 "2016-07-19T12:09:54Z")

</div>

Ok, I proceed with the installation of PJPROJECT.

Thank you, for now 😃

---

<div class="post-metadata">

**Author:** ![enzodd](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@enzodd](https://community.asterisk.org/u/enzodd)\
**Post date:** [July 19, 2016, 1:37pm UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/8 "2016-07-19T13:37:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [July 19, 2016, 1:38pm UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/9 "2016-07-19T13:38:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![enzodd](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@enzodd](https://community.asterisk.org/u/enzodd)\
**Post date:** [July 19, 2016, 1:41pm UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/10 "2016-07-19T13:41:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [July 19, 2016, 1:42pm UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/11 "2016-07-19T13:42:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![enzodd](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@enzodd](https://community.asterisk.org/u/enzodd)\
**Post date:** [July 19, 2016, 2:00pm UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/12 "2016-07-19T14:00:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [July 19, 2016, 2:02pm UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/13 "2016-07-19T14:02:13Z")

</div>

No, those do not prevent Zoiper itself from working.

---

<div class="post-metadata">

**Author:** ![enzodd](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@enzodd](https://community.asterisk.org/u/enzodd)\
**Post date:** [July 19, 2016, 2:12pm UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/14 "2016-07-19T14:12:09Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [July 19, 2016, 2:16pm UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/15 "2016-07-19T14:16:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![enzodd](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@enzodd](https://community.asterisk.org/u/enzodd)\
**Post date:** [July 20, 2016, 9:11am UTC](https://community.asterisk.org/t/asterisk-and-webrtc-problem/67411/16 "2016-07-20T09:11:41Z")

</div>

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?
