Blocking Incoming Calls by Phone Number Using Asterisk
One of the common questions asked is, "Can my VX block a call from a known phone number?" With a VX alone, the answer is no. This would need to be done by the provider. But if you have an Asterisk PBX, this can easily be done using the Black List module in the Asterisk UI.
The Blacklist module in Asterisk FreePBX allows you to have a list of numbers to be blocked. If a caller calls from one of those phone numbers, they will be sent to a destination you choose. If you do not choose a destination, they will hear the message "The number you have dialed is not in service. Please check the number and try again."
Navigate to the Blacklist Module
- In the navigation bar on the top of the FreePBX UI, click ADMIN
- In the drop down list, choose BLACKLIST
Blacklist a number
- In the BLACKLIST MODULE window, click +BLACKLIST NUMBER
- A window will appear where you can enter a number and a description
- Enter the 10-digit number you wish to block in the NUMBER / CALLER ID field.
- Enter a name for this number in the DESCRIPTION field, such as "Swears on the air."
- Click SAVE CHANGES
- Click CLOSE
Removing a Number from the Blacklist
- In the Blacklist tab, check the checkboxes for the entries you wish to delete.
- Click the Delete Selected button to delete the selected entries. Click OK to confirm the deletion.
Blocking All Unknown Caller ID Calls
You can also optionally decide to block all calls that come to your system with a blocked Caller ID. To do this:
- Click on the Settings tab within the Blacklist module.
- Click the Yes button next to “Block Unknown/Blocked Caller ID.”
- Choose a destination. If you do not choose a destination, callers will hear the "not in service" message.
How to Use Feature Codes to Block Numbers
You can also blacklist any number using feature codes on-the-fly If you log into the Feature Codes module (Admin → Feature Codes), you will see the actual feature codes defined for Blacklist.
The default settings are shown below:
- Dialing *30 will prompt you to enter the phone number to blacklist.
- Dialing *32 will blacklist the last number that dialed your phone based on the Caller ID of the number that called you.
- Dialing *31 will prompt you to enter a phone number to be removed from the blacklist.
More can be found on the wiki page for FreePBX here
Let us know how we can help
If you have further questions on this topic or have ideas about how we can improve this document, please contact us.