Vako-SV
01/29/2026, 7:20 PMAI Evy
01/29/2026, 7:20 PMAI Evy
01/29/2026, 7:20 PMcall_ended webhook which provides a disconnection_reason field in the call object [(4) ]()
- Use Post-Call Analysis to extract custom Boolean, Text, Number, or Selector data from calls [(5) ]()
For your specific feature request (distinguishing transfer failure types in real-time tool results) , I'd recommend submitting this directly to the Retell team:
- Visit [Contact Sales]()
- Check [)
Check out these potentially useful sources:
- [Call Transfer Node]()
- [Webhook Overview](AI Evy
01/29/2026, 7:21 PMAI Evy
01/29/2026, 7:21 PMAI Evy
02/09/2026, 2:39 PMVako-SV
02/09/2026, 2:39 PMAI Evy
02/09/2026, 2:40 PM+12137771234) when setting the transfer target
A more reliable approach is to use a custom function that looks up the department and returns the exact phone number, then stores it in a dynamic variable that the transfer node uses. This removes the LLM from the number selection process entirely.AI Evy
02/09/2026, 2:40 PM{{department_ledger}} in your Dynamic Routing prompt, provided you've correctly passed it through the inbound webhook.
Important: For inbound webhooks, your Make.com response must structure the variables under call_inbound with the dynamic_variables key:
[(2) ]()
json
{
"call_inbound": {
"dynamic_variables": {
"department_ledger": "Sales: +12137771234, Support: +12137771235, Billing: +12137771236"
}
}
}
Using retell_llm_dynamic_variables at the top level won't work for inbound webhooks—it must be nested under call_inbound.
## 2. Prompt Logic
You can instruct the Dynamic Routing prompt to select from the {{department_ledger}} variable. For example:
[(3) ]()
- If the caller wants Sales, transfer to the Sales number from {{department_ledger}}
- If the caller wants Support, transfer to the Support number from {{department_ledger}}AI Evy
02/09/2026, 2:40 PMAI Evy
02/09/2026, 2:40 PMVako-SV
02/10/2026, 8:40 AMAI Evy
02/10/2026, 8:40 AMAI Evy
02/10/2026, 8:41 AM{{department_ledger}} as the single source of truth [(1) ]()
- Including explicit conditions for when NOT to transfer
- Requiring E.164 format validation
Suggested improvements:
Dynamic variables can be used in tool descriptions and transfer call phone numbers. For dynamic routing, the prompt should clearly map conditions to phone numbers. A more structured approach:
Based on the department the caller requested, transfer to the matching phone number from {{department_ledger}}.
Rules:
- If dept = 'Sales', transfer to the Sales number in {{department_ledger}}
- If dept = 'Support', transfer to the Support number in {{department_ledger}}
- If dept = 'HR', transfer to the HR number in {{department_ledger}}
DO NOT transfer if:
- The department shows "Status=Don't Transfer"
- No valid +1 phone number exists for that departmentAI Evy
02/10/2026, 8:41 AM+12137771234) when setting the transfer target [(2) ]()
2. For more reliability, consider using a custom function that looks up the department and returns the exact phone number, then stores it in a dynamic variable that the transfer node uses—this removes the LLM from the number selection process entirely
3. All values in dynamic variables must be strings [(1) ]()
Your approach of having explicit validation rules is good practice to prevent hallucination of phone numbers.AI Evy
02/10/2026, 8:41 AMAI Evy
02/10/2026, 8:41 AMVako-SV
02/14/2026, 10:40 AMAI Evy
02/14/2026, 10:40 AMAI Evy
02/14/2026, 10:40 AMdisconnection_reason via the List Calls API, which may provide more insight into how each leg terminated:
[(2) ]()
The disconnection_reason field includes values like user_hangup, agent_hangup, call_transfer, and others that might help diagnose the timing.
Recommended next steps:
Since this appears to be a platform-level behavior question not covered in the available documentation, I'd recommend:
- Visit [Contact Sales]()
- Check [)
Providing the call IDs you mentioned (call_e15b29aee3aeb034f4a566b12f2 and call_0edeb5296493f2bc929bdcee) directly to the Retell team will help them investigate the specific behavior.AI Evy
02/14/2026, 10:40 AMAI Evy
02/14/2026, 10:40 AM