Direct Trunk receives INVITE (180 Ringing) but nev...
# ask-ai
b
Direct Trunk receives INVITE (180 Ringing) but never creates session - works in dev project, fails in prod project with identical config. Any project-level settings that could cause this?
t
Thanks for reaching out, Tomoaki. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I understand how important it is to get your Direct Trunk session working smoothly, so let’s walk through some project-level settings in LiveKit that might be influencing the INVITE process: • Inbound Address Restrictions: It’s a good idea to double-check that the IPs or CIDR ranges sending the INVITE are included in your SIP Trunk configuration. • Allowed Phone Numbers: Make sure the
To
value in the INVITE matches the allowed numbers for your Trunk — sometimes a small mismatch here can cause issues. • Authentication Settings: Take a look at the username and password for the Trunk and confirm they align with what your SIP provider is sending. • SIP Dispatch Rules: It helps to verify that your dispatch rules are set up correctly to route the INVITE to the right LiveKit room. • Header Processing: Check that any required SIP headers are properly mapped to participant attributes — this can be a key step. • Room Configuration: Lastly, confirm that AutoEgress is enabled in the room configuration associated with the dispatch rule. Since you mentioned this works in your dev project but not in prod, a careful comparison of these settings between the two can often reveal where things might be different. Please feel free to reach out if you’d like help reviewing any specific configurations — I’m here to support you! Sources: Using Wavix to accept and make calls | LiveKit Docs | Community & Support | livekit/livekit_composite | DeepWiki | rpc/io.pb.go | SIP inbound trunk | LiveKit Docs | README.md
b
Inbound Address Restrictions
t
Just to make sure we're on the same page, have you had a chance to check the Inbound Address Restrictions for your production project? If you have, could you please confirm whether the IPs or CIDR ranges sending the INVITE are included in the allowed list? I'm here to help you through this!
b
Already checked and removed all address restrictions from prod trunk. Dev has no restrictions and works fine. Still getting 180 Ringing but no session. Could this be a project plan limitation or agent cold start issue?
t
Thank you for sharing your concerns! I want to reassure you that agent cold starts and project plan limitations typically don’t prevent SIP session creation after receiving a
180 Ringing
response. While these factors might cause some delays or usage limits, they usually won’t block the session at this point. If you’re experiencing failures after the
180 Ringing
stage, it’s often due to one of the following: • SIP Trunk Configuration: It’s a good idea to double-check that your credentials, outbound number, and destination number are all set up correctly. • SIP Provider Behavior: Sometimes, providers send a
180 Ringing
but then reject the call afterward due to policies like call screening or fraud detection. • Final SIP Response Code: Reviewing the logs for errors such as
487 Request Terminated
,
486 Busy Here
, or
408 Request Timeout
can be really helpful. If you could share the final SIP response code or any error metadata you’ve received, that would be fantastic! It’ll help us pinpoint whether the issue lies with the provider, destination, or the call flow logic. I’m here to help you through this! Sources: SIP troubleshooting guide | LiveKit Docs | Quotas and limits | LiveKit Docs | Making outbound calls | LiveKit Docs | agent.py | protobufs/livekit_sip.proto
b
Thanks! I found the specific error pattern: SIP Flow: 1. INVITE sip:3900@[domain].sip.livekit.cloud 2. 180 Ringing 3. [Timeout - no 200 OK] 4. Result: CONGESTION - Hangup Cause: 34 Hangup Cause 34 = “No circuit/channel available” This suggests LiveKit can’t allocate resources for the session. - Works fine with same config in dev project - Only fails in prod project - Not an authentication issue (180 Ringing received) Is there a channel/resource limit on the prod project? Or could the agent not be starting properly?
t
I understand how frustrating this can be, so let’s work through it together. The hangup cause code 34 (No circuit/channel available) usually comes from the SIP provider, meaning they might not have enough available resources at the moment. This isn’t directly related to LiveKit’s project plan or agent startup, but we can definitely look into it further. Here are some friendly steps to help us investigate: • Verify SIP Trunk Configuration: Double-check that your trunk ID, credentials, and SIP endpoint address are all correct and match what your provider has given you. • Check Agent Availability: Make sure there are enough agent servers up and running to handle calls smoothly without running out of resources. • Contact SIP Provider: It’s a good idea to reach out to your SIP provider to confirm if they have channel or circuit availability and to see if the error is coming from their side. • Review Logs: Take a look at the LiveKit call logs and compare them with your SIP provider’s logs. This can help us pinpoint where the issue might be. If you’re still facing this issue after trying these steps, please don’t hesitate to reach out. I’m here to help and we can explore more troubleshooting options together. Sources: SIP troubleshooting guide | LiveKit Docs | protobufs/livekit_sip.proto | Operational Guidance & Best Practices | livekit/livekit_composite | DeepWik...
b
Thanks, but I think there’s some confusion here. In my setup, LiveKit IS the SIP provider (Direct Trunk). - Asterisk connects directly to LiveKit Cloud - LiveKit returns 180 Ringing - Then fails with Cause 34 The strange part: - SAME LiveKit, different projects - Dev project: works perfectly - Prod project: Cause 34 error So the “SIP provider” (LiveKit) has resources for dev but not prod. This seems to be a project-specific issue within LiveKit. Could you check if there are any project-level limitations or agent deployment issues specific to my prod project?
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!
b
Thanks, but I think there’s some confusion here. In my setup, LiveKit IS the SIP provider (Direct Trunk). - Asterisk connects directly to LiveKit Cloud - LiveKit returns 180 Ringing - Then fails with Cause 34 The strange part: - SAME LiveKit, different projects - Dev project: works perfectly - Prod project: Cause 34 error So the “SIP provider” (LiveKit) has resources for dev but not prod. This seems to be a project-specific issue within LiveKit. Could you please take another look and see if there’s any possible explanation or insight you can share? I’d really appreciate it if you could think through this a bit more — even a small hint might help narrow it down.