Nameless
04/20/2026, 2:48 AMAI Evy
04/20/2026, 2:48 AMAI Evy
04/20/2026, 2:49 AMmax_call_duration_ms setting is reached, the call ends with a hard hangup. [(1) ]() [(2) ]() This is an abrupt termination without a graceful closing message.
Workaround Using Prompt Engineering:
One approach discussed in the community is to add instructions in your agent's prompt to handle time limits gracefully. For example, you could include: [(3) ]()
"The call should not exceed 10 minutes. If the conversation approaches the 10 minutes mark, gracefully summarize the key points, thank the lead for their time, and conclude the call efficiently by invoking the end_call function."
This relies on the LLM being aware of call duration and proactively ending the call before the hard limit is reached. However, community feedback suggests this may not work reliably and could result in hallucinations.
Current Limitations:
Based on community discussions, there's currently no built-in feature to automatically trigger a function or play a closing message when max_call_duration_ms is reached. [(4) ]() [(3) ]() The max_call_duration_ms parameter (minimum 60,000 ms, maximum 7,200,000 ms, default 3,600,000 ms) will force end the call when reached. [(1) ]() [(2) ]()
Recommendation:
If you need a more graceful ending, consider implementing your own timing logic using webhooks to track call duration and tAI Evy
04/20/2026, 2:49 AMmax_call_duration_ms setting.AI Evy
04/20/2026, 2:49 AMAI Evy
04/20/2026, 2:49 AMAI Evy
04/23/2026, 3:48 AMNameless
04/23/2026, 3:48 AMAI Evy
04/23/2026, 3:48 AMAI Evy
04/23/2026, 3:48 AMAI Evy
04/23/2026, 3:48 AMAI Evy
04/23/2026, 3:48 AMNameless
04/24/2026, 3:00 AMAI Evy
04/24/2026, 3:00 AMAI Evy
04/24/2026, 3:00 AMglobal_prompt field which applies to the entire conversation. You can update prompts and other settings programmatically through the API endpoints.
Displaying Conversation Flow Externally:
The API provides access to the full conversation flow structure, including:
- Nodes (conversation, subagent, function, logic, end nodes) [(3) ]()
- Edges and transition conditions
- Components (reusable sub-flows) [(3) ]() [(4) ]()
- Display positions for visual rendering [(2) ]()
The API response includes begin_tag_display_position and display_position coordinates for nodes and notes, which you could use to render the conversation flow in an external window.
Example Response Structure:
The List Conversation Flows API returns data including node positions, edges, and the complete flow structure that could be visualized externally.
However, the sources don't explicitly describe a dedicated "visualization export" endpoint or confirm whether third-party tools can directly render the flow diagram outside the RetAI Evy
04/24/2026, 3:00 AMAI Evy
04/24/2026, 3:00 AMAI Evy
04/24/2026, 3:00 AMNameless
04/28/2026, 5:36 AMAI Evy
04/28/2026, 5:36 AMAI Evy
04/28/2026, 5:37 AMfrom_number) . [(2) ]()
Implementation approach:
1. Set up an Inbound Call Webhook for your agent
2. When the webhook receives the call notification, extract the from_number (caller ID)
3. Use the caller ID to look up relevant information in your database or CRM
4. Return the dynamic variables in the webhook response
Example webhook response structure:
json
{
"call_inbound": {
"dynamic_variables": {
"caller_name": "John Doe"
}
}
}
[(3) ]()
Available caller information:
The system provides {{user_number}} as a default system variable, which contains the user's phone number (from_number for inbound calls) . [(1) ]() You can use this in your webhook logic to determine which dynamic variables to set.
Note: All values in retell_llm_dynamic_variables must be strings.AI Evy
04/28/2026, 5:37 AMAI Evy
04/28/2026, 5:37 AMAI Evy
04/28/2026, 7:03 AMNameless
04/28/2026, 7:03 AMAI Evy
04/28/2026, 7:03 AMAI Evy
04/28/2026, 7:03 AMAI Evy
04/28/2026, 7:03 AMNameless
04/28/2026, 7:09 AMAI Evy
04/28/2026, 7:09 AMAI Evy
04/28/2026, 7:10 AMfrom_number field:
json
{
"event": "call_inbound",
"call_inbound": {
"agent_id": "agent_12345",
"agent_version": 1,
"from_number": "+12137771234",
"to_number": "+12137771235"
}
}
Key Fields:
- `from_number`: The caller's phone number (always present in payload)
- `to_number`: The number being called (always present in payload)
- `agent_id`: If the number has an inbound agent ID set
- `agent_version`: If the number has an inbound agent version set
Webhook Security:
The webhook can be verified using your Retell API Key to ensure it comes from Retell AI. The webhook has a 10-second timeout and will retry up to 3 times if no success status (2xx) is received.
Using the Caller ID:
Once you extract from_number, you can use it to look up customer information in your database/CRM and return dynamic variables in your webhook response.AI Evy
04/28/2026, 7:10 AMAI Evy
04/28/2026, 7:10 AMNameless
04/28/2026, 7:30 AMAI Evy
04/28/2026, 7:30 AMAI Evy
04/28/2026, 7:30 AMcustomer_name) can be referenced in your conversation flow nodes using the {{customer_name}} syntax. [(2) ]()
Important Notes:
- The webhook has a 10-second timeout [(1) ]()
- It will retry up to 3 times if no success status (2xx) is received
- The webhook can be verified using your Retell API Key
- This is part of your number configuration and works for purchased or imported numbersAI Evy
04/28/2026, 7:30 AMjson
{
"event": "call_inbound",
"call_inbound": {
"agent_id": "agent_12345",
"agent_version": 1,
"from_number": "+12137771234",
"to_number": "+12137771235"
}
}
[(1) ]()
Webhook Response to Set Dynamic Variables:
Return dynamic variables that your conversation flow can access:
json
{
"call_inbound": {
"override_agent_id": "agent_12345",
"override_agent_version": 1,
"dynamic_variables": {
"customer_name": "John Doe"
},
"metadata": {
"random_id": "12345"
}
}
}AI Evy
04/28/2026, 7:30 AMAI Evy
04/28/2026, 7:30 AMNameless
04/28/2026, 8:07 AMAI Evy
04/28/2026, 8:07 AMAI Evy
04/28/2026, 8:07 AMAI Evy
04/28/2026, 8:07 AMAI Evy
04/28/2026, 8:07 AMNameless
04/29/2026, 10:01 AMAI Evy
04/29/2026, 10:01 AMAI Evy
04/29/2026, 10:01 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'],
}) ;
const conversationFlowResponse = await client.conversationFlow.retrieve('conversation_flow_id') ;
console.log(conversationFlowResponse.conversation_flow_id) ;
Import (Update) to Replace Existing Flow:
Use the Update Conversation Flow API to replace an existing conversation flow with your JSON data: [(3) ]()
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'],
}) ;
const conversationFlowResponse = await client.conversationFlow.update('conversation_flow_id') ;
console.log(conversationFlowResponse.conversation_flow_id) ;
Create New Flow from JSON:
Alternatively, create a new conversation flow from your exported JSON: [(2) ]()AI Evy
04/29/2026, 10:01 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'],
}) ;
const conversationFlowResponse = await client.conversationFlow.create({
model_choice: { model: 'gpt-4.1', type: 'cascading' },
nodes: [
{
id: 'start',
instruction: { text: 'Greet the customer and ask how you can help them.', type: 'prompt' },
type: 'conversation',
},
],
start_speaker: 'agent',
}) ;
console.log(conversationFlowResponse.conversation_flow_id) ;
The JSON structure includes all conversation flow properties like nodes, edges, tools, components, global_prompt, and model_choice. [(1) ]() [(3) ]() [(4) ]()AI Evy
04/29/2026, 10:01 AMAI Evy
04/29/2026, 10:01 AMNameless
04/29/2026, 10:06 AMAI Evy
04/29/2026, 10:06 AMAI Evy
04/29/2026, 10:06 AMAI Evy
04/29/2026, 10:06 AMAI Evy
04/29/2026, 10:06 AMNameless
04/29/2026, 10:39 AMAI Evy
04/29/2026, 10:39 AMAI Evy
04/29/2026, 10:39 AMAI Evy
04/29/2026, 10:39 AMAI Evy
04/29/2026, 10:39 AMNameless
04/29/2026, 10:40 AMAI Evy
04/29/2026, 10:40 AMAI Evy
04/29/2026, 10:40 AMAI Evy
04/29/2026, 10:40 AMAI Evy
04/29/2026, 10:40 AMNameless
04/29/2026, 10:41 AMAI Evy
04/29/2026, 10:41 AMAI Evy
04/29/2026, 10:41 AMAI Evy
04/29/2026, 10:41 AMAI Evy
04/29/2026, 10:41 AMAI Evy
04/29/2026, 4:43 PMNameless
04/29/2026, 4:43 PMAI Evy
04/29/2026, 4:43 PMAI Evy
04/29/2026, 4:43 PMAI Evy
04/29/2026, 4:43 PMNameless
04/29/2026, 4:44 PMAI Evy
04/29/2026, 4:44 PMAI Evy
04/29/2026, 4:45 PMAI Evy
04/29/2026, 4:45 PMAI Evy
04/29/2026, 4:45 PMNameless
05/01/2026, 3:27 AMAI Evy
05/01/2026, 3:27 AMAI Evy
05/01/2026, 3:27 AMAI Evy
05/01/2026, 3:27 AMAI Evy
05/01/2026, 3:27 AM