Turn Server


Hey Guys,

So I have a question about setting up a local instance of a STUN/TURN server. I read a couple 'Your topic is similar to…" and I found one vaguely similar where the solution was “give it a shot yourself”. Just want to know if that is still the case or not.

Anyways, so I was wondering if there is a way to configure your own STUN/TURN server in an air-gapped network.

Lines 306 - 314 in the config file. Is it possible to host one of my own using something such as coTURN and link it to that instead of the Google turn servers?

// Use XEP-0215 to fetch STUN and TURN servers.
// useStunTurn: true,

    // The STUN servers that will be used in the peer to peer connections
    stunServers: [
        { urls: 'stun:stun.l.google.com:19302' },
        { urls: 'stun:stun1.l.google.com:19302' },
        { urls: 'stun:stun2.l.google.com:19302' }

Appreciate any tips, working on improving P2P right now.


Hmm. Based on this thread - https://github.com/jitsi/jitsi-meet/issues/324

Is it true a TURN server is redundant since the videobridge does the work for you? There for no need for a TURN server?


Take a look here: One way media only (NAT issues) after upgrade and there is also a post with a simple coturn config.

So the recommended way is to deploy coturn on a machine, with a valid dns and valid certificate listening on port 443. Then you need to configure it in prosody and enable mod_turncredentials.lua. There is also a sample prosody config in the post. And make sure you have useStunTurn: true in config.js and that’s it.

No video and audio for some users
Blank Video and Audio for some participants

That is true, a turn server is just a relay and jvb is a relay. So if your p2p is not able to establish a direct connection it needs a relay. But if there is none (no turn) it will fallback and use jvb.
Jvb with all the simulcast logic and everything is optimized for multiparty calls, so leaving p2p away from jvb and using the turn server gives better experience to users and unloads the jvb.

And there is one more difference, jvb can make pseudo ssl tcp connections which are some times detected from very restricted enterprise firewalls and dropped. Using coturn on port 443 with valid certificate, it establishes a normal like https connection and firewalls cannot drop it. So these are the differences.