https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do I block numbers
# ❓・ai-evy-support
u
@AI Evy how do I block numbers
a
Thanks for tagging me @umijah. I'll look through relevant sources and get back to you shortly.
### Answer There are several approaches to block specific numbers in Retell AI, depending on your setup: ## Using Inbound Call Webhook You can use an inbound webhook to check if a number is blocked and return a blocked status [(1) ]() . In your webhook, check if the number is blocked and return
{ status: "BLOCKED" }
. Then include in your agent prompt "if status is blocked hang up immediately" . Alternatively, you can create an inbound call webhook and transfer blocked numbers to an agent that just hangs up [(2) ]() . You can also override the agent ID and route to an agent that just hangs up the call . ## Using Custom Telephony Providers If you use a number from a third-party provider like Twilio, Telnyx, or other telephony providers connected via SIP, you can implement blocking at the provider level [(2) ]() [(3) ]() . With Twilio specifically, you can use Twilio Studio to implement filter logic before forwarding calls to your Retell agent [(4) ]() . For Twilio users, there's also a built-in spam filtering option available [(3) ]() . ## Alternative Solutions You can also use automation platforms like Make.com with filters to block specific numbers [(4) ]() . Some users have implemented dynamic variables like
{{isblocked}}
in combination with inbound webhooks to trigger the agent's
end_call
function . The most flexible approach is using a cu
stom telephony provider where you have full control over call routing before it reaches your Retell AI agent [(2) ]() [(4) ]() .
​ To learn more, see the sources I considered: [[1] Is there a way to block numbers from calling in when using the webhook?](https://discord.com/channels/1186424376300679209/1337474539390767265) [[2] How to Block Specific Numbers from Bot Handling Calls?](https://discord.com/channels/1186424376300679209/1374545839191752786) [[3] Can I block a phone number?](https://discord.com/channels/1186424376300679209/1274871116803870811) [[4] Discord message from @leon_haas_1 on 2024-09-24](https://discord.com/channels/1186424376300679209/1186462578310910112/1288054906288083057) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.