WebRTC without SIP protocol

Can we make call through WebRTC in asterisk without SIP protocol ??

There is no built-in capability, no. You’d be writing C code and a channel driver to accomplish such a thing.

Thank you …,Is there any website link for reference ??

Reference for what? A guide for writing a channel driver and all the work involved as well as the WebRTC part? No.

1 Like

I don’t understand why you would want that. You need a way to tell what number to call, notify about incoming calls, send status information about calls, end calls.

You would end up just re-implementing a subset of the signalling features in SIP when you’re done.

@Chano Even though you may fundamentally reimplement certain goals of the signaling, with specific constraints/environment you can end up making it substantially simpler and easier. All depends on what is being achieved in the end and if it is worth it.

The way I see it, in most cases, the effort required to replace SIP, would be much higher, than just using SIP instead. Especially when most major programming languages already has a SIP over WebRTC libraries, where as making your own protocol, and implementing it in your communications software, would require making more or less everything from scratch.

That’s why I were curious about the purpose.

Whilst re-inventing wheels is often done for bad engineering reasons, typically marketing driven ones, there is a common danger in using an existing complex protocol to do something simple that you start building layer on layer on that and forget that the lower layers are already doing it for you.

(The typical marketing reasons I saw were to emulate Microsoft user interfaces when there weren’t published libraries for doing so, or when you wanted to run them on legacy systems. Other ones are insisting on a particular tool, when it is fashionable, when there is a much better tool available.))

Putting my 2c worth here… its important to note that there are two protocols at play here, SIP and SDP.

While huge portions of the SIP protocol is largely unnecessary when traversing along a WebSocket connection (browser to server), SDP is almost all used and absolutely necessary. I see the desire to replace SIP (and keep SDP), there could be a much more simple json format for audio/video/text/binary/etc setup. I have encountered a number of bespoke json based systems that still use SDP (natively parsed by the browser).

Some of them offer a conversion to SIP. So a possible solution would be to use one of these services like a proxy (Browser <===> json-to-sip <===> Asterisk), rather then attempting to write a channel driver for (an own branch of) Asterisk.

SDP is and is not required. The interface to the browser for that is SDP, but there is nothing that says you have to use SDP over the wire. In fact Discord doesn’t, they synthesize SDP to talk to the WebRTC part but over the wire it’s far more simplified and things that are unnecessary are removed.

Discord probably don’t use Asterisk.

SIP over WebRTC is a sledgehammer-for-an-ant, and, if json based, could even be handled by a simple node.js server, to “pass-over” the SDP. SIP is simply not necessary for WebRTC, its necessary for Asterisk.


   "type" : "audio"
   "source" : "Bob <200>"
   "destination" : "100"
   "sdp" : ".... browser generated offer ..."

If, as a developer you are in control of the client side development (HTML/JavaSripts), and can deploy an array of json proxy servers to handle WebRTC termination, just have that service “convert” to SIP based on a simple set of header manipulations, and pop in the SDP as passed by the json.

This way you leave Asterisk as-is (this is critical), and also only bother to use Asterisk when you truly need to, like a breakout call. Otherwise, for example, text messaging can all be handled peer-to-peer via the node.js server application (that you own).

Right, my response was from a general WebRTC perspective and not from an Asterisk perspective.

Of course.

I also do agree with Discord approach here, the SDP that is generated via Chrome, and Firefox etc is incredibly messy, and consumes much more unnecessary data. It can effect call setup, especially in a SFU conference.

There is another protocol that you could use, for which open-source code is already available: IAX2. This is implemented in Asterisk itself, and works over just one UDP port.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.