matrix突触TURNconfiguration失败-SOLVED

平台:Debian 9

matrix突触版本:0.22.1-1

Coturn版本:4.5.0.5-1 + b1

https://github.com/matrix-org/synapse/blob/master/docs/turn-howto.rst

我试图遵循本指南,但TURN服务器无法通过单独的NAT连接用户。 这是我采取的确切步骤:

$ sudo apt安装coturn

$ sudo nano /etc/turnserver.conf

编辑如下:

lt-cred-mech use-auth-secret static-auth-secret=[sharedsecretkey] realm=turn.perthchat.org no-tcp-relay allowed-peer-ip=10.0.0.1 user-quota=16 total-quota=800 

$ sudo nano / etc / default / coturn

 # # Uncomment it if you want to have the turnserver running as # an automatic system service daemon # TURNSERVER_ENABLED=1 

$ sudo ufw允许3478

$ sudo nano /etc/matrix-synapse/homeserver.yaml

 turn_uris: [ "turn:turn.perthchat.org:3478?transport=udp", "turn:turn.perthchat.org:3478?transport=tcp" ] turn_shared_secret: sharedsecretkey turn_user_lifetime: 86400000 turn_allow_guests: True 

$ sudo systemctl启动coturn

$ sudo systemctl restart matrix-synapse

呼叫失败通过NAT,它卡在“呼叫连接…”

这些是coturn神秘地停止生成新的日志之前出现的最后的日志:

 $ tail -n 20 /var/log/turn.log 0: IO method (general relay thread): epoll (with changelist) 0: turn server id=0 created 0: IPv4. TCP listener opened on : 127.0.0.1:3478 0: IPv4. TCP listener opened on : 127.0.0.1:3479 0: IPv4. TCP listener opened on : 209.58.177.136:3478 0: IPv4. TCP listener opened on : 209.58.177.136:3479 0: IPv6. TCP listener opened on : ::1:3478 0: IPv6. TCP listener opened on : ::1:3479 0: IPv4. UDP listener opened on: 127.0.0.1:3478 0: IPv4. UDP listener opened on: 127.0.0.1:3479 0: IPv4. UDP listener opened on: 209.58.177.136:3478 0: IPv4. UDP listener opened on: 209.58.177.136:3479 0: IPv6. UDP listener opened on: ::1:3478 0: IPv6. UDP listener opened on: ::1:3479 0: Total General servers: 2 0: IO method (admin thread): epoll (with changelist) 0: IPv4. CLI listener opened on : 127.0.0.1:5766 0: IO method (auth thread): epoll (with changelist) 0: IO method (auth thread): epoll (with changelist) 0: SQLite DB connection success: /var/lib/turn/turndb 

我试图打开端口3479,但是什么都没做,我不确定如何连接到coturn服务的SSL。

任何帮助获得TURN呼叫工作将不胜感激。

你看了你的防火墙日志,看看数据包是否被拒绝? 你正在使用哪个客户端/浏览器? 如果你能看到如何通过chrome连接工程:// webrtc-internals?

这是我采取了解决这个问题的额外步骤:

首先编辑/etc/turnserver.conf并取消注释:

 # Lower and upper bounds of the UDP relay endpoints: # (default values are 49152 and 65535) # min-port=49152 max-port=65535 

然后我重置服务:

 $ sudo systemctl restart coturn $ sudo systemctl restart matrix-synapse 

然后,我configuration了一个简单的DNSlogging,将turn.perthchat.org指向服务器IP。 现在很好用! 🙂