<@U06LSEPH77D>, sip calls connecting but no audio
# ask-ai
a
@alert-easter-19258, sip calls connecting but no audio
t
Thanks for reaching out, Rupak. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m sorry you’re seeing SIP calls connect with no audio. I can help troubleshoot. A few quick questions to narrow this down: • Are you using LiveKit Phone Numbers or a third‑party SIP provider/trunk? • Is audio completely absent or one‑way (you hear them or they hear you)? • Do you see any SIP error codes or SRTP/TLS negotiation messages in your logs? • Are other participants (a WebRTC client or agent) present and publishing audio in the room? If you prefer, tell me the provider name (e.g., Twilio, Telnyx) and whether you require SRTP/TLS — I’ll give targeted checks for codec, media encryption, and dispatch rules next. Sources: SIP APIs | LiveKit docs | Secure trunking | LiveKit docs | HD voice for SIP | LiveKit docs | Accepting inbound calls | LiveKit docs | SIP troubleshooting guide | LiveKit docs
a
1. third party SIP trunk 2. completely absent 3. I am using TCP 4. only 2 participants
t
Thanks — that helps. A few targeted follow-ups to pinpoint the cause: 1. Which SIP provider are you using (Twilio, Telnyx, Wavix, etc.)? 2. Is the problem one‑way or both directions? 3. Can you check call logs for SIP response codes or SRTP/TLS negotiation failures and paste any relevant lines (or summarize errors)? 4. Are any other participants in the LiveKit room publishing audio right after the SIP participant connects? 5. Is your trunk configured to use SRTP/TLS on the provider side? If yes, confirm LiveKit trunk settings match (media_encryption/TLS). If you’d like, paste a sanitized snippet of the SIP INVITE/200OK SDP (remove any credentials) and the LiveKit SIP participant attributes — that will let me check codec negotiation and SRTP flags and give exact next steps.
a
1. third party SIP trunk(Frejun Teler) 2. completely absent 3. I am using TCP 4. only 2 participants
t
Thanks — this is helpful. Based on what you’ve told me (third‑party Frejun Teler trunk, TCP signaling, two participants, no audio), focus on three quick checks and then paste one log snippet so I can pinpoint the cause. Three quick checks (do these now): 1. Confirm SRTP/TLS: Ask Frejun Teler if SRTP or TLS is required for media. In LiveKit trunk config set
media_encryption
to match (
SIP_MEDIA_ENCRYPT_ALLOW
or
SIP_MEDIA_ENCRYPT_REQUIRE
) if SRTP is required. 2. Verify codecs: Ensure the trunk and LiveKit share at least one codec (PCMU/PCMA or G.722). If Frejun uses uncommon codecs, enable PCMU/PCMA or G.722 on the trunk. 3. Open RTP ports: Ensure UDP ports 10000–20000 (RTP) are open between LiveKit and the provider; signaling over TCP won’t carry RTP. Please paste a sanitized snippet of the SIP INVITE/200 OK SDP exchanged (remove usernames/passwords and any sensitive tokens) or a short LiveKit SIP log showing SDP/cipher lines and any SRTP-related messages. With that I’ll check codec negotiation and SRTP flags and give exact next steps. Sources: Secure trunking | LiveKit docs | HD voice for SIP | LiveKit docs | Ports and firewall | LiveKit docs | Create and configure a Plivo SIP trunk | LiveKit docs
a
INVITE sip:+918065193769@4ce7exgwz4n.sip.livekit.cloud;transport=tcp SIP/2.0 Record-Route: sip:3.7.75.192:5060;transport=tcp;r2=on;lr;nat=yes;did=281.644 Record-Route: sip:10.0.200.230:9081;r2=on;lr;nat=yes;did=281.644 Via: SIP/2.0/TCP 3.7.75.192:5060;branch=z9hG4bKf614.79bbb5e01adfb7755347c91ac78d05ce.0 Via: SIP/2.0/UDP 10.0.2.168;received=10.0.2.168;rport=5060;branch=z9hG4bKXp0BBtHeamFaa Max-Forwards: 64 From: "919954174459" sip:+919954174459@10.0.2.168;tag=vZBUgFSjjU2QQ To: sip:+918065193769@10.0.200.230:9081 Call-ID: 3319f8a0-503a-123f-6cb7-02e9e2d4179f CSeq: 108121533 INVITE Contact: sip:mod_sofia@10.0.2.168:5060;alias=10.0.2.168~5060~1 User-Agent: FreeSWITCH-mod_sofia/1.10.12-release+git~20240802T210227Z~a88d069d6f~64bit Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY Supported: timer, path, replaces Allow-Events: talk, hold, conference, refer Privacy: none Content-Type: application/sdp Content-Disposition: session Content-Length: 240 X-SIPTRUNK: incoming X-cid: 2fbc6120-503a-123f-cfbb-0026b97d04d0 X-SIP-URL: sip:4ce7exgwz4n.sip.livekit.cloud X-TRANSPORT: tcp X-FS-Support: update_display,send_info P-Asserted-Identity: "919954174459" sip:+919954174459@10.0.2.168 v=0 o=FreeSWITCH 1765317924 1765317925 IN IP4 13.202.4.3 s=FreeSWITCH c=IN IP4 13.202.4.3 t=0 0 m=audio 32726 RTP/AVP 8 0 101 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=ptime:20 �9i�������������Ɩ���E������2�� < <Q#(����u|�р������ ��������SIP/2.0 100 Processing Record-Route: sip:3.7.75.192:5060;r2=on;lr;nat=yes;did=281.644;transport=tcp Record-Route: sip:10.0.200.230:9081;r2=on;lr;nat=yes;did=281.644 Via: SIP/2.0/TCP 3.7.75.192:5060;branch=z9hG4bKf614.79bbb5e01adfb7755347c91ac78d05ce.0 Via: SIP/2.0/UDP 10.0.2.168;rport=5060;branch=z9hG4bKXp0BBtHeamFaa;received=10.0.2.168 From: "919954174459" sip:+919954174459@10.0.2.168;tag=vZBUgFSjjU2QQ To: sip:+918065193769@10.0.200.230:9081 Call-ID: 3319f8a0-503a-123f-6cb7-02e9e2d4179f CSeq: 108121533 INVITE Content-Length: 0 Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE �9i� �����������Ɩ���E������2�� < <Q#(���ݒu|�р������ ��������SIP/2.0 180 Ringing Record-Route: sip:3.7.75.192:5060;did=281.644;transport=tcp;r2=on;lr;nat=yes Record-Route: sip:10.0.200.230:9081;did=281.644;r2=on;lr;nat=yes Via: SIP/2.0/TCP 3.7.75.192:5060;branch=z9hG4bKf614.79bbb5e01adfb7755347c91ac78d05ce.0 Via: SIP/2.0/UDP 10.0.2.168;rport=5060;branch=z9hG4bKXp0BBtHeamFaa;received=10.0.2.168 From: "919954174459" sip:+919954174459@10.0.2.168;tag=vZBUgFSjjU2QQ To: sip:+918065193769@10.0.200.230:9081;tag=SCL_rudAGE9BhBpp Call-ID: 3319f8a0-503a-123f-6cb7-02e9e2d4179f CSeq: 108121533 INVITE Content-Length: 0 Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE ��������SIP/2.0 200 OK Record-Route: sip:3.7.75.192:5060;did=281.644;transport=tcp;r2=on;lr;nat=yes Record-Route: sip:10.0.200.230:9081;nat=yes;did=281.644;r2=on;lr Via: SIP/2.0/TCP 3.7.75.192:5060;branch=z9hG4bKf614.79bbb5e01adfb7755347c91ac78d05ce.0 Via: SIP/2.0/UDP 10.0.2.168;received=10.0.2.168;rport=5060;branch=z9hG4bKXp0BBtHeamFaa From: "919954174459" sip:+919954174459@10.0.2.168;tag=vZBUgFSjjU2QQ To: sip:+918065193769@10.0.200.230:9081;tag=SCL_rudAGE9BhBpp Call-ID: 3319f8a0-503a-123f-6cb7-02e9e2d4179f CSeq: 108121533 INVITE Content-Length: 220 Contact: sip:143.223.91.7:9000;transport=tcp Content-Type: application/sdp v=0 o=- 1765317924 1765317926 IN IP4 143.223.91.7 s=LiveKit c=IN IP4 143.223.91.7 t=0 0 m=audio 56980 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=ptime:20 a=sendrecv 9i�.�Y��Y������Ɩ�X�E�I����2��K� < ��#(��湼��Z������� ��������ACK sip143.223.91.79000;transport=tcp SIP/2.0 Via: SIP/2.0/TCP 3.7.75.192:5060;branch=z9hG4bKf614.94474d5ec3cf9b78a908ab0fcf68d8bb.0 Via: SIP/2.0/UDP 10.0.2.168;received=10.0.2.168;rport=5060;branch=z9hG4bKyZS4cN2H7v5vN Max-Forwards: 69 From: "919954174459" sip:+919954174459@10.0.2.168;tag=vZBUgFSjjU2QQ To: sip:+918065193769@10.0.200.230:9081;tag=SCL_rudAGE9BhBpp Call-ID: 3319f8a0-503a-123f-6cb7-02e9e2d4179f CSeq: 108121533 ACK Contact: sip:mod_sofia@10.0.2.168:5060;alias=10.0.2.168~5060~1 Content-Length: 0 just to let you know the sip provider only support tcp/ tls
t
Thanks — the SIP exchange shows signaling and codec negotiation (PCMU) completed, and the 200 OK SDP advertises RTP on UDP port 56980 from IP 143.223.91.7. Because your provider only supports TCP/TLS for signaling, the most likely causes of no audio are: • SRTP/media encryption mismatch: the SDP contains no SRTP/DTLS lines. If Frejun Teler requires SRTP, plain RTP will be dropped. Confirm whether Frejun requires SRTP and set LiveKit trunk
media_encryption
to match (
SIP_MEDIA_ENCRYPT_ALLOW
or
SIP_MEDIA_ENCRYPT_REQUIRE
). • RTP ports/UDP blocked by firewall/NAT: media is offered on UDP (port 56980). Ensure your LiveKit server’s RTP port range (default 10000–20000 or your configured range) is open/forwarded and that IP 143.223.91.7 is reachable from Frejun. • Public IP / NAT mismatch: confirm the IP in SDP (143.223.91.7) is the correct reachable public IP. If LiveKit is behind NAT, ensure STUN/ICE or correct public IP configuration is in place. What I recommend next: 1. Ask Frejun Teler whether SRTP is required for media. 2. Verify firewall/NAT allows UDP through your RTP range (and test connectivity to 143.223.91.7:56980). 3. If Frejun requires SRTP, change LiveKit trunk
media_encryption
to match and retry. If they do not require SRTP, confirm both sides accept PCMU and retry. If you want, paste a short sanitized snippet of the 200 OK SDP after you change settings (or the provider’s response about SRTP) and I’ll confirm the exact fields to update.
a
Copy code
{
  "sipTrunkId": "id",
  "name": "Outbound Trunk 1",
  "address": "custom domain",
  "transport": "SIP_TRANSPORT_TLS",
  "numbers": [
    "+91xxxxxx"
  ],
  "authUsername": "username",
  "authPassword": "password",
  "mediaEncryption": "SIP_MEDIA_ENCRYPT_REQUIRE"
}
t
Thanks — this is great detail. Your trunk is set to require SRTP while the SDP shows plain RTP (no SRTP/DTLS), so media is being dropped. Do this next: 1. Update your trunk JSON to allow or disable SRTP: ◦ Recommended to start with:
Copy code
"mediaEncryption": "SIP_MEDIA_ENCRYPT_ALLOW"
• Or disable if Frejun cannot do SRTP:
Copy code
"mediaEncryption": "SIP_MEDIA_ENCRYPT_DISABLE"
1. Ensure UDP RTP is reachable: ◦ Open/forward your RTP port range (default 10000–20000) and confirm the advertised media IP (143.223.91.7) and port (56980) are reachable from Frejun. 1. Retest the call and paste the updated 200 OK SDP (sanitized) if audio still fails. If you want, tell me which option you applied and I’ll review the new SDP.
a
everything is configured
t
Thanks — glad everything’s configured. Quick checks so I can confirm the fix: 1. Do calls now have audio after your changes, or is audio still absent? 2. If still absent, please paste the latest sanitized 200 OK SDP (or relevant SIP log lines) you see after changing
mediaEncryption
. 3. Confirm UDP for your RTP range (default 10000–20000) is open and the SDP media IP (e.g., 143.223.91.7) is reachable from Frejun. Tell me which option you applied for
mediaEncryption
(ALLOW or DISABLE) and the answers above and I’ll give the exact next step.
a
still no audio, and the media encryption is diable
t
Thanks — sorry this persists. Let’s narrow the network/NAT angle quickly. Please confirm these three items: 1. RTP reachability: From Frejun’s side can you reach the SDP IP/port advertised by LiveKit (example earlier: 143.223.91.7:56980)? If you can run a UDP check from Frejun to that IP:port, what result do they report? 2. RTP port range: Confirm your LiveKit RTP port range (default 10000–20000) is open inbound/outbound on your server firewall and any cloud/network ACLs. 3. LiveKit room state: When the SIP call is active, does LiveKit show the SIP participant as
active
and do any participants show an audio track published? (If you can share the participant state JSON or a short log line showing
sip
attributes and
tracks
, paste a sanitized snippet.) If all three are confirmed OK, paste the latest sanitized 200 OK SDP (only the SDP portion) and a short LiveKit SIP log around the 200 OK — I’ll inspect the offered IP/port and any SRTP/RTCP fields and give the next exact step.
a
{callId: "SCL_TDqT2aQkKbxj" trunkId: "ST_9i8kUGQcCYjp" region: "omumbai1a" roomName: "call-001" roomId: "RM_odhN8ZQyrz8H" participantIdentity: "sip-test" participantAttributes: {sip.callID: "SCL_TDqT2aQkKbxj" sip.callIDFull: "gRevOVqulXqcweQMpeCekfbfpSuE" sip.callStatus: "active" sip.callTag: "ZU0ye26DDKe6c" sip.phoneNumber: "+919954174459" sip.trunkID: "ST_9i8kUGQcCYjp" sip.trunkPhoneNumber: "+918065193769" } fromUri: {user: "+918065193769" host: "4ce7exgwz4n.sip.livekit.cloud" ip: "143.223.91.68" port: 9000 } toUri: {user: "+919954174459" host: "teler-livekit.sip.frejun.ai" port: 5061 transport: "SIP_TRANSPORT_TLS" } callDirection: "SCD_OUTBOUND" callStatus: "SCS_ERROR" createdAtNs: "1765357497043849712" startedAtNs: "1765357509710947215" endedAtNs: "1765357554718078659" error: "media-timeout" audioCodec: "PCMU/8000" }
t
Thanks — the participant data confirms LiveKit saw no media: call reached
active
but ended with
media-timeout
. Focus on RTP/network reachability next. Please do these three checks and report back: 1. From Frejun, verify UDP can reach the exact IP:port advertised in the 200 OK SDP (your participant shows
fromUri.ip = 143.223.91.68
and earlier SDP used port 56980). Ask Frejun to test sending UDP packets to 143.223.91.68:56980 and report success/failure. 2. Confirm your LiveKit server allows UDP RTP: ◦ Open inbound/outbound UDP ports 10000–20000 (or your configured RTP range) on server firewall, cloud security group, and any edge/load‑balancer. ◦ If you have port forwarding/NAT, ensure it maps external RTP ports to the LiveKit host. 1. Validate public IP / ICE: ◦ Ensure 143.223.91.68 is the reachable public IP advertised in SDP. If LiveKit is behind NAT, configure
externalIp
or enable STUN/TURN so a reachable candidate is advertised. If those are open and Frejun’s UDP test succeeds but audio still fails, paste the latest sanitized 200 OK SDP (only SDP) and a short SIP log around the 200 OK — I’ll inspect the offered IP/port and candidate lines and give the exact next step.
a
why udp is required? the sip provider doesnot support udp onlt tcp and tls
t
You're right to ask — good question. SIP signaling (INVITE/200/ACK) can use TCP/TLS, but the audio itself is carried over RTP, which LiveKit sends over UDP. UDP is required because RTP needs low‑latency, loss‑tolerant delivery; TCP retransmits and orders packets, which causes latency/jitter unacceptable for real‑time voice. LiveKit does not send RTP over TCP/TLS, so even if your provider uses TCP/TLS for signaling, the provider still needs to be able to receive UDP media from the IP/port advertised in the SDP. That’s why your call reached "active" then ended with "media‑timeout" — signaling succeeded but RTP packets never arrived. What you can do next: • Open/forward LiveKit’s UDP RTP port range (default 10000–20000) in your firewall/ACL so the provider can send to the advertised IP:port. • Ensure the advertised public IP in SDP (e.g., 143.223.91.68) is reachable from Frejun. • If you cannot allow UDP, deploy a TURN relay and add it to LiveKit’s ICE servers so media can be relayed (TURN still uses UDP but can traverse restrictive networks). Tell me whether you can open the UDP range or prefer the TURN option and I’ll give the exact configuration steps.
a
i mean, they do support rtp/srtp
t
Thanks — good to know Frejun supports RTP/SRTP. Quick summary and clear next steps: • LiveKit sends media over UDP (RTP or SRTP). Signaling can be TCP/TLS, but the provider must be able to send UDP packets to the IP:port advertised in the SDP (e.g., 143.223.91.68:56980). Your call timed out because those UDP packets never arrived. Please pick one of these and apply it: 1) Open UDP RTP ports (recommended) • Open inbound/outbound UDP 10000–20000 (or your configured RTP range) on server firewall, cloud security groups, and any edge/load‑balancer. • Ensure your NAT/port‑forwarding maps the external port to the LiveKit host so the SDP IP/port is reachable from Frejun. • Have Frejun verify they can send UDP packets to the advertised SDP IP:port. 2) Use SRTP if Frejun requires encrypted media • Set LiveKit trunk
mediaEncryption
to
SIP_MEDIA_ENCRYPT_ALLOW
(or
SIP_MEDIA_ENCRYPT_REQUIRE
if provider mandates SRTP). • Retest; check the 200 OK SDP includes SRTP crypto lines and that Frejun can send SRTP to the advertised IP:port. If you choose, tell me: • Which option you applied (open UDP or enabled SRTP), and • The result of a UDP send test from Frejun to the SDP IP:port (success/failure). If audio still fails, paste the latest sanitized 200 OK SDP and a short LiveKit SIP log around the 200 OK and I’ll inspect it.
a
Configurations: 1. inbound trunk: { "sipTrunkId": "id", "name": "Teler Livekit Trunk 1", "numbers": [ "+91xxxxx" ], "mediaEncryption": "SIP_MEDIA_ENCRYPT_ALLOW" } 2. outbound trunk: { "sipTrunkId": "", "name": "Outbound Trunk 1", "address": "custom.sip.frejun.ai", "transport": "SIP_TRANSPORT_TCP", "numbers": [ "+91xxxxxx" ], "authUsername": "username", "authPassword": "password", "mediaEncryption": "SIP_MEDIA_ENCRYPT_ALLOW" }
t
Thanks — this is clear and helpful. Everything looks correct with
mediaEncryption: "SIP_MEDIA_ENCRYPT_ALLOW"
. The remaining blocker is network/media reachability. Please do these three actions and report back: 1. Open/confirm UDP RTP ports ◦ Ensure inbound/outbound UDP 10000–20000 (or your configured RTP range) is allowed on the LiveKit host, cloud security groups, and any load‑balancer/NAT. 1. Verify advertised SDP IP/port is reachable ◦ Ask Frejun to send a UDP probe to the exact IP:port shown in the 200 OK SDP (example earlier: 143.223.91.68:56980) and tell you whether packets arrive. A simple test:
nc -u <ip> <port>
or an equivalent UDP check from their side. 1. Confirm SRTP negotiation in new SDP ◦ Make a test call after steps 1–2. If Frejun supports SRTP, the 200 OK SDP should include SRTP crypto lines (
a=crypto
/ SRTP indicators). If SRTP lines are present and UDP probes succeed but audio still fails, paste the sanitized 200 OK SDP and a short LiveKit SIP log around the 200 OK and I’ll inspect the fields immediately. If you cannot open UDP, let me know and I’ll walk you through TURN/relay options, but Frejun must be able to reach the RTP/SRTP IP:port advertised by LiveKit for two‑way audio.
a
how to ensure udp rtp port is open
t
Good — here’s a concise step‑by‑step checklist to ensure UDP RTP ports are open and reachable for LiveKit media. 1) Confirm LiveKit RTP range • Default: 10000–20000 UDP. If you changed it, use your configured
rtpPortRange
in
livekit.yaml
. 2) Open ports on the host • Linux (ufw): sudo ufw allow 10000:20000/udp • Linux (iptables): sudo iptables -A INPUT -p udp --dport 10000:20000 -j ACCEPT • Windows (PowerShell): New-NetFirewallRule -DisplayName "LiveKit RTP UDP" -Direction Inbound -Protocol UDP -LocalPort 10000-20000 -Action Allow 3) Open ports in cloud/network ACLs • AWS: Add inbound rule in Security Group → UDP 10000–20000 (Source: Frejun IPs or 0.0.0.0/0 for testing). • GCP: Create VPC firewall rule allowing udp:10000-20000 from Frejun IPs. • Azure: Add NSG inbound rule UDP ports 10000–20000. • Any load‑balancer or edge device must also allow/forward these UDP ports to the LiveKit host. 4) Ensure NAT/port forwarding and public IP • If behind NAT, forward external UDP ports to the LiveKit host and ensure the public IP advertised in SDP matches the reachable IP (or set
externalIp
/ use STUN). 5) Verify reachability from Frejun • Ask Frejun to send a UDP probe to the SDP IP:port shown in the 200 OK (example: 143.223.91.68:56980). ◦ Example test they can run: nc -u <LiveKit-public-IP> 56980 ◦ If probe reaches LiveKit, the UDP path is open. 6) Re-test call • Make a call. If LiveKit shows the SIP participant
active
and no
media-timeout
, audio should work. If you prefer, tell me your hosting environment (AWS/GCP/Azure/on‑prem) and I’ll give the exact commands/console steps for that provider.
a
{callId: "SCL_vZGNgCguLWkq" trunkId: "ST_mEtJnc3jG2kv" dispatchRuleId: "SDR_ciRAiiJs6ejr" region: "omumbai1a" roomName: "call-_+919954174459_tqhA5NC4xKu3" roomId: "RM_vPLC7vnuDPmG" participantIdentity: "sip_+919954174459" participantAttributes: {sip.callID: "SCL_vZGNgCguLWkq" sip.callIDFull: "85d4c149-504c-123f-6cb7-02e9e2d4179f" sip.callStatus: "ringing" sip.callTag: "5HrKS4B3U8Kpj" sip.phoneNumber: "+919954174459" sip.ruleID: "SDR_ciRAiiJs6ejr" sip.trunkID: "ST_mEtJnc3jG2kv" sip.trunkPhoneNumber: "+918065193769" } fromUri: {user: "+919954174459" host: "10.60.5.81" port: 15387 transport: "SIP_TRANSPORT_TLS" } toUri: {user: "+918065193769" host: "10.0.200.230" port: 5061 transport: "SIP_TRANSPORT_TLS" } callDirection: "SCD_INBOUND" callStatus: "SCS_ERROR" createdAtNs: "1765358520174238841" startedAtNs: "1765358522832602141" endedAtNs: "1765358579343979732" error: "no ACK received for 200 OK" audioCodec: "PCMU/8000" }
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
a
what does the logs says