Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STUN/TURN not working #140

Closed
H-B-Schmidt opened this issue Jul 7, 2022 · 6 comments
Closed

STUN/TURN not working #140

H-B-Schmidt opened this issue Jul 7, 2022 · 6 comments

Comments

@H-B-Schmidt
Copy link

I wanted to test STUN/TURN and did set media.peerconnection.ice.relay_only to TRUE in my Firefox about:config.

I then started a call and it immediately ended. Firefox tab about:webrtc is showing this:
grafik

So there is no candidate found.

Btw is Calls supporting something like turns:turn.server.de:443 instead of stun for ICE Server?
If I enter this for my TURN Server and check with Firefox, no ICE Server is displayed at all with about:webrtc

@streamer45
Copy link
Contributor

TURN servers are supported as of the latest version (0.7.0) but you need to configure a valid TURN server.
You can check #49 (comment) for more details.

@H-B-Schmidt
Copy link
Author

Thanks. Is it possible to document the plugin and its settings a bit more for those who are not native ICE/STUN/TURN admins?
What is the best solution to get maximum connectivity. I guess it is a working TURN Server on Port 443?
What is the disadvantage of enabling 'Server Side TURN' as it is offered as an option?
Do I have to configure an additional STUN server in 'ICE Servers Configurations' when I already have configured a TURN server?

@streamer45
Copy link
Contributor

For maximum client connectivity you'd likely need a TURN server running on port 443 (both TCP/UDP). coturn is probably the widest used implementation as it offers good performance.

What is the disadvantage of enabling 'Server Side TURN' as it is offered as an option?

Server side TURN is generally not necessary as the assumption is that the server is able to reach the TURN server. I left it as an option to be thorough but it's unlikely to be needed in most setups. When enabled, the server will try to generate TURN relay candidates as well as opposed to only having clients do it (default behaviour).

Do I have to configure an additional STUN server in 'ICE Servers Configurations' when I already have configured a TURN server?

I'd suggest having a STUN server as well in case clients can find a more optimal way to connect that doesn't involve relaying the data through TURN. In fact if you use coturn it can also embed STUN so you get both at the same time.

@H-B-Schmidt
Copy link
Author

H-B-Schmidt commented Jul 8, 2022

Thanks. The 'ICE Servers Configuration' seems extremely picky about the syntax and line breaks. Shouldn't this work?

[{
"urls": ["stun:turnsrv01.xxx.yyy.de:3478",
"turn:turnsrv01.xxx.yyy.de:443?transport=udp",
"turn:turnsrv01.xxx.yyy.de:443?transport=tcp"]
}]

It only works if I remove the stun: Server. Otherwise I get a

caller="app/plugin.go:139" plugin_id=com.mattermost.calls error="invalid ICEServers value: URL is not a valid STUN/TURN server"

@streamer45
Copy link
Contributor

If it's valid JSON it should work. In your case you should have distinct objects for different protocols, something like:

[
   {
      "urls":[
         "stun:turnsrv01.xxx.yyy.de:3478"
      ]
   },
   {
      "urls":[
         "turn:turnsrv01.xxx.yyy.de:443?transport=udp",
         "turn:turnsrv01.xxx.yyy.de:443?transport=tcp"
      ]
   }
]

@streamer45
Copy link
Contributor

Closing this for now but feel free to comment further if something is not working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants