Dynamically changing the TURN URl in kurento group call

513 views
Skip to first unread message

akshay...@gmail.com

unread,
May 27, 2016, 10:43:32 AM5/27/16
to kurento
Hi,

In KMS WebRtcEndpoint.conf.ini file contains the default STUN/TURN server urls of kurento right?

Why doesnt the turn urls passed in

var iceServers = [
    {
      "url": "turn:xxx.xxx.xxx.xxx:3478",
      "username": "the_username",
      "credential": "the_password"
    }
  ];

var options = {
      localVideo: video,
      onicecandidate: _onIceCandidate,
      configuration: {
        iceServers: iceServers
      }
    };

doesnt override the one's specified in the .ini file.

How to make this work to change the turnurls dynamically as per requirement from the client side. Which means by specifiying in the configuration attribute above?

Please guide.
Thanks alot,
Akshay 

Ivan Gracia

unread,
May 27, 2016, 10:52:50 AM5/27/16
to Kurento Public
Because each peer in the WebRTC connection sets its own STUN/TURN servers. Keep in mind that the RTCPerrConnection in the client and the WebRtcEndpoint in the server are two separated "entities". You can (and probably should) use the same configuration for both.

Ivan Gracia



--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

akshay...@gmail.com

unread,
May 30, 2016, 3:10:54 AM5/30/16
to kurento
Hi Ivan,
Thank you for your response.

I am trying to modify the group call app so that it uses multiple TURN servers. The participants will be located in different locations. I wish to relay the entire media using TURN for all the participants. The TURN server should be selected dynamically everytime the participant joins from the client side.

To acheive this, I am passing multiple turn urls in the array of iceServers. Now as per the above configuration the TURN server which is closest rather the one whose ice candidates require least amount of time should automatically get selected as per the ICE specifications. But this is not happening in reality. The candidates received are from only that TURN server which is mentioned in both the WebRtcEndpoint.conf.ini and the client side.

Also I am able to mention only a single TURN server in the WebRtcEndpoint.conf.ini file. 

Because of this the TURN servers wont be selected from the given list.

Please help me to over come the above problems.
One kind request to please give me inline anwers for the questions above. Would really appreciate and be grateful for it.
Thank you,
Akshay

Ivan Gracia

unread,
Jun 14, 2016, 3:53:35 AM6/14/16
to Kurento Public
Hi,

Sorry for the late answer. Please find comments inline.

Ivan Gracia



On Mon, May 30, 2016 at 9:10 AM, <akshay...@gmail.com> wrote:
Hi Ivan,
Thank you for your response.

I am trying to modify the group call app so that it uses multiple TURN servers. The participants will be located in different locations. I wish to relay the entire media using TURN for all the participants. The TURN server should be selected dynamically everytime the participant joins from the client side.

To acheive this, I am passing multiple turn urls in the array of iceServers. Now as per the above configuration the TURN server which is closest rather the one whose ice candidates require least amount of time should automatically get selected as per the ICE specifications. But this is not happening in reality. The candidates received are from only that TURN server which is mentioned in both the WebRtcEndpoint.conf.ini and the client side.

Also I am able to mention only a single TURN server in the WebRtcEndpoint.conf.ini file. 


The configuration in KMS does not allow to provide an array of TURN servers. The client does.
 
 

Because of this the TURN servers wont be selected from the given list.

Please help me to over come the above problems.

For each WebRtcEndpoint, you can use the setTurnUrl method, indicating the TURN server that is closer to your client.

akshay...@gmail.com

unread,
Jun 14, 2016, 4:56:50 AM6/14/16
to kurento
Thank you for your response Ivan :-)
So you mean to say that for each webrtcendpoint I can set a different turnurl using the setTurnUrl in the same group call session?

Ivan Gracia

unread,
Jun 14, 2016, 4:58:05 AM6/14/16
to Kurento Public
Yap, that's correct.

Ivan Gracia


Reply all
Reply to author
Forward
0 new messages