Block all calls of number, which are not listed

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Uli
Posts: 14
Joined: 30 Mar 2019 21:10

Block all calls of number, which are not listed

Post by Uli » 13 Apr 2019 21:33

With "incoming call" and the liste number there, I am æble to let the phone ring. So far so good ...

But what can I do that all other (not listed number) calls are immediatley blocked/rejected ... no ringning, no vibration no silent call. I think I should use a condition which devides in 2 action for listed and non listed number. But how can I do it?

I would be very happy for some help.

Best regards
Uli

ariloc
Posts: 99
Joined: 05 Jun 2016 21:36

Re: Block all calls of number, which are not listed

Post by ariloc » 16 Apr 2019 01:04

When you use trigger Incoming Call, there are several variables created with multiple information about the caller. You can use that trigger to do so on every incoming call, and then use condition Expression to check if incoming_number (variable which contains the number of the caller) is contained or not in your number list. So your code in the condition can be something like this:

Code: Select all

numbers = newList("Number 1", "Number 2", "Number 3");
containsElement(numbers, incoming_number);
Consider you can have more than 3 numbers by following the same structure in the code.
That will return true if it's on the list, and false if it isn't. So then you go false from that, to action like End Call, and there's no need to connect if true as, if I understood correctly, you want those calls to pass through, and so by not connecting it, Automagic does nothing in that case.

Post Reply