Open gabriel-eladi opened 3 months ago
Hi, I think your docker-compose.yml
is not correct. You need to open the UDP ports for TURN to work:
old:
ports:
- "5222:5222"
- "5223:5223"
- "5269:5269"
- "5280:5280"
- "5443:5443"
- "3478:3478" # stun/turn
- "5349:5349" # stuns/turns
- "49152-49500:49152-49500" # turn
new:
ports:
- "5222:5222"
- "5223:5223"
- "5269:5269"
- "5280:5280"
- "5443:5443"
- "3478:3478/udp" # stun/turn
- "5349:5349" # stuns/turns
- "49152-49500:49152-49500/udp" # turn
Unfortunately, that still doesn't work. :/
Although not recommended from Docker best practices, could you give it a try to run it in the host network instead with Docker port forwarding? (although I am not convinced it is the problem).
instead of the ports
definition in the docker-compose.yml
, can you use:
network_mode: "host"
Just tried it, and that doesn't seem to work either.
My tests involved starting video calls between two different accounts on different devices and different networks, a PC running Gajim
and an Android phone running Conversations
. I also tried testing the STUN/TURN server using the Trickle ICE test with negative results in all configurations.
It is possible that I am doing something wrong with the configuration outside of Ejabberd (DNS or port forwarding), but I've tried all the ideas I had and double-checked everything and nothing worked.
I might try setting up a Coturn
server, making sure it actually works with the ICE test, then configuring Ejabberd to use it, either temporarily (to see if the problem lies with docker-ejabberd
or with my external configuration) or as a permanent solution.
If anyone has any pointers of where I might be doing something wrong or any advice, that would be greatly appreciated.
Hm.. I will need to test it myself locally, because I do not spot anything obvious in your configuration.
You may also try https://github.com/processone/eturnal/blob/master/doc/CONTAINER.md which uses the same stun
library as ejabberd. There is also a quick-start example for simple connectivity tests with trickle ICE and else.
P.S. I tested icetest.info with the following podman
command:
podman run --rm --name ejabberd -d -p 3479:3478/udp -v $PWD/ejabberd.yml:/home/ejabberd/conf/ejabberd.yml docker.io/ejabberd/ecs
For ejabberd.yml
I just used a copy w/o modification from here.
When configuring icetest with stun:203.0.113.3:3479
I have a positive STUN response. TURN I could not yet test.
P.S. 2:
I added the following auth_type: anonymous
for basic testing into my ejabberd.yml
stun listener:
-
port: 3478
ip: "::"
transport: udp
module: ejabberd_stun
use_turn: true
auth_type: anonymous
When running icetest.info with URL: turn:203.0.113.3:3479 Username: abc Credential: abc
I can obtain relay candidates.
Note: 203.0.113.3
is my public IP address -> turn_ipv4_address
.
Thank you. I will go over my configuration one more time.
Hello! I recently installed and set up the docker version of Ejabberd from
docker.io/ejabberd/ecs
. Here is mydocker-compose.yml
file:All the chat functions seem to work great. I then tried to set up the built-in STUN/TURN server to enable voice and video calls. I added/edited the following in my
ejabberd.yml
file:I have the following ports forwarded on my router:
I also have the following DNS records set up:
I haven't been able to get the STUN/TURN server to work. Any advice would be greatly appreciated!
It is also worth noting that I have a Nginx Proxy Manager reverse proxy setup that manages my SSL certificates and through which all the HTTP/HTTPS traffic gets routed. However, the XMPP and STUN/TURN traffic should not get routed through it since (as far as I'm aware) they don't use ports 80/443.