akshat_9728
12/04/2025, 6:11 PMAI Evy
12/04/2025, 6:11 PMAI Evy
12/04/2025, 6:12 PMdial_failed disconnection reason [(1) ]() . Here are the key troubleshooting steps:
Check Your Termination SIP URI [(2) ]()
- Remove any spaces in your Termination SIP URI
- Use a localized termination URI near your region
- The URI should end with .pstn.twilio.com
Verify Authentication Credentials
- Ensure you entered the correct username and password
- Note that the username is different from the friendly name in the credential list
Review Your Elastic SIP Trunk Setup
1. Confirm termination settings are configured for outbound calls
2. Verify you've whitelisted IP addresses or set up authentication with username/password
3. Check that the number is properly imported into Retell with the correct termination URI
Check Disconnection Logs [(1) ]()
You can diagnose the specific disconnection reason through the Retell Dashboard or using the get-call API endpoint . Common outbound failure reasons include:
- `dial_failed`: Dialing failed with no or unknown SIP error code
- `telephony_provider_permission_denied`: SIP trunk credentials are not authenticated
- `telephony_provider_unavailable`: The telephony provider is unavailable
If the issue persists after verifying these configurations, check your Twilio logs for specific error codes that may indicate carrier-level issues.AI Evy
12/04/2025, 6:12 PMAI Evy
12/04/2025, 6:12 PMakshat_9728
12/04/2025, 6:14 PMAI Evy
12/04/2025, 6:14 PMAI Evy
12/04/2025, 6:14 PMAI Evy
12/04/2025, 6:14 PMAI Evy
12/04/2025, 6:14 PMakshat_9728
12/04/2025, 6:25 PMAI Evy
12/04/2025, 6:25 PMAI Evy
12/04/2025, 6:25 PMring_duration_ms parameter in Retell AI controls how long the phone will ring for both outbound calls and call transfers [(1) ]() [(2) ]() [(3) ]() [(4) ]() . The default value is 30000 milliseconds (30 seconds) , and the valid range is between 5000 and 90000 milliseconds .
However, there's an important distinction: the ring_duration_ms setting in Retell AI may not always override carrier-level or SIP trunk provider settings [(5) ]() . When using a Twilio SIP trunk, the actual ring duration can be influenced by:
1. Twilio's own timeout settings - Your SIP trunk provider may have their own maximum ring duration
2. Carrier-level restrictions - The destination carrier might terminate the call earlier
3. Call forwarding configurations - If you're using call forwarding, the ring duration might be controlled outside of Retell
From a community discussion, when a user set ring duration to 5 seconds but experienced longer ringing, Retell support indicated that ring duration control for certain scenarios (like call forwarding) needs to be configured at the provider level before the call reaches Retell .
To troubleshoot your issue:
1. Verify your agent's ring_duration_ms is set to 60000 (60 seconds) by checking your agent configuration [(1) ]() [(2) ]()
2. Check your Twilio SIP trunk settings for any timeout configurations
3. Review your telephony provider's settings for maximum ring duration limits
If you're experieAI Evy
12/04/2025, 6:25 PMAI Evy
12/04/2025, 6:26 PMAI Evy
12/04/2025, 6:26 PMakshat_9728
12/04/2025, 6:28 PMAI Evy
12/04/2025, 6:28 PMAI Evy
12/04/2025, 6:28 PMring_duration_ms to 30000 (30 seconds) [(1) ]() [(2) ]() , this indicates a more serious connectivity or configuration issue with your Twilio SIP trunk setup.
The ring_duration_ms parameter controls how long the phone will ring for outbound calls and call transfers, with a default value of 30000 milliseconds (30 seconds) . However, when calls are failing almost immediately (1 second) , the ring duration setting isn't the root cause—the call is failing before it can properly ring.
This suggests one of these issues:
1. SIP Trunk Termination Configuration Problem [(3) ]()
- Your Termination SIP URI may be incorrect or contain spaces
- Authentication credentials (username/password) might be invalid
- IP whitelisting may not be properly configured
2. Call Routing Failure
- The call isn't successfully routing through your Twilio SIP trunk to the destination
- Your telephony provider may be rejecting the call immediately
3. Twilio Account Issues
- Geographic permissions may not be enabled for the destination country
- Account balance or service disruptions
- Rate limiting or concurrent call restrictions
Immediate troubleshooting steps:
1. Check your Twilio console logs for specific error codes from these failed calls
2. Verify your Termination SIP URI in Retell has no spaces and uses the correct format ending in .pstn.twilio.com
3. Confirm your SIP trunk authentication credentials are correct
4. Review your Voice Geographic Permissions in Twilio if calling internationally
5. Check that the number is properly imported in Retell with the correct terminatAI Evy
12/04/2025, 6:28 PMring_duration_ms setting itself.AI Evy
12/04/2025, 6:28 PMAI Evy
12/04/2025, 6:28 PMakshat_9728
12/04/2025, 6:29 PMAI Evy
12/04/2025, 6:29 PMAI Evy
12/04/2025, 6:29 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d') ;
console.log(callResponse) ;AI Evy
12/04/2025, 6:29 PMyourtrunk.pstn.twilio.com .
2. Verify the full import configuration [(5) ]() : When you imported the number, confirm you included the complete Termination SIP URI along with username/password if using credential-based authentication [(4) ]() .
3. **Check Twilio call logs**: Review your Twilio console for specific SIP error codes that occur at the exact moment the call disconnects [(6) ]() . These logs will show whether Twilio or the carrier is rejecting the call .
If the disconnection reason shows telephony_provider_permission_denied or telephony_provider_unavailable, the issue is with your Twilio SIP trunk authentication or availability [(1) ]() . If it shows dial_failed, check your Twilio logs for the underlAI Evy
12/04/2025, 6:29 PMAI Evy
12/04/2025, 6:29 PMAI Evy
12/04/2025, 6:29 PMakshat_9728
12/04/2025, 6:30 PMAI Evy
12/04/2025, 6:30 PMAI Evy
12/04/2025, 6:30 PMsip:sip.retellai.com
- This tells Twilio where to route calls
Re-import your number:
If the webhook configuration is correct, try deleting and re-importing your number in Retell . When importing, you'll need to supply the termination SIP URI you set up in Twilio . If you configured authentication via credentials, you'll need to supply the username and password as well .
You can import programmatically using the Import Number API :
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.import({
phone_number: '+14157774444',
termination_uri: 'someuri.pstn.twilio.com',
}) ;
console.log(phoneNumberResponse.inbound_agent_id) ;
[(3) ]()
Check Twilio's call logs to see the specific SIP error code when the call disconnects after 1 second. This will reveal whether Twilio is rejecting the call or if there's a carrier-level issue.AI Evy
12/04/2025, 6:30 PMAI Evy
12/04/2025, 6:30 PMakshat_9728
12/04/2025, 6:33 PMAI Evy
12/04/2025, 6:33 PMAI Evy
12/04/2025, 6:33 PMvoicemail_reached [(1) ]() [(2) ]() [(3) ]() .
Important distinction:
- The call_status field tracks whether a call is registered, ongoing, or ended
- The disconnection_reason field (available after the call ends) indicates why the call ended [(2) ]() [(3) ]()
So when voicemail is detected:
1. The call will end (either by hanging up or after leaving a message, depending on your configuration) [(1) ]()
2. The call_status will become ended
3. The disconnection_reason will be set to voicemail_reached [(1) ]() [(2) ]() [(3) ]()
Note: This only applies if the voicemail detection action was successfully taken [(1) ]() . You can check this in:
- The Retell Dashboard call logs
- The Get Call API response, which includes the disconnection_reason field [(2) ]() [(3) ]()
The voicemail detection runs for the first 3 minutes of the call by default [(1) ]() .AI Evy
12/04/2025, 6:33 PMAI Evy
12/04/2025, 6:33 PMakshat_9728
12/04/2025, 6:35 PMAI Evy
12/04/2025, 6:35 PMAI Evy
12/04/2025, 6:35 PMended, not not_connected [(1) ]() .
The not_connected status applies to calls that never successfully connected in the first place . This includes disconnection reasons like :
- dial_busy - The number dialed is busy
- dial_failed - Dialing failed with no or unknown SIP error code
- dial_no_answer - The number dialed did not answer
- invalid_destination - The number dialed is invalid
- marked_as_spam - The number dialed is marked as spam
- user_declined - User declined the call
However, voicemail_reached is categorized as an ended call status, not not_connected . This is because the call did successfully connect—it just connected to a voicemail system rather than a live person [(2) ]() .
The distinction is:
- **`not_connected`**: Call never established a connection [(1) ]()
- **`ended`**: Call connected but then ended (including when voicemail is detected) [(1) ]() [(2) ]()
So when voicemail detection works successfully, you'll see [(3) ]() [(4) ]() [(2) ]() :
- `call_status`: ended [(3) ]() [(4) ]()
- `disconnection_reason`: voicemail_reached [(3) ]() [(4) ]() [(2) ]()AI Evy
12/04/2025, 6:35 PMAI Evy
12/04/2025, 6:35 PM