Announcement

Collapse
No announcement yet.

Need help with regular expressions to block telemarketer using a group of phone nmbrs

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need help with regular expressions to block telemarketer using a group of phone nmbrs

    I get annoying telemarketers calling everyday and they apparently have purchased a whole block of numbers. Blocking them individually is not working as they continually call with a new one. The area code and prefix are always the same, though.

    In the settings, there is an option to block phone numbers using regular expressions called " Use Number Block Mask" If the area code and prefix is 123-456-xxxx what do I put in there to block those numbers. Do I use the dashes? Also, what if I later have to add other blocked numbers, how would I do that?

    EDIT: Looks like in the CID, the format is (123) 456-xxxx

    #2
    My caller Id Number Block Mask regular expression looks like this:

    ^8(00|88|77|66)

    It blocks any incoming call that starts with 800, 888, 877 or 866. If you wanted to block callers from 123-456-0000 though 123-456-9999, then modify it as follows:

    ^(?:8(00|88|77|66)|123456\d{4})

    If you only want to block incoming calls from specific area code and exchange, then use:

    ^(?:123456|456789)\d{4}

    *Note: The above regex blocks calls from 123-456-0000 though 123-456-9999 and 456-789-0000 through 456-789-9999

    Put the regular expressions into https://regex101.com/ if you want to test them (and get an explanation on what they are doing).

    I hope this helps.

    Regards,
    Ultrajones
    Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

    Comment


      #3
      so if I just want to block numbers 123-456-xxxx but not 800 877 or 866 I'd use:

      ^123456\d{4}

      Is that correct?

      Comment


        #4
        Correct. The regex will match if the number starts with 123456 followed by any 4 numbers.

        Regards,
        Ultrajones
        Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

        Comment


          #5
          Awesome. Thanks for the quick replies

          Comment


            #6
            So they called back this morning and as usual they had a different number but same area code and prefix.

            The plugin dropped the call as planned, so I know the regex worked correctly.

            However, the trigger for first time caller was triggered and therefore my announcement went off. Is this expected behavior? Is there a workaround?

            EDIT: when I look at the new number under "caller details" the attribute for blocked is already checked.

            Comment


              #7
              That's why blocking those numbers will never stop them from calling. They will call you again using another numbers. It's better if you could track down what company is calling you and sue them because of their multiple calls, like what I read at http://www.whycall.me/news/my-4500-p...-telemarketer/. Fight them back using legal approach is the best way to stop them.

              Comment


                #8
                Haven't heard back yet from UltraJones on this. I patched up the problem using Easy trigger plugin to match the string value of the offending callers and not announce. Seems to me this is not the expected behavior of the plugin, but I could be wrong.

                Comment


                  #9
                  Originally posted by prsmith777 View Post
                  Haven't heard back yet from UltraJones on this. I patched up the problem using Easy trigger plugin to match the string value of the offending callers and not announce. Seems to me this is not the expected behavior of the plugin, but I could be wrong.
                  Hi,

                  If you have New Caller Options > Add Announce Attribute set to Yes, then a new caller that's block would be announced.
                  Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                  Comment


                    #10
                    I do like to announce other first time callers, but not those from that area code and prefix that I am blocking with the regex. Will this still work, or will all first time callers not announce?

                    Comment


                      #11
                      Sorry for drudging up an old thread, but I have a new annoying telemarketer that calls with a truncated CID area code that only contains two digits: (71). I would like to add a regular expression to eliminate these calls but I don't want to change the expression I already have developed for other callers which reads like this: ^719396\d{4}

                      Can I just add \(71\) to the end of the expression with a comma like this: ^719396\d{4}, \(71\)

                      Comment


                        #12
                        No, you would enter it as follows: ^(?:719396\d{4}|71)$

                        Note: Enter this regex into regex101.com if you want to see what the characters mean.
                        Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                        Comment


                          #13
                          Thanks I am still trying to figure regex out.

                          Have a question: for regex matching, do the phone number come across with the parentheses around the area code or do they just come across as 10 digit numbers (or 9 digit in my case) without the parentheses? Seems an important distinction when trying to match

                          Comment


                            #14
                            Only the digits without the parentheses.
                            Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                            Comment


                              #15
                              okay so that's why it's not working. I need to match for a number that has exactly 9 digits. I think this would work: \b\d{9}\b

                              Comment

                              Working...
                              X