.billyblues
07/21/2025, 9:09 PMAI Evy
07/21/2025, 9:09 PMAI Evy
07/21/2025, 9:10 PMAI Evy
07/21/2025, 9:10 PMAI Evy
07/21/2025, 9:10 PMAI Evy
07/21/2025, 9:10 PM.billyblues
07/21/2025, 9:39 PM.billyblues
07/21/2025, 9:41 PMAI Evy
07/21/2025, 9:41 PMAI Evy
07/21/2025, 9:41 PMsip:username@domain . You can also use a dynamic variable that gets substituted at runtime .
## Dynamic Variables for Campaign Context
You can use dynamic variables to pass campaign-specific information during the transfer [(3) ]() . This allows you to route callbacks from specific outbound campaigns to the appropriate destination numbers.
## Custom Telephony Integration Option
If you need more control over the telephony routing, you can use custom telephony providers via elastic SIP trunking [(4) ]() . When using this method, all the telephony functionalities that are supported by Retell numbers will also be suAI Evy
07/21/2025, 9:41 PMAI Evy
07/21/2025, 9:41 PMAI Evy
07/21/2025, 9:41 PM.billyblues
07/21/2025, 9:43 PMAI Evy
07/21/2025, 9:43 PMAI Evy
07/21/2025, 9:43 PMAI Evy
07/21/2025, 9:43 PMAI Evy
07/21/2025, 9:43 PM.billyblues
07/21/2025, 9:44 PM.billyblues
07/21/2025, 9:45 PMAI Evy
07/21/2025, 9:45 PMAI Evy
07/21/2025, 9:45 PMsip:username@domain
- The dynamic variable gets substituted at runtime for each call
For the actual round robin logic implementation, you'd need to manage the rotation sequence through your backend system that updates the dynamic variables or through custom functions that determine which agent number to use next.
Would you like me to explain more about how to set up the dynamic variables or the transfer configuration?AI Evy
07/21/2025, 9:45 PMAI Evy
07/21/2025, 9:45 PM.billyblues
07/29/2025, 10:11 PM.billyblues
07/29/2025, 10:11 PMAI Evy
07/29/2025, 10:11 PM.billyblues
07/29/2025, 10:11 PM.billyblues
07/29/2025, 10:11 PMAI Evy
07/29/2025, 10:11 PMAI Evy
07/29/2025, 10:11 PMsip:username@domain
- A dynamic variable that gets substituted at runtime
## Dynamic Variables Usage
Dynamic variables can be used in the transfer call function number, allowing you to transfer calls to a dynamic number [(3) ]() . You can use dynamic variables in:
- Tool call url
- Tool call description
- Transfer call function number
## Example from Workshop
In the live workshop, they demonstrated using dynamic variables for transfer numbers. They showed how you can create a transfer number variable and pass this information from external systems like GoHighLevel, allowing you to have different numbers for different locations or loan officers [(4) ]() .
So yes, dynamic variables work perfectly for creating round robin routing by updating the variable with the next agent's number in your rotation sequence.AI Evy
07/29/2025, 10:11 PMAI Evy
07/29/2025, 10:11 PMAI Evy
07/29/2025, 10:11 PMsip:username@domain, or use a dynamic variable that gets substituted at runtime [(2) ]() .
The agent will not speak when it's in this node . If you want the agent to say something like "Let me transfer you right away" before performing the actual transfer, you can put a conversation node (with skip response turned on) before this node .
## Dynamic Variables Implementation
Dynamic variables are automatically available during calls and can be used to pass call-specific data [(3) ]() . For your round robin implementation, you would:
1. Set up dynamic variables containing the next agent number in your rotation
2. Configure your transfer tool/node to use that dynamic variable as the destination
3. Update the dynamic variable value through your backend system to cycle through different agent numbers
The phone numbers should be in E.164 format (like +1234567890) or SIP URI format [(1) ]() [(2) ](AI Evy
07/29/2025, 10:11 PMAI Evy
07/29/2025, 10:12 PMAI Evy
07/29/2025, 10:12 PM.billyblues
07/29/2025, 10:14 PMAI Evy
07/29/2025, 10:14 PMAI Evy
07/29/2025, 10:14 PMAI Evy
07/29/2025, 10:14 PMAI Evy
07/29/2025, 10:14 PM.billyblues
07/29/2025, 11:59 PM.billyblues
07/30/2025, 12:00 AMAI Evy
07/30/2025, 12:00 AMAI Evy
07/30/2025, 12:00 AMsip:username@domain, or a dynamic variable that gets substituted at runtime [(2) ]() .
## Dynamic Variables Support
Dynamic variables can be used in the transfer call function number, allowing you to transfer calls to a dynamic number [(3) ]() . You can use dynamic variables in various places including transfer call function numbers .
## Workshop Example
The live workshop demonstrates creating a transfer number dynamic variable and using it in the transfer function [(4) ]() . They show how you can pass different phone numbers for different locations or agents using dynamic variables .
However, there's some conflicting information in the community discussions - one Discord thread mentions that dynamic variables are not supported in the Transfer To destination phone number [(5) ]() , but the official documentation clearly states they are supported [(2) ](AI Evy
07/30/2025, 12:00 AMAI Evy
07/30/2025, 12:00 AM.billyblues
07/30/2025, 12:03 AMAI Evy
07/30/2025, 12:03 AMAI Evy
07/30/2025, 12:03 AM{{agent_phone}} for dynamic variables in transfer calls. [(1) ]()
## Formatting Dynamic Variables
Dynamic variables are placeholders surrounded by double curly braces . For example:
"Hello {{user_name}}, I understand you're interested in {{product_name}}. How can I help you today?"
## Using in Transfer Call Function
For the transfer destination, you can choose between a static number (e.164 or SIP URI) , or the value of a dynamic variable [(2) ]() . You can use dynamic variables in the transfer call function number: in case you want to transfer call to a dynamic number [(1) ]() .
## Implementation Steps
1. Set up your dynamic variable with the agent phone number in your system
2. Configure the Transfer Call Tool to use {{agent_phone}} as the transfer destination [(2) ]()
3. Choose dynamic variable option when configuring the transfer destination
## Supported Formats
The phone number should be in e.164 format or SIP URI format like sip:username@domain . The dynamic variable gets substituted at runtime with the actual phone number for that specific call .
There's also confirmation from community discussions that you can pass dynamic variables to the agent using double curly braces inside function descriptions, just like other dynamic variables [(3) ]() .AI Evy
07/30/2025, 12:03 AMAI Evy
07/30/2025, 12:03 AM.billyblues
07/30/2025, 7:19 PMAI Evy
07/30/2025, 7:19 PMAI Evy
07/30/2025, 7:19 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
nickname: 'Frontdesk Number',
outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
### Configure Agent for Immediate Transfer
Create an agent configured with the Transfer Call Tool set to immediately transfer to your company number. The agent should be set up to perform a cold transfer without speaking first.
### Alternative: Inbound Call Webhook
You can also use the inbound call webhook to handle call routing [(2) ]() . Set up an inbound webhook URL on your phone number [(1) ]() :
javascript
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
inbound_webhook_url: "<https://example.com/inbound-webhook%22,>
}) ;
The webhook receives a payload when inbound calls arrive [(2) ]() , and you can respond with an agent override that's configured for immediate transfer to your company number.
### Webhook Response for Transfer
When the webhook is triggered, respond with an agent configured for immediate forwarding :AI Evy
07/30/2025, 7:19 PMjavascript
{
"call_inbound": {
"override_agent_id": "agent_12345",
"override_agent_version": 1,
"dynamic_variables": {
"transfer_number": "+1234567890"
}
}
}
The key is setting up either a bound inbound agent or webhook response that uses an agent configured with Transfer Call Tool for immediate cold transfer to your company number.AI Evy
07/30/2025, 7:19 PMAI Evy
07/30/2025, 7:19 PM.billyblues
07/30/2025, 7:22 PMAI Evy
07/30/2025, 7:22 PMAI Evy
07/30/2025, 7:22 PMAI Evy
07/30/2025, 7:22 PMAI Evy
07/30/2025, 7:22 PM.billyblues
07/30/2025, 7:24 PMAI Evy
07/30/2025, 7:24 PMAI Evy
07/30/2025, 7:24 PMAI Evy
07/30/2025, 7:24 PMAI Evy
07/30/2025, 7:24 PM.billyblues
07/30/2025, 8:37 PMAI Evy
07/30/2025, 8:37 PMAI Evy
07/30/2025, 8:37 PMAI Evy
07/30/2025, 8:37 PMAI Evy
07/30/2025, 8:37 PM.billyblues
07/30/2025, 8:38 PM.billyblues
07/30/2025, 8:38 PMAI Evy
07/30/2025, 8:38 PMAI Evy
07/30/2025, 8:38 PM{{agent_phone}} [(2) ]()
3. Set transfer type to Cold Transfer - this means the call is transferred to a destination number without the AI speaking
## Code Example for Conversation Flow
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
model_choice: { model: 'gpt-4o', type: 'cascading' },
nodes: [
{
id: 'start',
instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
type: 'conversation',
},
],
start_speaker: 'agent',
}) ;AI Evy
07/30/2025, 8:38 PMskip response turned on before the transfer node [(2) ]() .
Conversation Flow gives you the precise control needed for immediate, silent transfers compared to the more flexible but less controlled single prompt approach.AI Evy
07/30/2025, 8:38 PMAI Evy
07/30/2025, 8:38 PM.billyblues
07/30/2025, 9:18 PMAI Evy
07/30/2025, 9:18 PMAI Evy
07/30/2025, 9:19 PMdisconnection_reason parameter, which provides specific information about how the call ended [(1) ]() [(2) ]() [(3) ]() .
## Key Parameters for Call Status
The main parameters to check are:
disconnection_reason - This enum field tells you exactly why the call ended :
- dial_busy - The called number was busy
- dial_failed - The call failed to connect
- dial_no_answer - The call rang but was not answered
- user_hangup - The caller hung up (indicating they answered)
- agent_hangup - The AI agent ended the call
- voicemail_reached - Call went to voicemail
call_status - Shows the current state of the call [(2) ]() [(3) ]() :
- registered - Call initiated but not yet connected
- ongoing - Call is active and connected
- ended - Call has completed
- error - Call encountered an error
## Using Webhooks for Real-Time Status
You can receive real-time updates through webhook events [(1) ]() :
json
{
"event": "call_ended",
"call": {
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"disconnection_reason": "dial_no_answer",
"call_status": "ended"
}
}
## API Call for Status Check
You can also retrieve call details using the List Calls API [(2) ]() :
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponses = await client.call.list() ;AI Evy
07/30/2025, 9:19 PMdisconnection_reason field that clearly indicates whether the call was answered, went to voicemail, or failed to connect .AI Evy
07/30/2025, 9:19 PMAI Evy
07/30/2025, 9:19 PM.billyblues
07/30/2025, 9:19 PM.billyblues
07/30/2025, 9:19 PMAI Evy
07/30/2025, 9:19 PMAI Evy
07/30/2025, 9:20 PMuser_hangup and agent_hangup [(1) ]() .
The full list of disconnection reasons includes :
- dial_busy - Outbound call not connected, the number dialed is busy
- dial_failed - Outbound call not connected, dialing failed with no or unknown sip error code
- dial_no_answer - Outbound call not connected, the number dialed did not answer
- invalid_destination - Outbound call not connected, the number dialed is invalid
- marked_as_spam - Outbound call not connected, the number dialed is marked as spam
- user_declined - Outbound call not connected, user declined the call
However, there are two known issues that might explain what you're seeing:
1. **Missing webhook events**: There was a bug where webhook events weren't being sent for disconnection reasons other than user_hangup or agent_hangup [(2) ]() . A fix was patched to ensure you receive call_ended webhooks for those cases .
2. **Incorrect disconnection reason reporting**: Some calls made via Twilio are incorrectly marked as user_hangup but actually disconnect while the agent is speaking [(3) ]() . This issue doesn't occur when using web calls from the Retell app .
To check the actual disconnection reason, you can use the Get Call API [(4) ]() :
javascript
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
07/30/2025, 9:20 PMdisconnection_reason field that should show the correct reason .AI Evy
07/30/2025, 9:20 PMAI Evy
07/30/2025, 9:20 PM.billyblues
07/30/2025, 9:21 PMAI Evy
07/30/2025, 9:21 PMAI Evy
07/30/2025, 9:21 PMdisconnection_reason field [(2) ]() [(3) ]() . In the tutorial example, after making a call, the workflow shows how to "retrieve all the call details" which would include the disconnection status .
## Alternative Webhook Approach
You can also use webhooks with Zapier to receive real-time call status updates [(4) ]() . Set up a webhook URL in your Retell agent settings, and Zapier will receive the call data including disconnection reasons when calls end .
However, as noted in community discussions, Zapier may be limited for complex Retell AI integrations, and many users find Make.com or n8n more suitable for handling detailed call data and status monitoring [(5) ]() [(6) ]() .AI Evy
07/30/2025, 9:22 PMAI Evy
07/30/2025, 9:22 PM.billyblues
07/30/2025, 9:25 PMAI Evy
07/30/2025, 9:25 PMAI Evy
07/30/2025, 9:26 PMcall_status field in combination with disconnection_reason to distinguish between answered and unanswered calls [(1) ]() [(2) ]() .
## Call Status Values for Tracking Answered Calls
The call_status field provides these values [(3) ]() [(4) ]() [(2) ]() :
- `registered`: Call id issued, starting to make a call using this id [(3) ]()
- `not_connected`: Call was not connected [(1) ]()
- `ongoing`: Call connected and ongoing [(3) ]()
- `ended`: The underlying websocket has ended for the call
- `error`: Call encountered error
## Disconnection Reasons for Unanswered Calls
According to the documentation, calls that are not answered will have call_status of not_connected with these specific disconnection_reason values [(1) ]() :
- `dial_busy`: Outbound call not connected, the number dialed in busy
- `dial_failed`: Outbound call not connected, dailing failed with no or unknown sip error code
- `dial_no_answer`: Outbound call not connected, the number dialed did not answer
- `invalid_destination`: Outbound call not connected, the number dialed is invalid
- `user_declined`: Outbound call not connected, user declined the call
## Answered Calls Logic
Calls that are answered will have:
- call_status of ended (not not_connected)
- disconnection_reason values like user_hangup, `agent_hanAI Evy
07/30/2025, 9:26 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) ;
The key insight is that answered calls will never have call_status of not_connected. If you're only seeing user_hangup and agent_hangup, those are actually answered calls where someone picked up and then hung up.AI Evy
07/30/2025, 9:26 PMAI Evy
07/30/2025, 9:26 PM.billyblues
07/30/2025, 9:31 PMAI Evy
07/30/2025, 9:31 PMAI Evy
07/30/2025, 9:31 PMdisconnection_reason of voicemail_reached [(1) ]() [(2) ]() .
If you're seeing agent_hangup instead of voicemail_reached for calls where voicemail was left, this indicates that voicemail detection may not be working properly. According to the documentation, "If the call is detected as voicemail and the action defined was taken successfully, the call will have a disconnection reason of `voicemail_reached`" [(1) ]() .
## Troubleshooting Voicemail Detection Issues
Based on community discussions, this can happen when voicemail detection fails [(3) ]() . The agent might leave a message but the system doesn't recognize it as voicemail, causing it to be treated as a normal call that ends with agent_hangup.
## Check Call Analysis Data
You can also check the call_analysis object in your call data [(4) ]() [(5) ]() [(6) ]() [(7) ]() [(8) ]() , which includes an in_voicemail field:
javascript
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
07/30/2025, 9:31 PMcall_analysis object with an in_voicemail boolean field that indicates whether the call was detected as voicemail [(4) ]() [(5) ]() [(6) ]() [(7) ]() [(8) ]() .
## Voicemail Detection Settings
Check your voicemail detection settings in your agent configuration [(1) ]() . Voicemail detection only runs for the first 3 minutes of the call, and if the timeout is reached without detection, the system continues as a normal call .
If voicemail detection is working correctly, you should see voicemail_reached as the disconnection reason rather than agent_hangup [(2) ]() .AI Evy
07/30/2025, 9:31 PMAI Evy
07/30/2025, 9:31 PM.billyblues
07/30/2025, 9:47 PMAI Evy
07/30/2025, 9:47 PMAI Evy
07/30/2025, 9:47 PMdisconnection_reason of dial_no_answer, you can automatically initiate another call.
## Code Example for Outbound Calls
Here's how to make outbound calls programmatically :
javascript
const registerCallResponse = await retell.call.createPhoneCall({
from_number: '+14157774444', // replace with the number you purchased
to_number: '+12137774445', // replace with the number you want to call
retell_llm_dynamic_variables: { // replace with the dynamic variables you want to send (optional)
name: 'John Doe',
blood_group: 'B+'
},
custom_sip_headers: { // replace with custom sip headers you want to send (optional)
X-Custom-Header: 'Custom Value'
}
}) ;AI Evy
07/30/2025, 9:47 PMdisconnection_reason
3. Automatically trigger a second call if the first wasn't answered
A community member mentioned needing similar functionality - to automatically handle unanswered calls and receive dynamic data sent to the agent .
## CPS Considerations
Keep in mind the Calls Per Second (CPS) limits when implementing retry logic [(1) ]() . Each account has a default CPS limit of 1 call per second, so implement retry logic with exponential backoff to handle throttling gracefully .
For the most robust solution, you'll need to build this retry logic into your application using webhooks and the outbound calling API.AI Evy
07/30/2025, 9:47 PMAI Evy
07/30/2025, 9:47 PM.billyblues
07/31/2025, 5:33 PMAI Evy
07/31/2025, 5:33 PMAI Evy
07/31/2025, 5:33 PMAI Evy
07/31/2025, 5:33 PMAI Evy
07/31/2025, 5:33 PM.billyblues
07/31/2025, 5:35 PMAI Evy
07/31/2025, 5:35 PMAI Evy
07/31/2025, 5:35 PMjson
{
"action": {
"type": "static_text",
"text": "Please give us a callback tomorrow at 10am."
}
}
[(1) ]() , [(3) ]()
The voicemail_option can be set to either hangup or leave a static message when voicemail is detected [(1) ]() [(2) ]() [(3) ]() .
## Implementing Conditional Voicemail Logic
To achieve your goal, you'll need to:
1. Track call history externally - Store whether this is the first call to each client in your database
2. Use dynamic variables - Pass this information to the agent using retell_llm_dynamic_variables when creating calls
3. Update agent settings dynamically - Modify the voicemail_option before each call using the Update Agent API [(3) ]() [(4) ]()
## Example ImplementationAI Evy
07/31/2025, 5:35 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
// For first-time calls - enable voicemail
const agentResponse = await client.agent.update('agent_id', {
voicemail_option: {
action: {
type: "static_text",
text: "Please give us a callback tomorrow at 10am."
}
}
}) ;
// For subsequent calls - disable voicemail
const agentResponse2 = await client.agent.update('agent_id', {
voicemail_option: null
}) ;
[(3) ]() , [(4) ]()
## Alternative Approach
You could also create two separate agents - one with voicemail enabled for first calls, and another with voicemail disabled for follow-ups, then choose which agent to use based on your call history logic.
The key limitation is that voicemail settings are configured at the agent level [(5) ]() , so you'll need external logic to determine which configuration to use for each call.AI Evy
07/31/2025, 5:35 PMAI Evy
07/31/2025, 5:35 PM.billyblues
08/04/2025, 7:34 PMAI Evy
08/04/2025, 7:34 PMAI Evy
08/04/2025, 7:34 PMcall_successful field in Retell AI is part of the post-call analysis that's available after a call ends [(1) ]() [(2) ]() [(3) ]() [(4) ]() [(5) ]() [(6) ]() . This boolean field indicates whether the call was deemed successful based on the analysis.
## Where to Find Call Success Status
The call_successful field appears in the call_analysis object :
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponses = await client.call.list() ;
console.log(callResponses) ;
[(1) ]()
The response includes a call_analysis object with the call_successful field [(1) ]() [(2) ]() [(3) ]() [(4) ]() [(5) ]() [(6) ]() :
json
"call_analysis": {
"call_summary": "The agent called the user to ask question about his purchase inquiry. The agent asked several questions regarding his preference and asked if user would like to book an appointment. The user happily agreed and scheduled an appointment next Monday 10am.",
"in_voicemail": false,
"user_sentiment": "Positive",
"call_successful": true,
"custom_analysis_data": {}
}AI Evy
08/04/2025, 7:34 PMcall_successful is NOT:
- It's not about technical call completion (that's call_status)
- It's not about whether the call connected (that's determined by disconnection_reason)
- It's not about call duration or audio quality
What determines success:
The documentation shows that call_successful is part of the post-call analysis that includes information such as sentiment, status, summary, and custom defined data to extract . You need to subscribe to the call_analyzed webhook event type to receive this data once it's ready .
The exact criteria for what makes a call "successful" versus "unsuccessful" in Retell AI's analysis isn't detailed in the available sources. This appears to be determined by Retell AI's post-call analysis algorithms, potentially based on factors like conversation completion, goal achievement, or other conversational metrics.AI Evy
08/04/2025, 7:34 PMAI Evy
08/04/2025, 7:34 PM.billyblues
08/04/2025, 7:36 PMAI Evy
08/04/2025, 7:36 PMAI Evy
08/04/2025, 7:36 PMcall_status and disconnection_reason fields [(1) ]() .
## Identifying Unanswered Calls
Unanswered calls will have call_status of not_connected with these specific disconnection_reason values [(2) ]() :
- `dial_busy`: Outbound call not connected, the number dialed in busy
- `dial_failed`: Outbound call not connected, dailing failed with no or unknown sip error code
- `dial_no_answer`: Outbound call not connected, the number dialed did not answer
- `invalid_destination`: Outbound call not connected, the number dialed is invalid
- `user_declined`: Outbound call not connected, user declined the call
## Identifying Answered Calls
Answered calls will have call_status of ended (not not_connected) with disconnection reasons like :
- `user_hangup`: Expected behavior, user hangup the call
- `agent_hangup`: Expected behavior, AI agent hangup the call
- `call_transfer`: Expected behavior, AI agent transferred the call
- `voicemail_reached`: Expected behavior, if AI agent configured voicemail settings, and reached voicemail
## Using the Get Call API
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.retrieve('119c3f8e47135a29e65947eeb34cf12d') ;
console.log(callResponse) ;
[(1) ]()
## Key Logic
The key insight is that answered calls will never have call_status of not_connected . If you see user_hangup or agent_hangup, those are actually answered calls where someone picked up and then hung up.AI Evy
08/04/2025, 7:36 PMAI Evy
08/04/2025, 7:36 PM.billyblues
08/04/2025, 7:41 PMAI Evy
08/04/2025, 7:41 PMAI Evy
08/04/2025, 7:42 PMdial_busy disconnection reason will be visible after the call attempt, not in the call_started webhook [(1) ]() .
## Webhook Event Behavior for Failed Calls
When a call has dial_busy (or any failed connection) , the webhook behavior is :
- **`call_started` webhook**: Will NOT be triggered
- **`call_ended` webhook**: WILL be triggered with the dial_busy disconnection reason
- **`call_analyzed` webhook**: WILL be triggered
According to the webhook documentation: "When the call did not connect (like calls with dial_failed, dial_no_answer, dial_busy disconnection reason) , it will not have its call_started webhook triggered. It will still have its call_ended and call_analyzed webhook triggered" .
## Call Status for dial_busy
Calls with dial_busy will have [(2) ]() :
- `call_status`: not_connected
- `disconnection_reason`: dial_busy
- Description: "Outbound call not connected, the number dialed in busy"
## Where You'll See dial_busy
You can access the dial_busy status through:
1. call_ended webhook - Receives the full call object with disconnection reason [(1) ]()
2. Get Call API - After the call attempt is complete [(3) ]() , [(4) ]()
3. Dashboard - In the call history after the call attempt
The key point is that dial_busy indicates the call never connected, so there's no call_started event to trigger [(1) ]() .AI Evy
08/04/2025, 7:42 PMAI Evy
08/04/2025, 7:42 PM.billyblues
08/04/2025, 8:46 PMAI Evy
08/04/2025, 8:46 PMAI Evy
08/04/2025, 8:46 PMcall_status of not_connected .
### 3. Automatic Retry Logic
When your webhook receives a call_ended event with one of the above disconnection reasons, automatically trigger a second call using the Create Phone Call API [(4) ]() :
javascript
const registerCallResponse = await retell.call.createPhoneCall({
from_number: '+14157774444', // replace with the number you purchased
to_number: '+12137774445', // replace with the number you want to call
retell_llm_dynamic_variables: { // replace with the dynamic variables you want to send (optional)
name: 'John Doe',
blood_group: 'B+'
},
custom_sip_headers: { // replace with custom sip headers you want to send (optional)
X-Custom-Header: 'Custom Value'
}
}) ;AI Evy
08/04/2025, 8:46 PMcall_started webhook will NOT be triggered, but call_ended and call_analyzed webhooks WILL be triggered [(2) ]() .
### 5. Community Solutions
Based on community discussions, some users have implemented similar functionality and mentioned setting up workflows to keep calling until connected [(5) ]() . One user mentioned detecting "dial no answers" and setting up workflows to continue calling .
## External Automation Tools
You can use platforms like Make.com, Zapier, or n8n to create workflows that:
1. Listen for webhook events
2. Check disconnection reasons
3. Automatically trigger second calls for unanswered attempts
This approach gives you full control over retry timing, maximum attempts, and can include logic to space out retry attempts appropriately.AI Evy
08/04/2025, 8:46 PMAI Evy
08/04/2025, 8:46 PM.billyblues
08/05/2025, 8:03 PMAI Evy
08/05/2025, 8:03 PMAI Evy
08/05/2025, 8:03 PMdisconnection_reason field in your call data [(2) ]() . For unanswered calls, you'll see reasons like [(1) ]() :
- `dial_no_answer`: The number dialed did not answer
- `dial_busy`: The number dialed is busy
- `marked_as_spam`: The call is marked as spam
- `user_declined`: The user explicitly declined the call
## Getting Call Data
You can analyze your pickup rates using the Get Call API [(2) ]() :
javascript
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
08/05/2025, 8:03 PMAI Evy
08/05/2025, 8:03 PM.billyblues
08/14/2025, 8:30 PMAI Evy
08/14/2025, 8:30 PMAI Evy
08/14/2025, 8:30 PMretell_llm_dynamic_variables when creating each call .
## Setting Up Dynamic Variables
Dynamic variables can be used in your prompts, begin messages, and other agent configurations . For example:
"This is call number {{call_attempt}} to {{user_name}}. {{call_specific_message}}"
## For Outbound Calls
When using the Create Phone Call API, set your variables in the retell_llm_dynamic_variables field :
{
"user_name": "John Smith",
"call_attempt": "1",
"call_specific_message": "Thank you for your interest in our services"
}AI Evy
08/14/2025, 8:30 PM"call_specific_message": "Thanks for your interest"
- Call 2: "call_specific_message": "Following up on our previous conversation"
- Call 3: "call_specific_message": "This is my final attempt to reach you"
3. Use in prompts - Reference these variables throughout your agent's configuration [(1) ]()
## Important Notes
All values in retell_llm_dynamic_variables must be strings . Numbers, booleans, or other data types are not supported.
If a dynamic variable is not assigned a value, it will remain unchanged in the output as {{variable_name}} rather than being replaced with an empty string .
This approach allows you to create personalized, context-aware conversations that adapt based on your relationship history with each contact [(3) ]() [(4) ]() .AI Evy
08/14/2025, 8:30 PMAI Evy
08/14/2025, 8:30 PM.billyblues
08/14/2025, 8:33 PMAI Evy
08/14/2025, 8:33 PMAI Evy
08/14/2025, 8:33 PMYou are a sales representative calling {{customer_name}}. This is call attempt number {{call_attempt}} to this customer.
CALL BEHAVIOR BASED ON ATTEMPT:
- If {{call_attempt}} equals "1": Be friendly and introduce yourself. Say "Hi {{customer_name}}, this is my first time reaching out about our premium services."
- If {{call_attempt}} equals "2": Reference the previous attempt. Say "Hi {{customer_name}}, I called earlier but wanted to follow up on our conversation about your needs."
- If {{call_attempt}} equals "3": Be more direct and urgent. Say "Hi {{customer_name}}, this is my final attempt to reach you about this limited-time opportunity."
{{call_specific_message}}
Remember to always use the customer's name {{customer_name}} and adapt your tone based on the call attempt number.
## Dynamic Variables Setup
When making the API call, you'd pass these variables :
{
"customer_name": "John Smith",
"call_attempt": "1",
"call_specific_message": "I'm calling about our premium plan that could save you 30% on your monthly costs."
}
For the second call:
{
"customer_name": "John Smith",
"call_attempt": "2",
"call_specific_message": "I wanted to follow up on the premium plan we discussed and answer any questions you might have."
}
## Alternative Approach Using Begin Message
You can also use dynamic variables in the begin message field :
"Hello {{customer_name}}, {{call_opening_message}}"AI Evy
08/14/2025, 8:33 PMcall_opening_message would be different for each attempt:
- Call 1: "I'm reaching out for the first time about our services"
- Call 2: "I'm following up on our previous conversation"
- Call 3: "This is my final attempt to connect with you"
## Important Notes
All values in retell_llm_dynamic_variables must be strings . When a dynamic variable is not assigned a value, it will remain unchanged in the output as {{variable_name}} .
You can use dynamic variables in prompts, begin messages, tool call descriptions, and other parts of your agent configuration .AI Evy
08/14/2025, 8:33 PMAI Evy
08/14/2025, 8:33 PMAI Evy
08/19/2025, 2:08 AM.billyblues
08/19/2025, 2:08 AMAI Evy
08/19/2025, 2:08 AMjson
{
"action": {
"type": "static_text",
"text": "{{voicemail_message}}"
}
}
[(4) ]() [(5) ]()
Then pass different voicemail messages via retell_llm_dynamic_variables when creating calls [(1) ]() :
{
"customer_name": "John Smith",
"call_attempt": "1",
"voicemail_message": "Hi, this is Sarah calling about your inquiry. Please call us back at your convenience."
}
### Approach 2: Update Agent Before Each Call
Dynamically update the agent's voicemail settings before each call using the Update Agent API [(2) ]() :
For Call 1:
json
{
"voicemail_option": {
"action": {
"type": "static_text",
"text": "Hi, this is our first attempt to reach you about our services."
}
}
}
For Call 2:
json
{
"voicemail_option": {
"action": {
"type": "static_text",
"text": "Hi, we called earlier but wanted to follow up on your inquiry."
}
}
}AI Evy
08/19/2025, 2:08 AMretell_llm_dynamic_variables must be strings [(1) ]() . The voicemail detection will only run for the first 3 minutes of the call [(3) ]() .AI Evy
08/19/2025, 2:09 AMAI Evy
08/19/2025, 2:09 AM.billyblues
08/19/2025, 2:23 AMAI Evy
08/19/2025, 2:23 AMAI Evy
08/19/2025, 2:24 AMretell_llm_dynamic_variables must be strings
- Dynamic variables can be used in voicemail settings for both static text and prompt [(2) ]()
- When a dynamic variable is not set, it will remain unchanged as {{variable_name}} in the output [(1) ]()
- Make sure there are no spaces inside the curly braces (use {{voicemail_message}} not {{ voicemail_message }}) [(6) ]()
This approach allows you to have one agent configuration but deliver personalized voicemails based on call history without needing to update the agent before each call.AI Evy
08/19/2025, 2:24 AMjson
{
"action": {
"type": "static_text",
"text": "{{voicemail_message}}"
}
}
### Pass Different Messages Per Call
When making outbound calls, use the retell_llm_dynamic_variables field to pass different voicemail content [(1) ]() :
For Call 1:
json
{
"customer_name": "John Smith",
"call_attempt": "1",
"voicemail_message": "Hi, this is Sarah from ABC Company. I'm calling about your recent inquiry. Please give us a callback at your convenience."
}
For Call 2:
json
{
"customer_name": "John Smith",
"call_attempt": "2",
"voicemail_message": "Hi John, this is Sarah again. I called earlier but wanted to follow up on your inquiry. Please call us back when you have a moment."
}
For Call 3:
json
{
"customer_name": "John Smith",
"call_attempt": "3",
"voicemail_message": "Hi John, this is my final attempt to reach you about this time-sensitive opportunity. Please call us back today."
}AI Evy
08/19/2025, 2:24 AMAI Evy
08/19/2025, 2:24 AM