Is it possible to have Asterisk as the signalling

2019-07-09 14:41发布

问题:

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. :)

回答1:

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!



回答2:

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)



标签: webrtc