livekit do not use consistent media port during th...
# ask-ai
t
livekit do not use consistent media port during the call, It advertise the port-1 in the 200 OK message and start listing to different port
✅ 1
t
Thanks for reaching out, nitin. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m looking into the issue where LiveKit advertises one media port in the 200 OK SDP but ends up listening on a different port. To reproduce and diagnose this I need a few details from you. Please provide: 1. Deployment & version ◦ LiveKit Cloud or self-hosted? If self-hosted, which server version / container tag? 1. Network/topology ◦ Is LiveKit behind NAT, load-balancer, or an ingress (k8s)? Are you using TURN (coturn) or LiveKit’s TURN? 1. Transport/ICE details ◦ Are clients using UDP, TCP, or TLS? ICE mode (full ICE or ICE-lite)? Are candidates host/srflx/relay? 1. Configuration & runtime settings ◦ Relevant config values for
listen_address
,
udp_port_range
/
udp_port
,
external_ip
, and TURN settings (redact secrets). If k8s, share Service/NodePort/Ingress YAML snippets. 1. Reproduction artifacts ◦ The SDP from the 200 OK (showing advertised port) and any later SDP/pcap or netstat/tcpdump showing the actual listening port (redact PII). ◦ Server logs (INFO/DEBUG) around room creation, ICE, and DTLS/UDP binding. 1. Expected vs observed ◦ What you expect LiveKit to advertise (fixed port or within a specific range) and whether this causes call failures or is only an observation. If you can share these, I’ll analyze whether this is a config issue (port range / external IP), NAT/load-balancer behavior, TURN relaying, or a bug and provide exact next steps. , with interactive elements
t
livekit behind load balancer, livekit TURN, The SDP from the 200 OK (showing advertised port) and any later SDP/pcap or netstat/tcpdump showing the actual listening port (redact PII).
t
Thanks — I’m looking into why the 200 OK SDP shows one media port but LiveKit listens on another when running behind a load balancer with LiveKit TURN. I can help, but I need a few specific items to diagnose this accurately: 1. The 200 OK SDP you received (redact IPs if needed) and the later SDP/pcap or netstat/tcpdump evidence showing the actual listening port. 2. LiveKit deployment details: ◦ Cloud or self-hosted and server version / container tag. ◦ Load balancer type (L4 vs L7), whether it preserves source ports, and any NAT/port mapping rules. 1. LiveKit network config (redact secrets): ◦
listen_address
,
udp_port
or
udp_port_range
,
external_ip
settings. ◦ TURN configuration (coturn or built-in TURN) and whether TURN uses a public IP/port mapping. 1. Client transport details: ◦ Are clients connecting via UDP/TCP/TLS? Are ICE candidates host, srflx, or relay? 1. Any relevant server logs around the call (ICE/DTLS binding) at INFO/DEBUG level. If you share the SDP and the config/log snippets, I’ll analyze whether this is NAT/load-balancer port translation, TURN relaying behavior, or a server misconfiguration and provide concrete steps to make advertised ports align with actual listening ports. , with interactive elements