aj3423/SpamBlocker

How does the "Priority" work

Closed this issue · 0 comments

Each filter has its priority value, as the term implies, it dictates the order in which the call is checked.

By default,

  • Whitelist rules have priority 10.
    E.g.: Contacts/STIR (Inclusive), RepeatedCall, Dialed, RecentApps, OffTime
  • Blacklist rules have priority 0.
    E.g.: Contacts/STIR (Exclusive), Database

So, when they are both enabled, the whitelist rules will override the blacklist rules because 10 > 0.

For the regex rules, the priroty can be any number between -2147483648 and 2147483647, different rules can have the same priority as long as they are the same type. However, never assign the same priority to both whitelist and blacklist rules, it can cause random behavior.

One exception is the feature "In Meeting", it has the highest priority 20 by default, because it's supposed to block any calls during a meeting.

Here are some use cases of customizing the priority, if you want to:

  • always block a particular number regardless of how many times it repeats, or within OffTime, etc, set a rule with priority > 10.
  • always allow a number, set it to > 20 to override the "In Meeting".
  • test a particular regex, just set it to 999, so it will override all other rules and you don't have to temporarily disalbe them one by one.