0

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.

PU2014
  • 323
  • 5
  • 17
  • With Kurento(or any other media/MCU server), it is possible. With the TURN server, you would have to hack it as it is just designed to relay instead of decrypting/reencrypting the srtp packets. – Benjamin Trent Mar 12 '15 at 23:02
  • thank you for your reply. I have been doing some research on Kurento myself too but didn't find many beginner stuff. can you sugest a good tutorial/guide that will get me started to do the implementation with phoneRTC and Kurento? – PU2014 Mar 13 '15 at 01:10
  • @PU2014 Have a look at the [tutorials](http://www.kurento.org/docs/current/tutorials.html), especially [this one](http://www.kurento.org/docs/current/tutorials/java/tutorial-5-one2one-adv.html), which shows the recording capability at work, with some extra features like realtime stream processing through a gstreamer filter. – igracia Mar 13 '15 at 09:50
  • @igracia Thank you for your reply. I have been reading the tutorials and trying to understand the concept but I can't seem to grasp the part on how to integrate kurento with phonertc – PU2014 Mar 13 '15 at 12:53

1 Answers1

0

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)

igracia
  • 3,543
  • 1
  • 18
  • 23
  • isn't the TURN server used when no direct p2p connection can be established between clients? From what I understand if p2p connection fails for some reason (maybe a network configuration) the TURN server is used as a proxy. I was thinking about somehow enforcing the TURN server usage (or use a media server if possible instead of the TURN server). – PU2014 Mar 14 '15 at 13:12
  • @PU2014 TURN server is used in the case of symmetric NATs, when there can be no p2p connection due to the nature of the NAT. In most cases, it will be enough to use STUN server to traverse the NAT, and to get the pulic IP to which the other endpoint has to connect to exchange media. Kurento is not a TURN/STUN server, but a media server that will use STUN/TURN to traverse NATs. What you are describing is an MCU architecture, where all clients are connected to the media server. In that sense, PhoneRTC will not help you since it is used for p2p connections. – igracia Mar 14 '15 at 16:41
  • thank you for the explanation. do you know any cordova plugins that can be integrated with kurento and run both on ios and android? or do I have to write the webrtc js implementation myself using to work with cordova and kuranto? – PU2014 Mar 14 '15 at 21:25
  • @PU2014 Maybe you can check the Iconic framework. Also, there are some users that have written their own clients for iOS and Android, but I don't know how far they got. Perhaps you could contact them, see if they have some available code. – igracia Mar 17 '15 at 17:37