P2p traffic not going on turn server

I setup turn server and enabled p2p like below

{
useStunTurn: true,
p2p: {
enabled: true,
useStunTurn: true,
stunServers: [
{ urls: ‘stun:stun.mydomain.com:443’ },
{ urls: ‘stun:stun1.l.google.com:19302’ },
{ urls: ‘stun:stun2.l.google.com:19302’ }
],

    preferH264: false

},

}
and also add turn credentials to the prosody

but traffic is not going on my turn server it always going through jvb.

can you help me ?

Do you see in the js console logs or in chrome://webrtc-internals that turn is passed to the p2p peer connection?

Please do not post in multiple threads.

@damencho it is not listed in iceservers.
what could be possibly wrong ?

Maybe prosody is not sending it back to the client. You can debug it by adding a breakpoint here https://github.com/jitsi/lib-jitsi-meet/blob/c2f269884a4991f1cee466367b98a095ace0b811/modules/xmpp/strophe.jingle.js#L307

Hi @damencho,

In lib-jitsi-meet, it is expected to return turn serves with the type turns

                if (options.useStunTurn) {
                    // we want to filter and leave only tcp/turns candidates
                    // which make sense for the jvb connections
                    this.jvbIceConfig.iceServers
                        = iceservers.filter(s => s.url.startsWith('turns'));
                }

But both in xep-0215. and in mod_turncredentials turn credentials have the type of turn. This seems to be the problem here. Is this something intentional of a bug ?

Nope, this is intentional. We use only turns for the jvb link, as we use the turnserver for the tcp links, there is no point of using it for udp as jvb is already a udp relay server, it is just not good with tcp.
We use this mod_turncredentials: https://github.com/otalk/mod_turncredentials/blob/master/mod_turncredentials.lua

Thanks for the info @damencho