Blacklist incoming CID range

Is there a way to blacklist an entire NPANXX? I’m getting robocalls from basically an entire prefix, ie 510-555-XXXX. I saw a few different instructions to create an inbound route, with callerIDNumber of - well a few different ways, check CID Priority, and destination terminate, but nothing works. Thanks :slight_smile: FreePBX


Apparently if you create a different inbound route (with a different destination) to do that you must precede the pattern with a “_”… I have never done it however so I can’t say…

For one area code it sounds to me like the preferable solution if you can get it working…

The other two ways I could see to do that would be

  • Custom code
  • Bulk loading/importing into the blacklist (using a .CSV)… I don’t think that would be such a great idea since you would have to find a way to generate those 10000 numbers and apparently that database is ill suited to have too many entries…

Good luck and have a nice day!



Thanks for the reply… I think I tried
and without the period for the Caller ID Number. And CID Priority, and destination terminate call… :frowning:

Assuming the calls are not coming in as 1510…
_510555XXXX(no period)
should work.

Did you look at your logs?

The Caller ID - per the CDR reports:
I think I tried with the 1 too, let me try again…

Then if you are not stripping the + in the trunk your inbound route should be

1 Like

Oh Genuis! Thank you! Yes, I don’t strip the +1… so just ‘assumed’ when people said “use _510” that would work :slight_smile: So I just tried calling from my work, different area code and prefix, but it works! So do I need both +1510555. and +1510555XXXX or are they both the ‘same’?

Thanks again!

Use one or the other. Not both.

Are they the ‘same’ or is there a reason to use one vs the other?

They are not the same but in your case it should not make a difference.

+1510555XXXX will match only 11 digit numbers
+1510555. will match any number that starts with that sequence