Menu

blacklist all numbers without min 10 digits? (in USA)

AJ Weber
2016-07-25
2016-07-26
  • AJ Weber

    AJ Weber - 2016-07-25

    Am located in the USA. All my valid (and some invalid) numbers come in with 10 digits. Occassionally I'll get a scam call with 4-6 digits (not name, but the reported number). Is there a setting to auto-blacklist (hangup) on any number that is not minimum 10 digits? Might be useful.

    Thanks,
    AJ

     
  • John L. Chmielewski

    You can do it if you enable the regex option in ncidd.conf. It uses POSIX Regular Expressions.

    You should review the metacharacter set but I would try an entry like this in the blacklist file with regex enabled:

    ^[:digit:]{4,6}$
    

    The above says to match 4 to 6 digits. You can adjust it to match any range you want.

    When you use an expression you must edit the ncidd.blacklist file. Clients do not support expressions when making an entry in the blacklist file.

     
  • AJ Weber

    AJ Weber - 2016-07-26

    Are there any negatives to enabling reg exp's? Is it slower or substantially more resource intensive (I'm running on a RPi)?

    Thanks,
    AJ

     
  • John L. Chmielewski

    There is no negative except you need to understand regular expressions in order to fully utlize them. I believe the user manual gives a link to a regex tutorial.

    You are already running languages like Perl, Python, and Bash on the RPi without any noticable effects. There are a lot of commands written in those languages.

     

Log in to post a comment.