Hi, I am using Telnyx and I followed the documenta...
# ask-ai
a
Hi, I am using Telnyx and I followed the documentation guidelines, but I am still getting an error. I tried debugging it but could not resolve the issue. Sharing the logs below for reference. From the logs, it looks like Telnyx tried to start a call from +923186809417 to +12029729683 and sent the request to the LiveKit SIP server. LiveKit received the request and returned “100 Processing”, but then the call failed with “404 No trunk found.” It seems LiveKit could not find a configured SIP trunk for the incoming call, so the call was rejected. Logs and details are attached below. Could someone please help check what might be missing in the configuration? 1. What this log shows This log shows a SIP phone call attempt between two systems over the internet. • Caller:+923186809417 • Trying to call:+12029729683 • The call is sent from Telnyx SIP server to LiveKit SIP server. 2. Step-by-step what happened Step 1 — Call request sent (INVITE) The server 185.246.41.140 sends an INVITE message to 161.115.161.40. This means: ➡️ “I want to start a phone call to +12029729683.” Step 2 — Server received the request (100 Processing) The LiveKit server replies: SIP/2.0 100 Processing This means: ➡️ “I received your request and I am processing it.” Step 3 — Call failed (404 No trunk found) Then the server responds: SIP/2.0 404 No trunk found This means: ➡️ “I cannot handle this call because there is no SIP trunk configured for it.” In simple words: ⚠️ The system doesn’t know where to send this call. Possible reasons: • SIP trunk is not configured • SIP trunk name/domain is wrong • LiveKit cannot find the inbound trunk • Authentication or routing is missing Step 4 — Call closed (ACK) After the error, the caller sends ACK, which means: ➡️ “I received the error message and the call is now closed.” 3. Simple summary 1. Telnyx tried to start a call. 2. LiveKit received the request. 3. LiveKit could not find a SIP trunk configuration. 4. The call failed with 404 No trunk found. 4. One-line meaning 👉 The call failed because LiveKit could not find a configured SIP trunk for the incoming call.
t
Thanks for reaching out, Muhammad. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — this is clear and helpful. I’m responding to the “404 No trunk found” SIP error you shared and will walk through the most likely causes and exact checks to fix it. Summary of what’s happening • Telnyx sent an INVITE for +12029729683 to your LiveKit SIP server. • LiveKit replied 100 Processing, then responded 404 No trunk found. • That means LiveKit received the INVITE but could not match it to any configured inbound SIP trunk, so the call was rejected. What most commonly causes this (and what to check) 1. Inbound SIP trunk not created in LiveKit • Confirm you created an inbound trunk in LiveKit for receiving calls. If no inbound trunk exists, LiveKit cannot match incoming INVITEs. 1. Called number not listed on the trunk • The inbound trunk must include the exact called number in its
numbers
list (e.g.,
+12029729683
). If the number is missing or formatted differently, LiveKit will not match the call. 1. Source IP not allowed (
allowed_addresses
) • Your logs show an INVITE from 185.246.41.140 (Telnyx). If the trunk’s
allowed_addresses
does not include that IP, LiveKit will not consider that trunk a match. • Add the Telnyx outbound IP(s) (185.246.41.140 in your log) to
allowed_addresses
. 1. Telnyx sending to the wrong LiveKit endpoint • Verify Telnyx is configured to send the INVITE to your LiveKit SIP endpoint (your LiveKit public SIP URL/IP). A misconfigured destination will prevent trunk matching. 1. Authentication / domain name mismatch • If the trunkt requires authentication or a specific domain, ensure Telnyx is sending credentials (if required) and that the SIP Request-URI and To/From headers contain the expected domain/number formatting. Concrete checks and example steps 1. List existing inbound trunks and confirm the trunk includes the called number and allowed IPs. • Confirm trunk exists and shows
+12029729683
in
numbers
. • Confirm
allowed_addresses
includes
185.246.41.140
. 1. If you need to create or update a trunk (example pattern using the Python SDK) • Create/update trunk to include: ◦ name: something like
Telnyx-Inbound
◦ numbers:
["+12029729683"]
◦ allowed_addresses:
["185.246.41.140"]
◦ auth_username/auth_password if your trunk expects SIP auth 1. Re-run a test call after making the changes and watch LiveKit SIP logs (or the SIP logs dashboard if using LiveKit Cloud) to confirm: • The INVITE reaches LiveKit • The inbound trunk is matched • The call proceeds beyond 100 Processing (i.e., no 404) If you want, I can help with the specific API/SDK calls you should run to list, create, or update trunks — tell me: • Are you using the Python SDK (or another SDK / CLI / API)? • Share (redacted) the current trunk config output from your
list_sip_inbound_trunk()
call, or confirm whether
+12029729683
and
185.246.41.140
are present in that config. Quick checklist to confirm right now • [ ] Inbound trunk created in LiveKit • [ ]
numbers
includes
+12029729683
• [ ]
allowed_addresses
includes
185.246.41.140
(Telnyx IP) • [ ] Telnyx configured to send INVITEs to your LiveKit SIP endpoint • [ ] Any required SIP auth/domain settings match between Telnyx and LiveKit Next step If you tell me which SDK or API you prefer, I’ll give the exact commands/code to list your trunks and to create or update one with the proper number and allowed IP. If you can paste (redacted) the trunk listing output, I’ll point out exactly what needs changing. Sources: sip | livekit/livekit_composite | DeepWiki | Python SDKs | livekit/livekit_composite | DeepWiki | Creating SIP Inbound Trunks and Dispatch Rules with Python SDK
a
Hi LiveKit team, I need help debugging an inbound SIP issue on LiveKit Cloud. Incoming PSTN calls from Telnyx are reaching the LiveKit SIP endpoint, but LiveKit is consistently responding with: SIP/2.0 404 No trunk found This is happening even though an inbound trunk and dispatch rule already exist, and we have reconfigured both the LiveKit and Telnyx sides multiple times to match the official docs. Project details - LiveKit Cloud project: test-voice - SIP subdomain / endpoint base: test-voice-shu02yqv.sip.livekit.cloud - Current provider-facing endpoint in use: test-voice-shu02yqv.eu.sip.livekit.cloud:5060 - SIP provider: Telnyx - Purchased Telnyx DID: +12029729683 Current LiveKit config - Inbound trunk ID: ST_7wJDujHHiBjB - Inbound trunk name: voice-agent-inbound - Inbound trunk numbers: +12029729683, 12029729683 - AllowedAddresses: empty - AllowedNumbers: empty - Inbound auth username/password: empty - Dispatch rule ID: SDR_w3Aeo9C6BArB - Dispatch rule type: Individual (Caller) - Dispatch rule is linked to trunk ST_7wJDujHHiBjB Current Telnyx config - Telnyx FQDN connection ID: 2907969949928522914 - Current active primary FQDN ID: 2909786771527042551 - Current active FQDN host: test-voice-shu02yqv.eu.sip.livekit.cloud - Current active FQDN port: 5060 - Transport protocol: TCP - Inbound SIP region: Europe - ANI format: +E.164 - DNIS format: +e164 - Telnyx phone number is assigned to this SIP connection What we already verified / changed 1. Confirmed LiveKit inbound trunk exists. 2. Confirmed dispatch rule exists and is linked to the correct inbound trunk. 3. Confirmed trunk numbers include both +12029729683 and 12029729683. 4. Removed inbound auth from the LiveKit inbound trunk. 5. Removed allowed_addresses from the LiveKit inbound trunk. 6. Switched Telnyx from the earlier global/TLS/5061 path to a docs-aligned Europe/TCP/5060 region-pinned endpoint. 7. Confirmed the latest INVITEs are now hitting: sip:+12029729683@test-voice-shu02yqv.eu.sip.livekit.cloud:5060 8. Issue still reproduces after re-running provisioning and verifying live account state. Latest failing example - 100 Processing - 404 No trunk found Excerpt from latest SIP log - INVITE sip:+12029729683@test-voice-shu02yqv.eu.sip.livekit.cloud:5060 SIP/2.0 - From: "+923186809417" sip:+923186809417@sip.telnyx.eu - To: sip:+12029729683@test-voice-shu02yqv.eu.sip.livekit.cloud:5060 - Call-ID: 6668b86d-95a6-4827-89e2-327bf4d3d967 - Response: SIP/2.0 404 No trunk found Other recent failing Call-IDs showing the same behavior - 7e2f1565-5394-4d22-89cf-258a3cf46a6f - 4634e7cf-40aa-47b1-921c-696a375b25ff - 46a47226-4a8f-4651-b2b4-631b459406e5 Why I believe this is now a LiveKit-side matching issue - The INVITE is definitely reaching LiveKit Cloud. - The trunk definitely exists. - The called number is present on the trunk in both +E.164 and bare-digits form. - The dispatch rule is present and attached to that trunk. - The provider-side endpoint and transport were corrected and verified live. - The rejection happens before dispatch / room creation, so this appears to be failing inside trunk matching or auth resolution. Can you please investigate the backend SIP trunk matching for this project and tell me: 1. Why LiveKit is not matching these inbound INVITEs to trunk ST_7wJDujHHiBjB. 2. Whether there is any hidden normalization rule for the Request-URI / called number on LiveKit Cloud. 3. Whether the region-pinned endpoint test-voice-shu02yqv.eu.sip.livekit.cloud is correctly associated with this project for SIP trunk matching. 4. Whether there is any account-side or backend state that needs to be reset / recreated on your side. I can provide the full raw SIP logs as attachments if needed. Thanks.
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!