Score:0

SIP Websocket to UDP proxy server

no flag

There is an ATS provider with SIP phones. It provides phones via UDP, as I understand, giving sip server, login and password for each internal call-line.

I want to write a site with browser calls ability. As I understood, searching the web, I can't make complete calls (including audio streams) directly though UDP. For UDP connection I need programs like Zoiper or Microsip.

Instead, as I read, I should have kinda like proxy SIP-server, that will be a gateway between a browser, that can work with Websocket, WebRTC protocol, and the SIP-server, that can work with UDP. At the site, I am, probably going to use JsSip, here the example code with data, I will need to connect to future proxy server

var socket = new JsSIP.WebSocketInterface('wss://sip.myhost.com');
var configuration = {
  sockets  : [ socket ],
  uri      : 'sip:[email protected]',
  password : 'superpassword'
};

I have read about Asterisk, Freeswitch and some other SIP-servers, but, first of all, I have never worked with something like this, and I am bad at Linux, and the second, I didn't find topics on Websocket-UDP proxying.

I also need server to handle multiple calls (streams) at one time, do not know is it default feature, so mention.

Currently I have VPS with Ubuntu 22.04, FastPanel installed there, and ready SSH connection with root rights. Can someone guide me how do I achieve SIP-proxy functionality?

Score:0
br flag

A gateway between SIP over websocket (webrtc) and SIP over UDP can be built using Kamailio SIP Proxy/Server and RTPEngine, one example that could be a good starting point is available at:

Searching on the web should reveal other examples of using Kamailio+RTPengine for this purpose. The system should support many calls at the same time by default.

If it is needed to receive calls on WebRTC side, then the JS phone app has to register via proxy and the main registrar server has to support the SIP Path extension. The kamailio.cfg might need updates as well to use the path module to add and handle Path header.

As a side not, if you want to use a different protocol on WebRTC side (e.g., custom JSON signalling), look at Janus Gateway project.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.