https://retellai.com/?utm_source=discord&utm_medium=seo logo
When i connect a number from twillo to retell when...
# ❓・ai-evy-support
d
@AI Evy When i connect a number from twillo to retell when i try call the number it answers but then ends the call right away
a
Thanks for tagging me @dropmuse. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Twilio](https://docs.retellai.com/deploy/twilio) [[2] Retell AI - Connect to your own Twilio (2) - Using Non Elastic SIP Trunk](

https://www.youtube.com/watch?v=1_BdZA8o1h0▾

) [[3] I’m trying to use a toll-free number (connected from Twilio through a SIP trunk)](https://retell.discourse.group/t/i-m-trying-to-use-a-toll-free-number-connected-from-twilio-through-a-sip-trunk/127) ​
### Answer When connecting a Twilio number to Retell AI and experiencing calls that answer but immediately disconnect, there are several common configuration issues to check: For Elastic SIP Trunk Setup: 1. Verify Termination SIP URI - Check that your Termination SIP URI doesn't have any spaces and that you're using a localized termination URI near your region [(1) ]() . You should expand and view your localized URIs in the Twilio console . 2. Check Authentication - Ensure you've properly configured either IP whitelisting or username/password credentials . If using credentials, verify you entered the correct username (not the friendly name) and password . 3. Confirm Origination Setup - Your origination SIP URI should be set to
sip:sip.retellai.com
. 4. Import Number to Retell - After moving the number to your elastic SIP trunk, you must import it to Retell by supplying the termination SIP URI . If you set up auth via credentials, provide the username and password as well . For Non-Elastic SIP Trunk Setup: If you're using a non-elastic approach with webhooks, ensure your webhook endpoint is properly configured to dial the Retell SIP endpoint with the call ID [(2) ](

▾

) . Additional Checks: - Verify the phone number has an
inbound_agent_id
or
outbound_agent_id
configured depending on your use case [(3) ]() - Check that your agent is properly set up and active If you've verified all these settings and the issue persists, you may want to check the call logs in your Retell dashboard for more specific error details.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @dropmuse. I'll get back to you soon.
d
@AI Evy in retell there is no errrors and says user hangup
a
### Answer When Retell shows
user_hangup
as the disconnection reason but calls are ending immediately after answering, this could indicate a logging discrepancy between Retell and your telephony provider [(1) ]() . For inbound calls, the
user_hangup
disconnection reason means the user hung up the call [(2) ]() . However, there's documented evidence of cases where Retell logs show
user_hangup
while Twilio logs indicate the call was ended by the caller (Retell) [(1) ]() . To diagnose this issue: 1. Check Twilio call logs - Compare the disconnection reason in Twilio with what Retell shows . For inbound calls, the caller in Twilio logs refers to the user, not Retell . 2. Verify your configuration: - Ensure your Twilio elastic SIP trunk origination is set to
sip:sip.retellai.com
[(3) ]() - Confirm your termination SIP URI is configured correctly - Check that authentication (IP whitelisting or credentials) is properly set up 3. Review call timeout settings - Verify your agent's timeout configuration isn't causing premature disconnections [(1) ]() . If the issue persists and you believe there's a discrepancy between Retell and Twilio logs, you should check with Twilio support as well, since for inbound calls the disconnection could be on their end .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Call Disconnection Logging Discrepancy - Retell = User Hangup, Twilio = Caller Termination](https://discord.com/channels/1186424376300679209/1383741946865909840) [[2] Debug call disconnection](https://docs.retellai.com/reliability/debug-call-disconnect) [[3] I’m trying to use a toll-free number (connected from Twilio through a SIP trunk)](https://retell.discourse.group/t/i-m-trying-to-use-a-toll-free-number-connected-from-twilio-through-a-sip-trunk/127) ​
d
@AI Evy in twillo it says status failed, where do i find the error code
a
Thanks for the follow-up, @dropmuse. I'll get back to you soon.
### Answer --- To find the error code in Twilio when a call shows "status failed," you'll need to check the Twilio Debugger logs [(1) ]() . The Twilio Debugger will show specific error codes that indicate why the call failed . Common error codes you might encounter include : - 13225 - Twilio blocked the call - 32017 - Carrier blocked the call Steps to access Twilio error codes: 1. Log into your Twilio Console 2. Navigate to the Monitor section 3. Click on Logs > Errors or Debugger 4. Find your failed call and review the error code and description Since you mentioned you went through Retell to get the number and don't have direct Twilio login access , you may need to either: - Check with whoever set up your Twilio account for the login credentials - Contact Retell support to help you access the Twilio logs Once you identify the specific error code, you can better diagnose whether it's an authentication issue with your SIP trunk configuration [(2) ]() , a carrier block [(1) ]() , or another configuration problem.
​ To learn more, see the sources I considered: [[1] I just got sms verified on my Twilio number and today it just quit working.](https://discord.com/channels/1186424376300679209/1400221857357107250) [[2] Twilio](https://docs.retellai.com/deploy/twilio) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy there is no error code but it says call failed, it points to sip:+441416735883@public-vip.de1.twilio.com
a
Thanks for the follow-up, @dropmuse. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] How to Choose the Right Telephony System in 2024 | Retell AI](https://www.retellai.com/blog/how-to-choose-the-right-telephony-system-in-2024) [[2] Debug outbound connection issues](https://docs.retellai.com/reliability/debug-outbound-call) ​
ility/debug-outbound-call) If the configuration looks correct but issues persist, check with your telephony provider about errors on their side .
### Answer Based on the SIP URI you've provided (
sip:+441416735883@public-vip.de1.twilio.com
) , there are several potential issues with your Twilio-Retell integration: Configuration Issues to Check: When connecting Twilio numbers to Retell AI through elastic SIP trunking, you need to ensure your Origination SIP URI in Twilio is set to Retell's SIP server address:
sip:5t4n6j0wnrl.sip.livekit.cloud
[(1) ]() . For toll-free numbers specifically, you should specify the transport protocol:
sip:5t4n6j0wnrl.sip.livekit.cloud;transport=tcp
. The SIP URI you're seeing (
public-vip.de1.twilio.com
) suggests the call routing may not be properly configured to reach Retell's infrastructure . Common Disconnection Reasons: When outbound calls show status
not_connected
, the
disconnection_reason
field tracks why the connection failed [(2) ]() . Common reasons include: -
telephony_provider_permission_denied
- SIP trunk authentication failed -
telephony_provider_unavailable
- telephony provider errors -
sip_routing_error
- loops or issues with SIP routing -
dial_failed
- SIP error codes unavailable or unknown error Troubleshooting Steps: 1. Check your Twilio elastic SIP trunk configuration and verify the Termination SIP URI doesn't have spaces [(1) ]() 2. Confirm authentication is properly set up (IP whitelisting or credentials) 3. After moving the number to your elastic SIP trunk, ensure you imported it to Retell by supplying the termination SIP URI 4. Review the call history and detailed log in Retell's dashboard - it contains the disconnection reason, SIP error code, and error message [(2) ](
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @dropmuse. I'll get back to you soon.
d
@AI Evy remember retell says user hang up
a
### Answer ### Answer You're experiencing a known issue where Retell shows
user_hangup
as the disconnection reason, but the call is actually dropping while the agent is speaking or immediately after answering [(1) ]() [(2) ]() . This is a documented discrepancy: According to the disconnection reasons documentation,
user_hangup
with call status
ended
means "Expected behavior, user hangup the call" [(3) ]() . However, community reports show this same disconnection reason appears when calls drop unexpectedly during agent speech [(1) ]() [(2) ]() . Key diagnostic steps: 1. Check actual call behavior - If Twilio shows "call failed" but Retell shows
user_hangup
, there's a mismatch in how the disconnection is being logged . 2. Review your SIP configuration - The SIP URI you mentioned (
sip:+441416735883@public-vip.de1.twilio.com
) suggests the call may not be routing correctly to Retell's infrastructure. Your Twilio origination should point to Retell's SIP endpoint [(4) ]() . 3. Verify authentication - For inbound calls through Twilio elastic SIP trunk, ensure your termination SIP URI and authentication (IP whitelisting or credentials) are properly configured . Other possible disconnection reasons to rule out: -
error_llm_websocket_lost_connection
- LLM websocket connection broke during the call [(3) ]() -
error_no_audio_received
- Retell has
n't received audio from Twilio for a while after connection established -
telephony_provider_unavailable
- The telephony provider is unavailable Since Twilio shows the call as failed but Retell logs it as
user_hangup
, this points to a configuration or connectivity issue between Twilio and Retell rather than an actual user action [(1) ]() [(2) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Calls show user hangup but drop while the agent is speaking](https://discord.com/channels/1186424376300679209/1334212011818618961) [[2] Discord message from @harrison_91123 on 2025-01-30](https://discord.com/channels/1186424376300679209/1294891368505937952/1334625679811018988) [[3] Debug call disconnection](https://docs.retellai.com/reliability/debug-call-disconnect) [[4] Help on Twilio DID questions](https://retell.discourse.group/t/help-on-twilio-did-questions/24) ​