https://retellai.com/?utm_source=discord&utm_medium=seo logo
is it possible to reject inbound call with call_in...
# ❓・ai-evy-support
q
@AI Evy is it possible to reject inbound call with call_inbound function?
a
Thanks for tagging me @Q4. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can reject inbound calls using the inbound webhook [(1) ]() . To selectively reject inbound calls : 1. Unset the
Inbound Call Agent
in the phone number setting 2. Enable the
Inbound Webhook
3. Find
from_number
in the webhook request body to check if it matches the number you want to reject **To reject a call**: Respond with a 200 status code without the
call_inbound.override_agent_id
in your JSON response **To accept a call**: Respond with a 200 status code containing the
call_inbound.override_agent_id
as a JSON object This approach lets you filter and reject unwanted inbound calls based on the caller's number or other criteria in the webhook payload .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) ​
q
@AI Evy more infor on /features/inbound-call-webhook#can-i-use-this-webhook-to-decline-inbound-calls-sms-based-on-incoming-number
a
Thanks for the follow-up, @Q4. I'll get back to you soon.
### Answer Yes, you can use the inbound webhook to decline inbound calls and SMS based on the incoming number [(1) ]() . To selectively reject inbound calls or SMS : 1. Unset the
Inbound Call Agent
in the phone number setting 2. Enable the
Inbound Webhook
3. Check the
from_number
in the webhook request body to identify if it matches a number you want to reject **To reject the call/SMS**: Respond with a 200 status code without the
call_inbound.override_agent_id
(for calls) or
chat_inbound.override_agent_id
(for SMS) in your JSON response **To accept the call/SMS**: Respond with a 200 status code containing the
call_inbound.override_agent_id
as a JSON object **Important note about webhook failures**: If the webhook is not successful after up to 3 retry attempts, the system will check whether the number has an inbound agent id set . If it does, it will connect the call to that agent . If not, it will disconnect the call .
​ To learn more, see the sources I considered: [[1] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.