WebRTC HTML5sip over ws for PJSIP+Asterisk12(SVN)--bleeding

I have built and successfully configured asterisk 12 for standard sip registry,phones,trunk. It is working perfectly so far using PJSIP stack for softphones. I am unable to get the websocket part of it working and make a single call using HTML5SIP. I am getting an out of memory error(in asterisk cli) from IE11 and no call after sometime from chromium(x64).

Please have anyone been able to successfully achieve this? I am ready to post my full working config. I need someone to help me in build my project also with these new stacks and technology.

Here are some more info if it helps…

Asterisk CLI :
Connected to Asterisk SVN-trunk-r407625M currently running on debanjanbasu (pid = 20552)
== WebSocket connection from ‘122.163.23.67:12343’ for protocol ‘sip’ accepted using version ‘13’
– Added contact ‘sip:debanjanbasu@122.163.23.67:12343;transport=ws;rtcweb-breaker=yes’ to AOR ‘debanjanbasu’ with expiration of 200 seconds
[Feb 14 23:23:35] NOTICE[20563]: res_odbc.c:1536 odbc_obj_connect: Connecting asterisk
[Feb 14 23:23:35] NOTICE[20563]: res_odbc.c:1568 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk]
[Feb 14 23:24:05] ERROR[20621]: /usr/src/asterisk/include/asterisk/utils.h:587 _ast_realloc: Memory Allocation Failure in function __ast_websocket_read at line 452 of res_http_websocket.c

Nothing happens on the browser end.

I have enabled rtcbreaker and all the usual stuff and tested in vain. AVPF is also on. I don’t wanna use wss as it will consume resources. Considering the magnitude of the app I am developing.

One critical thing is that I am using realtime for pjsip configurations.

Also If this works I am eager to post a complete tutorial as I am sure this will benefit a lot of users pondering over the new technologies digium is pulling in - ARI,PJSIP,Sorcery.

Please help me dear friends and fellow asterisk users.

Seems like you are using SIPML5 you must disable the rtcbreaker if you are connecting via asterisk websocket and not via WebRTC2SIP media gateway.

In the other hand so far Asterisk 12 has some issues with the webrtc implementation, since there is no WebRTC release 1 the changes are too many for keep updated. in my testing you need to skip the transport type for the WS peers and that give a little help but only for audio because if you want to handle Video then there is no chance. If you really need the WS support downgrade to Asterisk 11.

I will try to downgrade and give it a shot. Will keep you guys updated on the final outcome. :cry:

Hi,debanjanbasu,

I am tring to configure Asterisk12 + PJSIP + sipML5.I use sipML5 to REGISTER,but every time server return “SIP/2.0 401 Unauthorized”.

I think my configs possiblly have some mistakes.Could you share your configs ?I really need your help.

Signals between sipML5 and Asterisk:

[code]*CLI> == WebSocket connection from ‘192.168.1.134:51060’ for protocol ‘sip’ accepted using version ‘13’
<— Received SIP request (686 bytes) from WS:192.168.1.134:51060 —>
REGISTER sip:192.168.1.131 SIP/2.0
Via: SIP/2.0/WS df7jal23ls0d.invalid;branch=z9hG4bKSlB1gH00U2ugCJlvEtOMLwM63v6vf1cw;rport
From: "zsk425"sip:103@192.168.1.131;tag=OhvCShq8av9Z0096oeGt
To: “zsk425"sip:103@192.168.1.131
Contact: “zsk425"sip:103@df7jal23ls0d.invalid;rtcweb-breaker=yes;transport=ws;expires=200;click2call=no;+g.oma.sip-im;+audio;language=“en,fr"
Call-ID: 20c0d36d-009a-941c-199b-8b24d035f6b3
CSeq: 32602 REGISTER
Content-Length: 0
Max-Forwards: 70
Authorization: Digest username=“103”,realm=“192.168.1.131”,nonce=””,uri=“sip:192.168.1.131”,response=”"
User-Agent: IM-client/OMA1.0 sipML5-v1.2014.04.18
Organization: Doubango Telecom
Supported: path

<— Transmitting SIP response (554 bytes) to WS:192.168.1.134:51060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/WS df7jal23ls0d.invalid;rport;received=192.168.1.134;branch=z9hG4bKSlB1gH00U2ugCJlvEtOMLwM63v6vf1cw
Call-ID: 20c0d36d-009a-941c-199b-8b24d035f6b3
From: “zsk425” sip:103@192.168.1.131;tag=OhvCShq8av9Z0096oeGt
To: “zsk425” sip:103@192.168.1.131;tag=z9hG4bKSlB1gH00U2ugCJlvEtOMLwM63v6vf1cw
CSeq: 32602 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1399521524/9341808f20764ba9508c12b5493bfe70”,opaque=“10a3a45248d69dee”,algorithm=md5,qop="auth"
Server: Asterisk PBX 12.2.0
Content-Length: 0

<— Received SIP request (859 bytes) from WS:192.168.1.134:51060 —>
REGISTER sip:192.168.1.131 SIP/2.0
Via: SIP/2.0/WS df7jal23ls0d.invalid;branch=z9hG4bKayZTTdXpzQdh5HatBnDidPpbmvRBt1UW;rport
From: "zsk425"sip:103@192.168.1.131;tag=OhvCShq8av9Z0096oeGt
To: "zsk425"sip:103@192.168.1.131
Contact: "zsk425"sip:103@df7jal23ls0d.invalid;rtcweb-breaker=yes;transport=ws;expires=200;click2call=no;+g.oma.sip-im;+audio;language="en,fr"
Call-ID: 20c0d36d-009a-941c-199b-8b24d035f6b3
CSeq: 32603 REGISTER
Content-Length: 0
Max-Forwards: 70
Authorization: Digest username=“103”,realm=“asterisk”,nonce=“1399521524/9341808f20764ba9508c12b5493bfe70”,uri=“sip:192.168.1.131”,response=“509a69ca45054b5c044a43a4d012640a”,algorithm=md5,cnonce=“e28697c975121af9c93dd03733633581”,opaque=“10a3a45248d69dee”,qop=auth,nc=00000001
User-Agent: IM-client/OMA1.0 sipML5-v1.2014.04.18
Organization: Doubango Telecom
Supported: path

<— Transmitting SIP response (554 bytes) to WS:192.168.1.134:51060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/WS df7jal23ls0d.invalid;rport;received=192.168.1.134;branch=z9hG4bKayZTTdXpzQdh5HatBnDidPpbmvRBt1UW
Call-ID: 20c0d36d-009a-941c-199b-8b24d035f6b3
From: “zsk425” sip:103@192.168.1.131;tag=OhvCShq8av9Z0096oeGt
To: “zsk425” sip:103@192.168.1.131;tag=z9hG4bKayZTTdXpzQdh5HatBnDidPpbmvRBt1UW
CSeq: 32603 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1399521524/9341808f20764ba9508c12b5493bfe70”,opaque=“320e119b456169ff”,algorithm=md5,qop="auth"
Server: Asterisk PBX 12.2.0
Content-Length: 0
[/code]