0

I am working to make a sip client for calling. As a server my company uses asterisk(VOS3000). The server doesn't support web socket. And now I want to know if there is any way to make a sip client using javascript being in my situation.

May be its silly but I am thinking about a solution like making a node js sip server(probably using sip.js) and then all requests coming to this server 'll be redirected to my asterisk server. Is it possible?

Or any other workaround?

KOUSIK MANDAL
  • 2,002
  • 1
  • 21
  • 46

1 Answers1

2

I'm not familiar with VOS3000, but Asterisk versions 11 and up have support WebRTC and SIP over WebSockets (newer the version the better). But if VOS3000 is based on an older version Asterisk or you're otherwise stuck, you can setup a gateway for WebRTC calls. There's a few of reasonable directions you could go.

  1. B2BUA - you could run a new version of Asterisk (or FreeSWITCH) and have it bridge calls between sip.js calls and your VOS3000. It would basically just act as a middleman in calls and speak WebRTC to your sip.js based applications and standard old SIP to your VOS3000. This would probably be the easier of the two routes and has the advantage of being able to do voice codec translation if the VOS3000 doesn't support the WebRTC codecs (if not for video, at least for voice).

  2. Proxy+Media Gateway - you could run something like Kamailio to proxy the SIP signaling from SIP over WebSockets to SIP over UDP and use rtpengine to convert the WebRTC DTLS-SRTP to RTP. This would scale/perform better, but is significantly more complicated to get setup right. It also will not get you codec translation if you need that.

  3. There are also service providers that will gateway the calls for you if you don't want to operate your own.

While sip.js will run just fine on node.js and that works really well for something custom that is running on node and also needs to act as a SIP user agent (for whatever reason), coding up a whole gateway and/or proxy would seem to be a lot of work when other options are available.

Laurel
  • 5,965
  • 14
  • 31
  • 57
John
  • 36
  • 2