cordovawebrtcturnrfc5766turnserverkurento

Record webRTC session on server


I recently found out about a plugin for cordova called phoneRTC that allows for webrtc implementation. I build and run the demo provided and I am quite happy with the result. Now I want to know how I can record the webrtc sessions on a web server. curently the infrastructure is like this:

   Signalling Server
   /               \
CLIENT---------CLIENT



  TURN Server
    /     \
CLIENT    CLIENT

So the signaling server is used for discovering the participant and a connection is established. The TURN server is used if a connection cannot be established directly between the participants.

For the turn server rfc5766-turn-server is used and for the signalling server socket.io is used

What I want to do is record the sessions that go through the TURN server. is this possible? if so how can I achieve this?

EDIT: I also read about Kurento but I am having trouble understanding if I can achieve this with it.


Solution

  • From the PhoneRTC site

    Makes it easy to add WebRTC-based video and voice chat to your Cordova app without any third party servers. Android, iOS and Browser support!

    I'm no PhoneRTC expert, but after reviewing it a bit it seems like it creates p2p connections between all clients. Servers are used only in the signalling plane, so you are out of luck here, at least for a simple solution.

    If you want to do recording in a server, your media streams will have to go through the server, either going for a MCU or sending all streams to the server as another client (which is a bit dirty, IMHO)