How Can I Stop Receiving or Block Incoming Phone Calls?

Twilio gives users a number of methods for blocking incoming calls. While all Twilio phone numbers go through a testing process before they're made available for purchase, some unwanted calls may continue to reach your Twilio line. Here are some tips to help prevent these calls from becoming a problem:

Block All Incoming Calls

If you do not want to receive any phone calls on your Twilio phone number, you can configure your number with a blank Voice Webhook URL. With an empty webhook, this phone number is considered 'out of service' for inbound calls. You will not be charged for any incoming calls in this state, nor will these calls be received and logged in your project.

Steps for submitting a blank Voice Webhook URL on your on your Twilio number can be found here: Configuring Phone Numbers to Receive Voice Calls - Webhook.

Reject and Track All Incoming Calls

You can achieve similar results by responding to incoming calls with the <Reject> TwiML verb. The only difference between this method, and using a blank webhook, is that using <Reject> logs these incoming calls in your Twilio project logs; calls will continue to be blocked at no charge to you.

The easiest way to do this is with a TwiML Bin. Here are the instructions:

  1. Login to your project at www.twilio.com/console.
  2. Click Runtime from the left-side navigation bar.
    NOTE: If Runtime is not visible, you may first need to click All Products & Services.
  3. Click TwiML Bins, and then select Create New TwiML Bin, or the red plus + sign button.
  4. Add a Friendly Name and some TwiML, and then click Create.
    • Friendly Name: This is up to you - we recommend using something that gives an idea of what the TwiML Bin will do like “Reject Calls”.
    • TwiML: For the code, you will use the <Reject> verb. Your code should look something like this:
      <Response>
          <Reject />
      </Response>
  5. Configure this TwiML Bin on your Twilio number by following the steps here: Configuring Phone Numbers to Receive Voice Calls - TwiML Bin.

Reject Calls from Specific Phone Numbers

You can create a "virtual blacklist" to reject incoming phone calls from specific phone numbers. This blacklist lets you automatically respond to certain number with the <Reject> TwiML verb, and then forward other callers as normal.

For help setting up a phone number blacklist, please see Reject Incoming Calls with a Phone Number Blacklist.

Reject Calls from Specific Countries

You can create a "virtual blacklist" to reject incoming phone calls from specific countries as well. This type of blacklist would automatically respond to calls from countries on the list with the <Reject> TwiML verb, and then forward other callers as normal.

For help setting up a country blacklist, please see Reject Incoming Calls with a Country Blacklist.

Twilio Marketplace Add-ons (Beta)

We have also begun offering pre-integrated partner technologies to help block calls. We offer a number of add-ons to help diagnose both suspected spam and robocalls. More details can be found on our Marketplace Add-ons site.

Have more questions? Submit a request
Powered by Zendesk