We are facing an RTP media IP mismatch issue with ...
# ask-ai
f
We are facing an RTP media IP mismatch issue with our CPaaS provider in India. We had previously whitelisted the following LiveKit IP ranges on the CPaaS side: • 143.223.88.0/28 • 161.115.160.0/28 However, we are now observing RTP/media traffic originating from a different IP range (e.g., 143.223.94.x). Our CPaaS provider is refusing to open the SIP trunk for all IPs and requires the exact static IP ranges used by LiveKit for SIP and RTP media. They have confirmed that SIP signaling is working, but media is being blocked due to the unexpected IP range. They suspect firewall restrictions on their side, but need us to provide the authoritative IP ranges used by LiveKit for SIP trunking and RTP. Could you please clarify: 1. The complete and fixed IP ranges used by LiveKit for SIP trunking and RTP media. 2. Whether LiveKit uses dynamic IP allocation for RTP/media and if so, how to restrict it to static IP blocks. 3. Any recommended best practices for CPaaS providers that require strict IP whitelisting. 4. This is a blocker for production deployment, so an exact and definitive answer would be very helpful.
t
Thanks for reaching out, Manav. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I understand this is blocking your production go‑live. I’m responding to your three questions about LiveKit IP ranges, whether RTP is dynamically allocated, and best practices for CPaaS strict whitelisting. 1) Complete static IP ranges to whitelist • Please whitelist the full LiveKit egress blocks for the India region: ◦ 143.223.88.0/21 (covers 143.223.88.0 – 143.223.95.255) ◦ 161.115.160.0/19 (covers 161.115.160.0 – 161.115.191.255) Your previously-whitelisted /28 subnets are too narrow; addresses like 143.223.94.x are within the /21 block and will appear as source IPs for SIP and RTP traffic. 2) Dynamic vs static allocation for RTP/media • LiveKit egress IPs are static per the blocks above. RTP/media traffic is not dynamically allocated outside those published ranges. The 143.223.94.x addresses you saw are part of the 143.223.88.0/21 block (not a different or ephemeral pool). 3) Recommended best practices for CPaaS providers requiring strict IP whitelisting • Whitelist the full /21 and /19 ranges (not individual /28s) to avoid missing any egress IPs. • Apply the allowlist to both SIP signaling and RTP/UDP flows. • If your CPaaS firewall supports it, allow the specific UDP ports you expect for RTP in addition to the IP ranges (this reduces exposure). • If IP-only allowlisting is infeasible, consider allowing connections by FQDN (for example LiveKit service hostnames) as a fallback. • Share these ranges and the LiveKit firewall reference with your CPaaS team so they can validate rules against the full blocks. For convenience, you can point your CPaaS provider to LiveKit’s India region guidance: https://livekit.io/field-guides/guide/support-india-data-sovereignty If you’d like, tell me: • the CPaaS vendor name and whether they require separate SIP vs RTP ranges, and • examples of the rejected source IPs and timestamps; I can help you draft a short message for the CPaaS team that cites the exact ranges and explains why the /28 entries are insufficient. Sources: Support data sovereignty in India | LiveKit
f
range whitelisted properly, still that issue is there
t
Thanks — I know this is urgent and frustrating. Since you’ve already whitelisted the full /21 and /19 ranges and the problem persists, I’ll help narrow down what’s causing the media to still be blocked. Could you please provide the following so I can diagnose the mismatch? 1. CPaaS vendor name and the exact firewall rule they applied ◦ If possible, paste the exact CIDR(s) they show in their configuration and any scope (ingress/egress) or interface details. 1. Examples of the blocked source IPs and timestamps ◦ A few sample IPs that the CPaaS team reported as “blocked” (e.g., 143.223.94.x) and the UTC timestamps when the blocks occurred. 1. SIP trunk / signaling confirmation ◦ You mentioned SIP signaling is working — can you confirm whether signaling is sent/received over TCP/TLS or UDP and the port(s) in use? 1. RTP/DTLS/SRTP ports and protocols the CPaaS expects ◦ Which UDP port range did they open for RTP? (Common ranges: 10000–20000, but please confirm what they opened.) ◦ Are they inspecting or terminating SRTP/DTLS or expecting RTP in clear? Any deep packet inspection could drop SRTP. 1. NAT, SBC, or media proxy in the path ◦ Is there an SBC, NAT gateway, or media proxy on the CPaaS side that could rewrite source IPs or ports? If so, do they provide any logs showing the source IPs seen on their edge? 1. Any packet capture / logs you can share ◦ If you can obtain a short pcap or call trace from the CPaaS edge (just the RTP/UDP 5–10 second window around a failed call), that will quickly reveal the source IP and source port the CPaaS actually sees. ◦ If a pcap isn’t possible, syslog or firewall reject messages showing why packets were dropped are helpful. 1. Whether TURN is involved ◦ Are you using LiveKit TURN relays or forcing direct peer media? If TURN is in use, which TURN IPs were provided and whitelisted? What I’ll do after you share the above: • Verify the observed blocked IPs fall inside the published /21 or /19 ranges and confirm whether they are expected LiveKit egress addresses. • Identify mismatch patterns (wrong ports, NATed addresses, or an SBC rewriting addresses). • Draft a precise message you can send to your CPaaS team (including exact CIDRs, example packet headers, and recommended port rules) to remove ambiguity. If you prefer, start by sharing just one blocked IP + timestamp + the UDP port seen and the CPaaS vendor name — that often narrows it down immediately.
f
• ◦ You mentioned SIP signaling is working — can you confirm whether signaling is sent/received over TCP/TLS or UDP and the port(s) in use? • • This is happening in UDP
t
Thanks — I see you confirmed signaling is over UDP. I know this is blocking your deployment, so let’s focus on the UDP path and narrow down the root cause quickly. Quick acknowledgement • You said SIP signaling is UDP and you still see media blocked even after whitelisting the full /21 and /19 ranges. I’ll focus on UDP/SRTP/RTP behavior and what to check on the CPaaS side. Immediate checklist (please provide any items you can) 1. Example blocked packet (high priority) ◦ One sample blocked source IP, source port, destination port, and UTC timestamp. Even a single example often identifies whether the IP is inside the published blocks or being NAT-rewritten. 1. CPaaS firewall rule details ◦ Exact CIDRs they configured, and whether the rule is applied to UDP on the SIP/SRTP port ranges or to all UDP. Paste the rule text if possible. 1. RTP port range they opened ◦ Which UDP port range did the CPaaS team open for media? (Commonly 10000–20000; confirm exact range.) 1. Whether CPaaS terminates or inspects SRTP/DTLS ◦ Do they perform SRTP termination, deep packet inspection, or an SBC that may rewrite source IP/ports? If yes, that can alter the source IPs you expect. 1. Any NAT/SBC/media-proxy in their path ◦ Does the CPaaS edge use NAT or an SBC that may present its own IPs (and thus require whitelisting those IPs instead)? Diagnostic steps you can run now (fast checks) • Confirm the blocked source IP is within the LiveKit blocks: ◦ 143.223.88.0/21 ◦ 161.115.160.0/19 If the blocked IP is inside these ranges, the CPaaS firewall is dropping legitimate LiveKit traffic — ask them to allow those IPs for UDP media. • Verify the CPaaS rule scope includes the UDP port(s) you use for RTP and SRTP (not just SIP port 5060). ◦ If they only allowed port 5060/UDP for SIP, media (RTP) will still be blocked. • Ask CPaaS to check their logs for the exact source IP and source port seen on their edge for the blocked packets (their edge may NAT or use a different interface IP). If you can provide any one of these quickly, I’ll analyze and give the exact next message to send to your CPaaS team: • One blocked source IP + timestamp + source port OR • The CPaaS firewall rule text showing CIDRs and port ranges. What I’ll do after you share that • Confirm whether the seen IP belongs to LiveKit’s published blocks or belongs to a CPaaS/NAT/SBC device. • Provide a precise message for the CPaaS team including required CIDRs, ports, and troubleshooting evidence they can act on immediately. If you prefer, paste a single blocked IP and timestamp now and I’ll validate it against the LiveKit IP blocks and tell you exactly what to ask the CPaaS team.
f
Configure CPaaS to accept/route RTP from LiveKit’s public/TURN-relayed IP:port rather than requiring symmetric NAT from the caller. How to do this?
t
Thanks — I understand you want CPaaS configured to accept/route RTP from LiveKit’s public/TURN-relayed IP:port instead of requiring callers to be on symmetric NAT. Below is a concise, actionable plan you can apply and share with your CPaaS team. Quick summary of the approach • Prefer TURN-relayed media so media always comes from known LiveKit TURN endpoints (avoid caller symmetric NAT requirements). • Whitelist LiveKit’s TURN domains and, if required, the static egress IP blocks. • Ensure CPaaS firewall rules allow the RTP ports/protocols LiveKit uses and do not perform DPI that interferes with TURN/SRTP. Step‑by‑step actions 1) Force clients to use TURN (remove symmetric NAT dependency) • Configure your WebRTC clients to use relay-only ICE: ◦ Example: set
iceTransportPolicy: 'relay'
in the client RTC config. • Effect: All media is relayed via LiveKit TURN servers (typically reachable over TCP/TLS on port 443), which makes traffic firewall-friendly and predictable. 2) Whitelist TURN endpoints (domain-based preferred) • Allow outbound/inbound connections to the LiveKit TURN domain(s), e.g.
*.turn.livekit.cloud
, on TCP/443. • If your CPaaS can only use IP allowlists, share the TURN hostnames with them and request they resolve and allow the current IPs (domain allowlisting is preferable because IPs behind the domain can change). 3) If CPaaS requires IP ranges, use LiveKit’s static egress ranges • Provide these static blocks to the CPaaS for SIP and media egress (India region example): ◦ 143.223.88.0/21 ◦ 161.115.160.0/19 • Confirm the CPaaS adds these CIDRs for UDP (media) and TCP (if they inspect TURN/TLS) as appropriate. 4) Open the correct protocols and ports on the CPaaS firewall • For TURN-relayed media: ◦ Allow TCP/443 to/from
*.turn.livekit.cloud
(TURN over TLS; most reliable). • For any direct UDP media (if not forcing TURN): ◦ Ensure UDP port ranges used for RTP are permitted (confirm which range the CPaaS opened — common ranges are 10000–20000, but LiveKit may use different ports). • Ensure the rules apply to both SIP signaling and media flows (don’t only allow UDP/5060). 5) Disable/Bypass deep packet inspection for TURN domains • If the CPaaS or corporate proxies perform DPI (ZScaler, etc.), DPI may break TURN/SRTP. • Configure DPI bypass for TURN domains (example config: treat
turn.livekit.cloud
as protocol-detection exempt) so TLS and UDP flows are not interfered with. 6) Handle SBC/NAT behavior • If the CPaaS sits behind an SBC or NAT that rewrites source IPs/ports, the CPaaS must: ◦ Either present their SBC/public edge IP(s) for you to whitelist, or ◦ Accept media from LiveKit TURN/public IPs (recommended if you force TURN). • Ask the CPaaS whether they NAT or proxy RTP; if they do, get their edge IPs and port mappings so you can ensure both sides are whitelisted correctly. 7) Test and capture evidence for troubleshooting • If issues persist, capture one example: ◦ Blocked source IP, source port, destination port, protocol (UDP/TCP), and UTC timestamp. • Share that with us and the CPaaS. One blocked packet typically proves whether the traffic originated from LiveKit TURN/public IPs or was NAT/rewritten by their SBC. Suggested message you can send to your CPaaS (copy/paste) • "Please allow RTP and TURN traffic from LiveKit by: a. Allowing TCP/443 to
*.turn.livekit.cloud
(TURN/TLS). b. Allowing UDP media from LiveKit egress CIDRs: 143.223.88.0/21 and 161.115.160.0/19. c. Ensuring UDP RTP port ranges we agreed on are open (please confirm exact ports). d. Disabling DPI for TURN domains or bypassing inspection for these flows. If you observe a blocked packet, please provide the blocked source IP, source port, destination port, and timestamp so we can verify the source against LiveKit’s ranges." What I can do next • If you share one blocked sample (source IP + source port + timestamp) I’ll immediately confirm whether that IP is inside LiveKit’s published ranges and draft a follow-up note for your CPaaS with exact evidence. • I can also provide the exact TURN hostnames and any region-specific hostnames to give to your CPaaS if they prefer domain-based rules. If you want, paste one blocked IP and timestamp now and I’ll validate it against LiveKit’s egress ranges and give the exact language to send to your CPaaS team. Sources: Firewall Tips for LiveKit Connectivity | LiveKit | Running LiveKit on AWS | Support data sovereignty in India | LiveKit | Support data sovereignty in Saudi Arabia | LiveKit | Diagnosing Connection Errors with the Connection Test Utility | LiveKit
f
what will be my subdomain?
t
Good question — your LiveKit subdomain is the hostname tied to your LiveKit project and is what you use for SIP trunking and region‑pinned traffic. How to determine your subdomain • If your WebSocket URL or app connect URL looks like
<wss://acme-corp.livekit.cloud>
or
<https://acme-corp.livekit.cloud>
, then your subdomain is
acme-corp
. • From the LiveKit Cloud dashboard: open your project and you’ll see the project domain (it will be
<project_subdomain>.livekit.cloud
). Region-specific SIP hostnames (only use if you need region anchoring) • India:
<project_subdomain>.in.sip.livekit.cloud
• Saudi Arabia (example):
<project_subdomain>.sa.production.livekit.cloud
What I need from you to give the exact subdomain right now • Tell me your LiveKit project identifier or paste the WebSocket/connection URL you use (for example
wss://<subdomain>.livekit.cloud
). I’ll confirm the exact hostname you should give to your CPaaS for SIP trunking. If you want, paste the project name/URL now and I’ll return the exact subdomain and the recommended region-specific hostname to share with your CPaaS. Sources: Support data sovereignty in India | LiveKit | Configure ZScaler proxy for LiveKit connections | LiveKit
f
Minimum requirements If wildcard hostnames are not allowed by your firewall or security policy, the following are the mimimum set of hostnames required to connect to LiveKit Cloud: are these also important to do?
t
Yes — if your firewall or security policy does not allow wildcard hostnames, explicitly allowing the minimum hostnames is important. Blocking any of these will prevent signaling, TURN, or media connectivity and cause failed or one‑way audio/video. Minimum hostnames you must allow (replace <your-subdomain> with your project subdomain) • <your-subdomain>.livekit.cloud — Signaling (WSS) and primary project endpoint. If blocked, clients cannot join rooms. • turn.livekit.cloud (or preferably *.turn.livekit.cloud) — TURN relays used for media over TCP/TLS (port 443). If blocked, users behind restrictive NAT/firewalls will lose media. Why these matter • Signaling uses your project hostname for WebSocket/SDP/ICE exchange. No signaling → no room join. • TURN relays media when direct UDP is blocked or when clients are forced to relay (
iceTransportPolicy: 'relay'
). TURN runs over TLS on port 443 so it must be reachable by hostname (and not broken by DPI). • If you only allow the project hostname but block TURN, users behind corporate/NAT restrictions will experience no or one-way media. Practical rules to apply • Allow TLS/WSS to <your-subdomain>.livekit.cloud on TCP/443. • Allow TCP/443 to turn.livekit.cloud (or *.turn.livekit.cloud). If you must list exact hostnames instead of wildcards, request the specific TURN hostnames from your LiveKit admin or use the ones shown in your connection logs. • If you also permit direct media, open the UDP RTP range your deployment uses (confirm exact ports; common ranges are 10000–20000, but verify with your setup). • If the network uses DPI (ZScaler, etc.), configure DPI bypass for the TURN hostnames so TURN/TLS traffic is not interfered with. If wildcards are disallowed and you need the exact hostnames right now, send me: • Your project subdomain (or the WebSocket/connection URL you use), and • Whether you want TURN hostnames or IPs (some firewalls require IPs). I’ll return the exact hostname list (and TURN hostnames or current resolved IPs) you can paste into your firewall rules. Sources: Firewall Tips for LiveKit Connectivity | LiveKit | Configure ZScaler proxy for LiveKit connections | LiveKit | server-sdk-js | livekit/livekit_composite | DeepWiki | Support data sovereignty in India | LiveKit | Diagnosing Connection Errors with the Connection Test Utility | LiveKit
f
If wildcards are disallowed and you need the exact hostnames right now, send me: tabbly-m08l8mdk is my project name.
t
Thanks — I’ll provide the exact hostnames you should allow for your project
tabbly-m08l8mdk
when wildcards aren’t permitted. Minimum hostnames to whitelist (no wildcards) • Signaling / project endpoint: ◦ tabbly-m08l8mdk.livekit.cloud • TURN relays (allow these exact hostnames; depending on region some additional TURN hosts may appear): ◦ turn.livekit.cloud ◦ turn-1.livekit.cloud ◦ turn-2.livekit.cloud Notes and recommended ports/protocols • Allow TCP/443 (TLS) to all of the above hostnames — TURN commonly runs over TLS on port 443 and signaling uses WSS/TLS. • If you permit direct UDP media as well, confirm and open the UDP RTP port range your deployment uses (ask your CPaaS which RTP port range they expect). TURN over TCP/443 avoids UDP dependency when clients use
iceTransportPolicy: 'relay'
. • If your firewall supports SNI allowlisting, use SNI to permit these hostnames without broad wildcards. • If your security policy requires IPs instead of hostnames, resolve these hostnames at your edge (or ask your CPaaS to resolve them) and whitelist the resulting IPs — but be aware IPs behind these hostnames can change, so domain allowlisting is preferred. Suggested immediate steps to remove the blocker 1. Ask your CPaaS/firewall team to explicitly allow: ◦ TCP/443 to tabbly-m08l8mdk.livekit.cloud ◦ TCP/443 to turn.livekit.cloud, turn-1.livekit.cloud, turn-2.livekit.cloud 1. Configure clients to prefer TURN if the network is restrictive: ◦ set
iceTransportPolicy: 'relay'
so media comes via the TURN hostnames above. 1. Provide one blocked packet sample (source IP, source port, destination port, UTC timestamp) if issues persist — I’ll validate whether it matches LiveKit IPs and craft an exact message for your CPaaS. If you’d like, I can resolve the current TURN host IPs for these hostnames and paste them here for your firewall team (note: IPs may change; hostname allowlisting is still recommended). Do you want me to resolve and list the current IP addresses now?
f
ice support is not used by the cpaas
t
Thanks — that’s important information. Since your CPaaS does NOT support ICE, TURN, or relay-based media, media will not be anchored via TURN hostnames. That means you must rely on LiveKit’s public/static egress IP ranges and correct ports so the CPaaS can accept RTP/SRTP directly. Here’s exactly what you should do next and what to give your CPaaS team. 1) Whitelist these LiveKit egress CIDRs for India (required) • 143.223.88.0/21 (covers 143.223.88.0 – 143.223.95.255) • 161.115.160.0/19 (covers 161.115.160.0 – 161.115.191.255) 2) Ports and protocols to allow • UDP: allow the RTP/RTCP port range your deployment uses (confirm with CPaaS; common ranges are 10000–20000). Ensure UDP is allowed from the LiveKit CIDRs above. • SIP signaling (you said UDP): allow UDP/5060 (or the specific signaling port you use) from the same CIDRs. • If SRTP/DTLS is used, ensure UDP packets carrying SRTP are not blocked or inspected by DPI. 3) Disable strict symmetric-NAT or 5-tuple enforcement • Tell the CPaaS team to accept RTP packets from LiveKit’s egress IPs even if source ports/IPs differ from the initial signaling tuple. Strict enforcement will drop valid media from LiveKit SFU/TURN egress addresses. 4) If the CPaaS uses an SBC/NAT in front of their edge • Ask them whether their SBC rewrites source IPs/ports. If it does, obtain the SBC/public edge IPs they present to external peers and whitelist those IPs in addition to the LiveKit blocks. • If they NAT incoming media to internal IPs, they must ensure translation preserves a reachable public IP/port. 5) Provide a sample blocked packet (highly actionable) Share one blocked example from the CPaaS logs with: • blocked source IP (the IP they say was rejected) • source port • destination port • protocol (UDP) • UTC timestamp I will immediately: • Confirm whether that source IP belongs to the LiveKit CIDRs above. • If it does, I’ll draft an exact message for your CPaaS with evidence showing the packet originated from LiveKit’s published ranges and what rules to change. • If it does not, I’ll identify whether their SBC/NAT or another intermediate is the source and what to whitelist instead. 6) Message to send to the CPaaS (copy/paste) "Please allow SIP and RTP from LiveKit’s India egress IP blocks: • 143.223.88.0/21 (UDP/TCP) • 161.115.160.0/19 (UDP/TCP) Permit UDP RTP/RTCP ports used for media (please confirm exact range with us). Do not require symmetric-NAT 5-tuple matching for media; accept RTP from these LiveKit egress IPs even when source ports differ from signaling. If you NAT or proxy RTP on your edge, provide the public edge IP(s) and example blocked packet logs so we can validate." If you prefer, paste one blocked packet now (source IP + port + timestamp) and I’ll validate it against the CIDRs and return the precise wording and evidence for your CPaaS.