Is it possible to have Asterisk as the signalling server for WebRTC enabled mobile app


Is it possible to have Asterisk as the signalling server for WebRTC enabled mobile app



Is it possible to have Asterisk as the signaling server for WebRTC enabled mobile app. I have found that I need to create the signaling server in node.js. I was wondering whether Asterisk can do the job for me.



Also, does the WebRTC media pass through the signaling server (or) is it direct device to device media transfer.



Any help is appreciated. Thank you. :)




2 Answers
2



If you want WebRTC signal switching alone then you can use some websocket server like socket.io but it won't handle STUN or TURN.



If you want WebRTC signalling along with STUN,TURN and media recording then you can go with Kurento, Freeswitch, asterisk etc.



If you carry media over signalling server then you might consume more CPU and memory processing on server side. Try to keep peer-peer direct media to get better audio and video.



But in all these case you need to register your endpoints to the signalling server. So if you call B from A. the signalling server knows where B is!





Thanks for the help. :)
– Ravi Ranjan Singh
Aug 8 '16 at 5:29



Is it possible to have Asterisk as the signalling server for WebRTC enabled mobile app?



Of course. Just use SIP over websocket (RFC 7118). See this Asterisk WebRTC setup guide for the details. If you already have an Asterisk server, then there is no need to implement a separate signaling server in node.js.



Also, does the WebRTC media pass through the signaling server (or) is it direct device to device media transfer.



This is handled automatically by ICE. Ideally your goal should be to have as many peer to peer media as possible to minimize the server load. However in some situations a relay is required which can be the Asterisk server itself or a separate TURN server. Also make sure to set the STUN correctly (that is required for STUN to find the direct path)





Thanks for the guidance :) I have a small doubt. If a WebRTC peer A wants to call another peer B, will Asterisk be able to find B so that the call will ring on that device for B to accept the call? I am confused because both peers have to join a room before talking to each other. And B might not know that A wants to call him, so how can he join the room? :)
– Ravi Ranjan Singh
Aug 6 '16 at 9:09






Probably too late, but maybe it helps for somebody else: If both peers are local asterisk extensions, then Asterisk will find the destination without any specific dialplan
– Istvan
May 19 '17 at 3:29






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to make file upload 'Required' in Contact Form 7?

Rothschild family

amazon EC2 - How to make wp-config.php to writable?