twirp error unknown: INVITE failed: sip status: 40...
# ask-ai
o
twirp error unknown: INVITE failed: sip status: 404: Not Found I'm using telnyx
t
Thanks for reaching out, fernando. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm sorry you're encountering the error "twirp error unknown: INVITE failed: sip status: 404: Not Found." This usually means the SIP INVITE request couldn't reach the destination number, perhaps because the number doesn't exist or there's a routing issue. Let's work through some steps together to help resolve this: 1. Verify Phone Number Formatting: Please double-check that the phone number is in E.164 format, starting with a
+
. This helps ensure proper routing. 2. Check Telnyx FQDN Connection: Make sure your FQDN connection is active, linked to the correct phone number, and has a valid outbound voice profile. 3. Validate LiveKit Outbound Trunk: Confirm that the trunk is set up with the right Telnyx SIP signaling address, credentials, and phone numbers. 4. Check Destination Number: Verify the destination number is valid, currently active, and correctly formatted for international dialing if needed. 5. Review Telnyx Portal Settings: Take a look at your number configuration, connection settings, and routing rules within the Telnyx portal to ensure everything is in order. Also, reviewing your Telnyx call logs can provide more insight into why the call didn't go through. Please feel free to reach out if you'd like me to guide you through any of these steps or if you have any other questions—I'm here to help! Sources: Create and configure Telnyx SIP trunk | LiveKit docs | livekit/sip_test.go | SIP outbound trunk | LiveKit docs
o
what is the sip adress i need to use when creating a sip trunk on livekit dashboard?
t
When you're creating a SIP trunk on the LiveKit dashboard, it's best to use the LiveKit SIP URI without including the
sip:
prefix. You can easily find this value on the Project settings page in your LiveKit Cloud dashboard. For instance, if your SIP URI looks like
sip:vjnxecm0tjk.sip.livekit.cloud
, then the SIP endpoint you'll want to use is
vjnxecm0tjk.sip.livekit.cloud
. And if you're setting up an inbound SIP trunk with Telnyx, just enter this SIP endpoint into the FQDN field during the configuration process. If you need any help along the way, feel free to reach out—we're here for you! Sources: SIP trunk setup | LiveKit docs | Create and configure Telnyx SIP trunk | LiveKit docs
o
I'm doing outbound calls
t
Let's walk through how to configure a SIP trunk for outbound calls in LiveKit together. Here’s a simple step-by-step guide: 1. Set Up Your SIP Provider: First, you'll want to purchase a phone number from your SIP provider (like Telnyx). Then, make sure to configure the SIP trunk so it allows traffic from LiveKit. It’s important that your provider accepts traffic from LiveKit’s IP range and that secure trunking is enabled if needed. 2. Create an Outbound Trunk in LiveKit: Next, use the LiveKit API to create an outbound trunk. Here’s what you’ll need: ◦ Address: This is the SIP signaling address, for example,
sip.telnyx.com
. ◦ Numbers: List your outbound phone numbers in the E.164 format. ◦ Authentication: Provide the username and password you received from your SIP provider. ◦ Optional: You can specify the transport type (like TCP or TLS) and the destination country if that applies. 1. Initiate Outbound Calls: Finally, use the
CreateSIPParticipant
API to place calls. Just provide the
sip_trunk_id
, the destination number, and the room name. Also, please double-check that the SIP URI in your provider configuration includes the correct transport parameter (like
;transport=tcp
or
;transport=tls
) if that’s necessary. If you have any questions or want me to help you with any of these steps, just let me know—I’m here to help! Sources: packages/sip--make-a-call/README.md | Making outbound calls | LiveKit docs | Create and configure a Plivo SIP trunk | LiveKit docs | test/lktest-sip-outbound/README.md | Using Wavix to accept and make calls | LiveKit docs
o
I got this error on telnyx logs proto:UDP 2025-11-13T161409.189463Z 185.246.41.140:5060 ---> 161.115.161.156:5060 INVITE sip:529994954105@192p1g5vt8k.sip.livekit.cloud:5060 SIP/2.0 Record-Route: sip:185.246.41.140;r2=on;lr;ftag=tyQX8Kvp2mBUc Record-Route: sip:10.31.224.10;r2=on;lr;ftag=tyQX8Kvp2mBUc Via: SIP/2.0/UDP 185.246.41.140;branch=z9hG4bKf70e.405d30292033279bb3a5771582e636c0.0 v:SIP/2.0/UDP 10.31.30.4:6000;received=10.31.30.4;rport=6000;branch=z9hG4bK9m43vvaXyB5QH Max-Forwards:67 f:"5599902040"<sip:5599902040@sip.telnyx.eu>;tag=tyQX8Kvp2mBUc t:sip:529994954105@192p1g5vt8k.sip.livekit.cloud:5060 i:d4990dfd-92b1-4352-962f-4d6117256955 CSeq:106971432 INVITE m:sip:mod_sofia@10.31.30.4:6000 Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,MESSAGE,INFO,UPDATE,REFER,NOTIFY k:timer,path u:talk,hold,conference,refer Privacy:none c:application/sdp Content-Disposition:session l:359 P-Asserted-Identity:"5599902040"<sip:5599902040@sip.telnyx.com> v=0 o=Telnyx 1763021885 1763021886 IN IP4 185.246.41.167 s=Telnyx c=IN IP4 185.246.41.167 t=0 0 m=audio 28564 RTP/AVP 9 0 8 18 101 a=rtpmap:9 G722/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv a=rtcp:28565 IN IP4 185.246.41.167 a=ptime:20 proto:UDP 2025-11-13T161409.199958Z 161.115.161.156:5060 ---> 185.246.41.140:5060 SIP/2.0 100 Processing Record-Route: sip:10.43.17.25:40004;transport=tcp;lr;sipfe Record-Route: sip:161.115.161.156:5060;sipfe;transport=udp;lr Record-Route: sip:185.246.41.140;lr;ftag=tyQX8Kvp2mBUc;r2=on Record-Route: sip:10.31.224.10;r2=on;lr;ftag=tyQX8Kvp2mBUc Via: SIP/2.0/UDP 185.246.41.140;branch=z9hG4bKf70e.405d30292033279bb3a5771582e636c0.0 Via: SIP/2.0/UDP 10.31.30.4:6000;branch=z9hG4bK9m43vvaXyB5QH;received=10.31.30.4;rport=6000 From: "5599902040" <sip:5599902040@sip.telnyx.eu>;tag=tyQX8Kvp2mBUc To: sip:529994954105@192p1g5vt8k.sip.livekit.cloud:5060 Call-ID: d4990dfd-92b1-4352-962f-4d6117256955 CSeq: 106971432 INVITE Content-Length: 0 Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE proto:UDP 2025-11-13T161409.379501Z 161.115.161.156:5060 ---> 185.246.41.140:5060 SIP/2.0 404 No trunk found Record-Route: sip:10.43.17.25:40004;sipfe;transport=tcp;lr Record-Route: sip:161.115.161.156:5060;sipfe;transport=udp;lr Record-Route: sip:185.246.41.140;lr;ftag=tyQX8Kvp2mBUc;r2=on Record-Route: sip:10.31.224.10;lr;ftag=tyQX8Kvp2mBUc;r2=on Via: SIP/2.0/UDP 185.246.41.140;branch=z9hG4bKf70e.405d30292033279bb3a5771582e636c0.0 Via: SIP/2.0/UDP 10.31.30.4:6000;branch=z9hG4bK9m43vvaXyB5QH;received=10.31.30.4;rport=6000 From: "5599902040" <sip:5599902040@sip.telnyx.eu>;tag=tyQX8Kvp2mBUc To: sip:529994954105@192p1g5vt8k.sip.livekit.cloud:5060;tag=fa40a977-ca38-48c1-a7d2-cd5e3aa0c6c8 Call-ID: d4990dfd-92b1-4352-962f-4d6117256955 CSeq: 106971432 INVITE Content-Length: 0 Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE proto:UDP 2025-11-13T161409.379852Z 185.246.41.140:5060 ---> 161.115.161.156:5060 ACK sip:529994954105@192p1g5vt8k.sip.livekit.cloud:5060 SIP/2.0 Via: SIP/2.0/UDP 185.246.41.140;branch=z9hG4bKf70e.405d30292033279bb3a5771582e636c0.0 Max-Forwards:67 f:"5599902040"<sip:5599902040@sip.telnyx.eu>;tag=tyQX8Kvp2mBUc To: sip:529994954105@192p1g5vt8k.sip.livekit.cloud:5060;tag=fa40a977-ca38-48c1-a7d2-cd5e3aa0c6c8 i:d4990dfd-92b1-4352-962f-4d6117256955 CSeq:106971432 ACK l: 0
t
I'm here to help you understand the SIP error "404 No trunk found." This message means that LiveKit couldn't find a valid outbound SIP trunk configuration to route your call. Let's work through this together to get it sorted out: 1. Verify Outbound Trunk Configuration: Please double-check that you've set up an outbound SIP trunk in LiveKit with these details: ◦ Address: Make sure you're using the Telnyx SIP signaling address, like
sip.telnyx.com
. ◦ Numbers: Include your Telnyx-authenticated phone numbers in the E.164 format. ◦ Authentication: Don't forget to provide your Telnyx username and password. 1. Check Trunk ID: It’s important to confirm that the
sip_trunk_id
you use in the
CreateSIPParticipant
API matches an existing outbound trunk that’s correctly configured. 2. List Configured Trunks: You can use the LiveKit API or CLI to list all outbound trunks to verify that the trunk exists and is set up properly. If you find the trunk is missing or not set up quite right, try recreating it with the correct settings and then give the call another go. Please feel free to reach out if you want me to guide you through any of these steps—I’m here to help! Sources: SIP APIs | LiveKit docs | lib/livekit/sip_service_client.rb | livekit/sip_test.go | test/lktest-sip-outbound/README.md | SIP outbound trunk | LiveKit docs