About specifying STUN and TURN servers for client and Kurento.

1,759 views
Skip to first unread message

Addy D

unread,
May 29, 2017, 3:30:28 AM5/29/17
to kur...@googlegroups.com
Hi all,

I am facing issues with specifying TURN and STUN both servers, I am using google's open stun server stun4.l.google.com:19302 and I have specified the configuration in Kurento's WebRtcEndpoint.conf.ini as shown below

stunServerAddress=stun4.l.google.com
stunServerPort=19302

and I have also specified it in the javascript client using following:


var TURN = {
        url: 'turn:ho...@turn.bistri.com:80',
        credential: 'homeo'
};

var NUMB_TURN = {
        'url' : 'turn:numb.viagenie.ca',
        'credentials' : 'peaas',
        'username':'ayushya....@peaas.co'
}

var NUMB_STUN = {
        'url' : 'turn:numb.viagenie.ca',
        'credentials' : 'peaas',
        'username':'ayushya....@peaas.co'
}

var iceServers = {
        'iceServers': [TURN, NUMB_STUN]
};

var options = {
            localVideo : videoInput,
            remoteVideo : videoOutput,
            onicecandidate : onIceCandidate,
            'iceServers':iceServers
        }
        webRtcPeer = new kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options,
                function(error) {
                    if (error) {
                        return console.error(error);
                    }
                    this.generateOffer(onOfferIncomingCall);
                });

Is this the correct way to specify the STUN/TURN server for Kurento as well as client side JS ?
If yes then I still have problems while connecting to end points.


Thanks & Regards
Addy

vijay krishna

unread,
May 29, 2017, 6:08:01 AM5/29/17
to kurento
I think your issue might be your turn server address that you specified.Turn servers should be specified as IP addresses.

Did you check if ICE candidates are getting generated using below example..?

https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice

Open that link , remove stun server of google , add your turn server and check ice candidates for relay candidates.Ignore that if you already did that and if it showed successful ice negotiation.


Hope this helps,

VJ

Addy D

unread,
May 30, 2017, 1:47:22 AM5/30/17
to kur...@googlegroups.com
Any update on this one? I am still stuck, not sure what to do.

On Mon, May 29, 2017 at 1:00 PM, Addy D <pathfinde...@gmail.com> wrote:
Hi all,

I am facing issues with specifying TURN and STUN both servers, I am using google's open stun server stun4.l.google.com:19302 and I have specified the configuration in Kurento's WebRtcEndpoint.conf.ini as shown below

stunServerAddress=stun4.l.google.com
stunServerPort=19302

and I have also specified it in the javascript client using following:


var TURN = {
        url: 'turn:ho...@turn.bistri.com:80',
        credential: 'homeo'
};

var NUMB_TURN = {
        'url' : 'turn:numb.viagenie.ca',
        'credentials' : 'peaas',

}

var NUMB_STUN = {
        'url' : 'turn:numb.viagenie.ca',
        'credentials' : 'peaas',

}

var iceServers = {
        'iceServers': [TURN, NUMB_STUN]
};

var options = {
            localVideo : videoInput,
            remoteVideo : videoOutput,
            onicecandidate : onIceCandidate,
            'iceServers':iceServers
        }
        webRtcPeer = new kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options,
                function(error) {
                    if (error) {
                        return console.error(error);
                    }
                    this.generateOffer(onOfferIncomingCall);
                });

Addy D

unread,
May 31, 2017, 3:35:48 AM5/31/17
to kur...@googlegroups.com
and I ended up having different issue on server side.
May 31, 2017 1:05:07 PM org.apache.coyote.http11.AbstractHttp11Processor process
INFO: Error parsing HTTP request header
 Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

Reply all
Reply to author
Forward
0 new messages