kakashi1412
12/11/2025, 3:16 AMAI Evy
12/11/2025, 3:16 AMAI Evy
12/11/2025, 3:17 AMfrom_number, to_number) . You then respond with dynamic variables for that specific call. [(1) ]()
Your webhook response should look like this:
json
{
"call_inbound": {
"dynamic_variables": {
"customer_name": "John Doe"
}
}
}
**Important**: All dynamic variable values must be strings. Passing boolean values like false instead of "false" can cause issues. [(2) ]()
## Option 2: Custom SIP Headers
You can use custom SIP headers to pre-set dynamic variables for inbound calls. The header needs to start with sip.h.x-, and it will be converted to a dynamic variable after removing the prefix. [(3) ]()
For example: sip.h.x-caller: abc becomes x-caller: abc.
## Using the Variables
Once set, reference them in your prompts using double curly braces:
Hello {{customer_name}}, how can I help you today?
[(1) ]()AI Evy
12/11/2025, 3:17 AMAI Evy
12/11/2025, 3:17 AMkakashi1412
12/11/2025, 3:18 AMAI Evy
12/11/2025, 3:18 AMAI Evy
12/11/2025, 3:18 AMAI Evy
12/11/2025, 3:18 AMAI Evy
12/11/2025, 3:18 AMkakashi1412
12/11/2025, 3:19 AMAI Evy
12/11/2025, 3:19 AMAI Evy
12/11/2025, 3:19 AMfrom_number. [(1) ]()
Webhook payload example:
json
{
"event": "call_inbound",
"call_inbound": {
"agent_id": "agent_12345",
"agent_version": 1,
"from_number": "+12137771234",
"to_number": "+12137771235"
}
}
The from_number field will always show up in the payload and helps you identify the caller.
To use it in tool calls:
You can pass the from_number value back as a dynamic variable in your webhook response, making it available throughout the call:
json
{
"call_inbound": {
"dynamic_variables": {
"caller_phone": "+12137771234"
}
}
}
Then reference {{caller_phone}} in your tool configurations or prompts. [(2) ]()
System variable alternative:
For phone calls, Retell also provides a built-in system variable {{user_number}} which automatically contains the user's phone number (for inbound calls, this is the from_number) .AI Evy
12/11/2025, 3:19 AMAI Evy
12/11/2025, 3:19 AMkakashi1412
12/15/2025, 12:29 PMAI Evy
12/15/2025, 12:29 PMAI Evy
12/15/2025, 12:30 PMdynamic_variables under `call_inbound`:
[(1) ]()
json
{
"call_inbound": {
"dynamic_variables": {
"customer_name": "John Doe"
}
}
}
Common Issues
1. Invalid response format — The error Invalid webhook response format indicates the response structure doesn't match what Retell expects. Make sure dynamic_variables is nested inside call_inbound, not at the root level.
[(2) ]()
2. Non-string values — All dynamic variable values must be strings. If you're passing values from a workflow tool like Make.com using template variables (e.g., {{81.firstName}}) , ensure those values are actually populated and are strings.
3. Webhook timeout — The webhook has a 10-second timeout. If no success status (2xx) is received within that time, the webhook retries up to 3 times.
[(1) ]()
Troubleshooting Steps
- Check your call's Data Log in the call history tab — it will show if the inbound webhook triggered successfully or returned an error.
[(2) ]()
- Test with hardcoded string values first to confirm the format is correct before using dynamic template variables.
- Create a new version of your agent and test again.AI Evy
12/15/2025, 12:30 PMAI Evy
12/15/2025, 12:30 PM