Blocking whole area codes of numbers except one or two

tanutanu

Well-known member
View attachment 1626I cleared my system log and then ran a test and here's what's in my system log. Ignore the auto speakerphone and trees because I have an auto speakerphone macro that starts with any call. So this macro answers and then hangs up so the auto speaker phone went into effect but it doesn't have anything to do with it. So I called from another 916 phone and it should have went through but instead of got blocked. Now the + 1831 is an American area code. But it's not testing the validity of the area codes and where they're from is just seeing if that is in the number. And I didn't call from an 831 number anyway. The fact that the two area codes are in that rule makes it seem like it's checking both of the area codes to see if either one is in the calling number. The 916 is in the calling number but the 831 isn't So it's running the macro to block the call. I want the macro to look at each area code I have listed and if either one of them match the incoming call then it should bypass the action and let the call come through.
I noticed you use regexp in the trigger. Unfortunately, it doesn't support. So you need to check it in Actions field like this.
 

Attachments

  • IMG_20211121_074643.jpg
    IMG_20211121_074643.jpg
    148.1 KB · Views: 18
  • IMG_20211121_074154.jpg
    IMG_20211121_074154.jpg
    95.8 KB · Views: 18
  • IMG_20211121_074528.jpg
    IMG_20211121_074528.jpg
    129.6 KB · Views: 18

Wjbell

Member
I noticed you use regexp in the trigger. Unfortunately, it doesn't support. So you need to check it in Actions field like this.
Screenshot_20211120-145942.png
When I set a variable and write out what you showed as the variable name then it brings me to a screen that I have to select true-false or some other options and then it places it after a colon at the end of the variable as you see my screenshot. How can I make it look like yours with nothing after the [call_number]?
 

tanutanu

Well-known member
It's boolean variable, completely different than what I showed.

You tend to get a little wrong idea. You need to change your perspective when you have such issues. There is no words to support regexp in the dialog. You would better be carefully and check again and again when you have a problem.
 

Wjbell

Member
It's boolean variable, completely different than what I showed.

You tend to get a little wrong idea. You need to change your perspective when you have such issues. There is no words to support regexp in the dialog. You would better be carefully and check again and again when you have a problem.
So which variable type do I choose to match your variable?
 

tanutanu

Well-known member
I'm very tired because you are excited and wrote like machine gun. Don't complain to me If you are frustrated.
I'm totally correct and always try to help you though. It's none of my business. I don't want to talk to you anymore.

How do you check boolean or integer variable in regexp?
If you are familiar with coding in Perl and/or regexp as you prouded, It's easy to do everything by yourself. Almost all people who study regexp just few days, they know "|" means "or" and {} means quantifiers. Don't stretch yourself. It makes no gain.

Good Luck:)
 

Wjbell

Member
I'm very tired because you are excited and wrote like machine gun. Don't complain to me If you are frustrated.
I'm totally correct and always try to help you though. It's none of my business. I don't want to talk to you anymore.

How do you check boolean or integer variable in regexp?
If you are familiar with coding in Perl and/or regexp as you prouded, It's easy to do everything by yourself. Almost all people who study regexp just few days, they know "|" means "or" and {} means quantifiers. Don't stretch yourself. It makes no gain.

Good Luck:)
I don't see how I was complaining to you. Yes it's frustrating but I wasn't taking it out on you and anyway I'm sorry. But I got it working. Thanks very much for your help. Now I just have to figure out how to set the same situations call calling from private numbers.
 

andrew21

New member
To block all area codes except one or two:
  1. Open your phone settings.
  2. Find "Call Blocking" or "Blocked Numbers."
  3. Add the area codes you want to allow to the "Allowed" or "Whitelist" section.
  4. Block all other area codes in the "Blocked" or "Blacklist" section.
This way only calls from the allowed area codes will get through, and all others will be blocked.
 
Last edited by a moderator:
Top