0

I am attempting to send http request from the tool TRYITJsSIP through kamailio to asterisk, however, kamailio returns an error on tcp_read_req (state 7; bad request, no other serror given). Is there a setting I need to allow http packets to pass through kamailio. Note: It does work when I use a tool like MicroSIP or LinPhone.

Thank you

sw007
  • 41
  • 7
  • why you want use sip proxy instead of http proxy? – arheops Oct 27 '17 at 22:15
  • All of our calls are required to go through asterisk, and we currently have kamailio in front of asterisk for for sip calls. My requirement is to determine if I can send wetRTC through kamailio into asterisk's ws port. Thank you for your response. – sw007 Oct 28 '17 at 00:48
  • WebRTC is not http. Yes, kamailio can handle webrtc and can do webrtc to sip convertion(recomended) for asterisk. – arheops Oct 28 '17 at 03:47

1 Answers1

0

Browsers (at least modern browsers) in which WebRTC apps execute require, in order to allow sharing audio and video devices, connections with servers to be done in a secure way. In web, you could use of WSS. Asterisk and Kamailio support WSS (WebSockets Secure) as transport for SIP.

It is possible (I have done it) to configure chan_pjsip in Asterisk to use WSS as transport (chan_sip also can be configured in that way, but I have not yet experience in WSS with chan_sip). Kamailio has the WebSocket module that also allows it to manage WSS SIP connections. I have used a fork of JsSIP (SIP.js), but it is completely arguable and you may have your own selection criteria.

Thus, you can connect

Web app WebRTC -> WSS -> Asterisk

or

Web app WebRTC -> WSS -> Kamailio -> UDP -> Asterisk

or, of course, whatever architecture you feel comfortable with. The only thing to have into account is that connections between browser and SIP Proxy are to be done in a secure way (you could use also DTLS-SRTP because Asterisk and Kamailio support it and both are natively supported by WebRTC, but, once again, I have not tested it myself).

J.M. Robles
  • 614
  • 5
  • 9
  • Thank you very much for this detail...it really is appreciated! – sw007 Nov 14 '17 at 09:50
  • I have attempted using sipML5 instead of tryit but I have not been able to figure out the configuration. I am having kamailio listen on port 15000 so i changed my sipML5 to wss://21.1.1.32:15000/ I see the request coming through to kamalio but I just see a disconnected message from sipML5. I have tried many configurations but just can't get a connection. – sw007 Nov 20 '17 at 13:57
  • I would suggest testing firstly without kamailio (WebRTC - WSS - Asterisk). I can confirm you that it works both with sipml5 and sip.js using chan_pjsip. Then you could concentrate yourself in configuring kamailio. If not possible, I would read [this presentation](https://es.slideshare.net/crocodilertc/sip-over-websocket-on-kamailio), [this tutorial](http://nil.uniza.sk/sip/kamailio/configuring-kamailio-4x-websocket) and [this conversation](https://groups.google.com/forum/#!topic/2600hz-dev/UeUqXO94zhc) – J.M. Robles Nov 21 '17 at 04:19