Youssef Degachi
01/13/2026, 8:15 PMAI Evy
01/13/2026, 8:15 PMAI Evy
01/13/2026, 8:15 PMjson
{
"call": {
"call_type": "phone_call",
"from_number": "+12137771234",
"to_number": "+12137771235",
"direction": "inbound",
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
...
},
"name": "get_weather",
"args": {
"city": "New York"
}
}
Dynamic Variables:
You can use retell_llm_dynamic_variables to inject call-specific data (like customer info looked up by phone number) into your prompts. [(2) ]() , [(3) ]()
For intermittent failures:
- There's a retry mechanism for inbound dynamic variable webhooks. [(4) ]()
- There's a timeout for Retell webhooks.
If your lookup is inconsistent, it may be related to webhook timeout or response issues on your endpoint side.
Check out these potentially useful sources for more details:
- [Register Phone Call]()
- [Create Phone Call]()
Would you like me to provide a general answer about ensuring webhook reliability, or do you have more details about when it fails vs. works?AI Evy
01/13/2026, 8:15 PMAI Evy
01/13/2026, 8:15 PMYoussef Degachi
01/13/2026, 8:16 PMYoussef Degachi
01/13/2026, 8:16 PMAI Evy
01/13/2026, 8:16 PMAI Evy
01/13/2026, 8:16 PM## Task
1. Call get_name_and_last_meeting to retrieve the callers name and their last meeting.
2. Greet the caller using this greeting: Hi {{first_name}}, your most recent meeting was {{ title }}.
...
[(2) ]()
This pattern instructs the LLM to run the function before doing anything else.
Best practices for reliable function execution at call start:
- Write the task as explicit steps, with the function call as Step 1 [(1) ]()
- Use clear language like "Run the function 'your_function_name'" rather than just "call" [(2) ]()
- Use markdown formatting for better LLM understanding
Example for your use case:
## Task
1. Run the function 'search_user_by_phone' to look up the caller by their phone number.
2. Greet the caller using the retrieved information.
...
If the function still doesn't fire consistently, you may also want to add explicit instructions like:
1. Immediately run the function 'search_user_by_phone' before saying anything.
[(1) ]()
This makes it explicit that the agent should not speak until the function completes.AI Evy
01/13/2026, 8:16 PMAI Evy
01/13/2026, 8:16 PM