Nicolas
12/22/2025, 4:51 PMAI Evy
12/22/2025, 4:51 PMAI Evy
12/22/2025, 4:51 PMInbound Call Agent in your phone number settings
2. Enable the Inbound Webhook
3. In your webhook handler, check the from_number field in the request payload to identify the caller
To reject a call:
- Respond with a 200 status code without including call_inbound.override_agent_id in the JSON response
To accept a call:
- Respond with a 200 status code with call_inbound.override_agent_id set to your desired agent
Example request payload you'll receive:
json
{
"event": "call_inbound",
"call_inbound": {
"agent_id": "agent_12345",
"agent_version": 1,
"from_number": "+12137771234",
"to_number": "+12137771235"
}
}
You can maintain a blocklist and check if from_number matches any blocked numbers, then respond accordingly. [(1) ]() [(2) ]()AI Evy
12/22/2025, 4:51 PMAI Evy
12/22/2025, 4:51 PMNicolas
12/22/2025, 8:38 PMAI Evy
12/22/2025, 8:38 PMAI Evy
12/22/2025, 8:39 PM200 status code and an empty JSON object (or a JSON object that does not include call_inbound.override_agent_id) . [(1) ]()
Example response to reject a call:
json
{}
Or:
json
{
"call_inbound": {}
}
The key is that you're returning a successful 200 response without specifying an override_agent_id, which tells Retell not to connect the call to any agent.AI Evy
12/22/2025, 8:39 PMAI Evy
12/22/2025, 8:39 PMNicolas
12/22/2025, 8:39 PMAI Evy
12/22/2025, 8:39 PMAI Evy
12/22/2025, 8:39 PM200 status code and include the override_agent_id in your response: [(1) ]()
json
{
"call_inbound": {
"override_agent_id": "agent_12345",
"override_agent_version": 1,
"dynamic_variables": {
"customer_name": "John Doe"
},
"metadata": {
"random_id": "12345"
}
}
}
All fields except override_agent_id are optional. You can also include:
- dynamic_variables to pass call-specific data to your agent
- metadata to store custom information
- agent_override to override specific agent settings for this call onlyAI Evy
12/22/2025, 8:39 PMAI Evy
12/22/2025, 8:39 PMNicolas
12/23/2025, 1:54 PMAI Evy
12/23/2025, 1:54 PMAI Evy
12/23/2025, 1:54 PMInbound Call Agent in your phone number settings first. [(1) ]()
If your number still has an inbound agent configured, the webhook fallback behavior kicks in. The docs state: "If all of those attempts fail, it will check whether this number has an inbound agent id set. If it does, it will then try to connect the call to that agent."
To properly reject calls:
1. Unset the Inbound Call Agent in the phone number setting
2. Enable the Inbound Webhook
3. Return a 200 response without override_agent_id
If you have an inbound agent set on the number, returning an empty call_inbound object won't reject the call—it will fall back to that agent.AI Evy
12/23/2025, 1:54 PMAI Evy
12/23/2025, 1:54 PMNicolas
12/23/2025, 2:57 PMAI Evy
12/23/2025, 2:57 PMAI Evy
12/23/2025, 2:57 PMfrom_number to see who's calling:
- To block the call: Return 200 with {} or {"call_inbound": {}} — since there's no agent set on the number and no override_agent_id in your response, the call gets rejected
- To accept the call: Return 200 with {"call_inbound": {"override_agent_id": "your_agent_id"}}
Why your current setup isn't working: If you still have an inbound agent assigned to the phone number, Retell will fall back to that agent when your webhook doesn't provide an override_agent_id. The number must have no default agent for rejection to work.AI Evy
12/23/2025, 2:57 PMAI Evy
12/23/2025, 2:57 PMNicolas
12/29/2025, 4:11 PMAI Evy
12/29/2025, 4:11 PMAI Evy
12/29/2025, 4:11 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.createSMSChat({
from_number: '+12137771234',
to_number: '+14155551234',
}) ;AI Evy
12/29/2025, 4:11 PMAI Evy
12/29/2025, 4:11 PM