From VoIP.ms Wiki
One of our features is a CallerID Filter which can be used to block unwanted calls from telemarketers, debt buyers, fraudsters and other unwanted callers. The CallerID Filtering allows the user to supply a list of numbers; any number which matches an entry on the list may be blocked, redirected or handled in various ways.
In a similar fashion, the "CallerID Filtering" feature can be used to create a Whitelist of numbers, or areas that we want to allow or redirect, while blocking the rest.
Preparing the DID number(s)
First, we prepare our DID number(s) to reject any call. To do this you need to access the Manage DID(s) option from the DID Numbers menu tab.
In Manage DID(s), you will see a list of your DID numbers, their routing, server and other options. Edit a single DID number by clicking on the little Paper and pencil icon.
Once in the page to edit the number, the first and Main section you will see, is the DID Routing section, which may or may not have all the options available, this simply depends on which features you have already enabled from your portal.
This is basically the route the call will take when someone calls to the DID. Whatever you select here, is the route the call will follow and will apply for all the calls.
In order to select an option you need to click on the radio button and then select the desired choice from the drop-down list (in case you have more than one option for that routing).
For the purpose of rejecting all the calls, select the option System, then Hangup or Busy.
Then scroll down, and apply the changes.
Adding phone numbers to the Whitelist
Having the base that will deflect the calls from undesired numbers, you build the list of numbers that you want to allow, creating one filter per number.
Head to your Customer Portal and click on the DID Numbers >> CallerID Filtering menu option.
Click on Create a new CallerID Filtering Rule to work on the first filter.
Step 1. Select the type of filter criteria we want to use, for this particular case, select Specific CallerID Number / Specify: and type the number you want to allow in the field.
Step 2. Select the DID number you want to apply the filter to.
Note: is possible to apply this filter for ALL your DID numbers, but is not recommend for this purpose unless you are certain you want to apply a Whitelist scheme for all your numbers now and in the future.
Step 3. In the routing option, select the type of route that leads to your phone, it can be a SIP/IAX2 account (the one you configured your phone with), or a Call forward (in case you want to receive the calls in a external line).
Step 4. This step is only a note you can use to identify your own filters, like "Allow 5554443333".
Step 5. Save the filter.
Repeat the process for each number you want to add to your list.
Allowing blocks/areas of numbers
It is also possible to allow blocks or complete areas, making use of the wildcards * and X in the caller ID filter.
X - Matches any digit at the specific location in the number. * - Matches any number of digits and any digit.
For this, create a new caller ID. In Step 1, select the the filter criteria Specific CallerID Number / Specify:, type the area and define the rest of the digits with X. For example: 555xxxxxxx (7 X's).
You can also use the wildcard * after the area. Example: 555*
This filter will allow ANY number that starts with 555.
Manage your filters
You can edit (little Paper and pencil icon) or delete (red X icon) any filter at any time, from the customer portal on DID Numbers >> CallerID Filtering menu option.
Another useful tool in the Caller ID filtering feature, is the Search bar. You can use it to search through your filters based on what you type in the Search field. The system will search based on what you have in the CallerID, DID and Note columns.
Using the last image as example, if I type "Start with", the system will show only the filters that have the words "Start with" in the Note column. This is why we recommend leaving easy to remember notes when you create filters.