Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

Why my Discuss video call does not work ?

形象
丢弃
1 答案
0
形象
odoo
最佳答案

🎥 Why Video Calls May Fail

Video and audio calls — especially those built on WebRTC (what we use in Odoo.) — often rely on peer-to-peer (P2P) connections. This means your device tries to connect directly to another person's device to exchange audio/video data.

🚧 Obstacles to Direct Connections

  • Devices are usually behind routers, which use NAT (Network Address Translation).
  • Many networks (especially public Wi-Fi, corporate, or mobile) use strict NAT types or firewalls.
  • Some types of NATs block direct incoming connections entirely — and that’s where symmetric NAT becomes a problem.

🔐 What Is a Symmetric NAT?

A symmetric NAT is a type of NAT that assigns a unique mapping for each outgoing connection. This means:

If you send data to different servers or IPs, you appear to come from different ports each time.

📦 Simple Example:

Let’s say your internal IP is 192.168.1.2:

  • You send a packet to Google → NAT maps to public IP 203.0.113.5:40001
  • You send another to Zoom → NAT maps to 203.0.113.5:40002

So there's no consistent address to reach you from outside.

❗ Why This Breaks Peer-to-Peer

  • Other devices can’t predict how to reach you.
  • Even STUN servers (used to find your public IP) won’t help — because your address changes per connection.
  • So P2P fails, unless you use a workaround.

🛠️ Solutions to Symmetric NAT

To overcome symmetric NAT and ensure reliable video/audio, there are 3 main approaches:

1. 🌐 TURN Server (Traversal Using Relays)

See odoo documentation: https://www.odoo.com/documentation/18.0/applications/productivity/discuss/ice_servers.html

What it is: A relay server that both peers connect to when direct P2P fails.

How it works:

  • Your device sends media outbound to a TURN server.
  • TURN relays it to the other peer (and vice versa).
  • Since both connections are outbound, NAT doesn’t block them.

Works behind any NAT

Adds latency and server bandwidth cost

❌ Not ideal for group calls (scales poorly)

2. 🛰️ SFU (Selective Forwarding Unit)

What it is: A media server that receives streams from all users and forwards them selectively.

How it works:

  • Every participant sends their stream to the SFU.
  • SFU sends each stream to others in the call.
  • All connections are outbound, so NAT is not a problem.

✅ Perfect for group calls

Low latency, scalable

✅ NAT-friendly

❌ Requires running a server infrastructure

📊 When to Use What

ScenarioBest Solution
Two users, both behind symmetric NAT✅ TURN server
Group call with users behind any NAT✅ SFU server
Corporate or firewalled environment✅ TURN or SFU (TCP/TLS)
Mobile devices using CGNAT (4G/5G)✅ TURN or SFU
Low latency, scalable group meetings✅ SFU

✅ Conclusion

If your video call fails, lags, or won’t connect — the cause is often network translation, and in particular, symmetric NAT. But it’s solvable.

  • Use TURN servers as a fallback when P2P fails.
  • Use SFUs for group calls or scaling up.

 To configure a TURN server, you can follow this odoo documentation: https://www.odoo.com/documentation/18.0/applications/productivity/discuss/ice_servers.html

形象
丢弃