Skip to contentSkip to navigationSkip to topbar

Reject Calls with Blocklist

Created by: Twilio
  • Voice
  • JavaScript
  • Quick Deploy

How it works:

  • User enters a comma-separated list of phone numbers that they wish to reject
  • User calls their Twilio phone number from a phone number in the blocklist. The user should receive a message and the call will not go through.
  • User calls their Twilio phone number from a phone number not in the blocklist and not their own phone number. The call should go through.
Report this template(link takes you to an external page)
Quick Deploy to TwilioGet CodeUse Twilio CLI
Launch and test this app in a few minutes with Quick Deploy. No server needed. Quick Deploy will automatically configure and deploy this app using Twilio Functions. Learn more about Twilio Functions(link takes you to an external page)
  1. Log in to Twilio

    Access your Twilio account to get started.

    Checking for existing account...

  2. Get a Twilio phone number

    Your app requires a Twilio phone number to operate, this is your application's source number to receive messages or calls.

    You will get a US number that is configured for this application. You can change this or port over an existing number later. International number regulations(link takes you to an external page)
  3. Blocklist

    Only phone numbers in this comma-separated list will be allowed to join the conference. All phone numbers must follow the E.164 format

  4. Click the button below to deploy your app

    This will use the details entered above to deploy your application to Twilio Functions.

    You will be able to view the application in the browser and edit it using the Functions UI.

Need some help?

We all do sometimes; code is hard. Get help now from our support team(link takes you to an external page), or lean on the wisdom of the crowd by browsing the Twilio tag(link takes you to an external page)on Stack Overflow.

Terms of servicePrivacy Policy

Copyright © 2025 Twilio Inc.