This message was deleted.
# ask-ai
s
This message was deleted.
t
Thanks for reaching out, Hemanth. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The media timeout error you are encountering is typically caused by issues during the media connectivity establishment phase. Here are the common causes and steps to resolve the issue: Causes: • DTLS+SRTP Phase Failures: This occurs when the DTLS handshake, used to exchange keys for SRTP, times out. It may be due to firewalls or NAT devices blocking subsequent UDP packets after the initial connection. • Network Infrastructure Issues: Firewalls often block UDP traffic or unknown ports, and corporate firewalls may block all UDP but allow outbound TCP/443. • Media Stream Interruption: Timeout logic triggers when no media packets are received within specified timeouts (30 seconds for the first timeout, 15 seconds for subsequent timeouts). Resolution Steps: 1. Use TURN Relay Servers: Configure clients to use TURN over TCP/TLS on port 443 by setting the following option:
connectOpts.rtcConfig = { iceTransportPolicy: 'relay' };
2. Configure Firewall Whitelisting: Whitelist
*.turn.livekit.cloud
on TCP/443 to ensure TURN connectivity works properly. 3. Run Connection Tests: Use the LiveKit Connection Tester to identify issues with UDP or DTLS stages. If problems occur, force TURN in the client and ensure proper firewall settings. 4. Understand Transport Priorities: WebRTC prioritizes transport options in this order: ICE/UDP, ICE/TCP, TURN/UDP, TURN/TLS. Explicitly configure fallback mechanisms if needed. These steps should help address the media timeout error. If the issue persists, further investigation into your network configuration may be required. Sources: protobufs/livekit_models.proto | Firewall Tips | pkg/sip/media_port.go