https://retellai.com/?utm_source=discord&utm_medium=seo logo
Can I set up inbound answering time
# ❓・ai-evy-support
a
@AI Evy Can I set up inbound answering time? For example train agent not to answer during weekends
a
Thanks for tagging me @anthonylovatt_26757. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can control when your agent answers inbound calls by using the inbound call webhook feature [(1) ]() . This webhook allows you to selectively accept or reject inbound calls based on your custom logic, including time-based restrictions like weekends . Here's how to set it up: 1. **Configure the webhook**: Set up an
inbound_webhook_url
on your phone number configuration [(2) ]() [(3) ]() 2. **Implement time-based logic**: In your webhook endpoint, check the current time/day and decide whether to accept the call 3. **Control call acceptance**: - To accept the call: respond with a 200 status code containing
"call_inbound.override_agent_id"
as a JSON object [(1) ]() - To reject the call: respond with a 200 status code without containing the
"call_inbound.override_agent_id"
as a JSON object For your weekend example, your webhook would check if the current day is Saturday or Sunday, and if so, return a 200 response without the
override_agent_id
field to reject the call . The webhook receives payload information including
from_number
and
to_number
which can help you identify the caller and apply different rules as needed .
​ To learn more, see the sources I considered: [[1] Inbound call webhook](https://docs.retellai.com/features/inbound-call-webhook) [[2] Import Phone Number](https://docs.retellai.com/api-references/import-phone-number) [[3] Update Phone Number](https://docs.retellai.com/api-references/update-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.