Both ends of WebRTC can specify iceTransportPolicy as “relay” for the same TURN server.

huangapple go评论56阅读模式
英文:

Can both ends of WebRTC specify iceTransportPolicy as "relay" for same one turn server?

问题

AliceBob 使用 WebRTC 建立连接,有一个 TURN 服务器可用。

AliceBob 都将他们的 iceServers 设置为这个服务器,并将 iceTransportPolicy 设置为 "relay"。

奇怪的是,我无法在两者之间建立连接。我的 TURN 服务器是 Coturn。为什么?

英文:

Assuming Alice and Bob are using WebRTC to establish a connection, and there is a TURN server available.

Both Alice and Bob set their iceServers to this server and also set the iceTransportPolicy as "relay".

Strangely, I am unable to establish a connection between the two. My turn server is Coturn. Why?

答案1

得分: 0

Your first question is easy: yes, both (and should) set the policy to relay if that's what you want to enforce.

The second question, why does it not work, is difficult to answer without more detail. Perhaps the better question is how to debug this, so that's how I'll try to help. I usually do this by printing all returned candidates to the console of type relay. If either side does not receive any such candidates, then you have a smoking gun (often an authentication issue with coturn).

The other helpful tool is the telnet CLI coturn has (see the /etc/turnserver.conf file for details). Activate that, log in, and use ps to show all current sessions. You should find two active sessions, one for each side.

英文:

Your first question is easy: yes, both (and should) set the policy to relay if that's what you want to enforce.

The second question, why does it not work, is difficult to answer without more detail. Perhaps the better question is how to debug this, so that's how I'll try to help. I usually do this by printing all returned candidates to the console of type relay. If either side does not receive any such candidates, then you have a smoking gun (often an authentication issue with coturn).

The other helpful tool is the telnet CLI coturn has (see the /etc/turnserver.conf file for details). Activate that, log in, and use ps to show all current sessions. You should find two active sessions, one for each side.

huangapple
  • 本文由 发表于 2023年5月21日 22:04:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76300293.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定