Block numbers by group with * mask

Good day!

Please add in “Blocking numbers” new function on 5.0.0.55 for block group of numbers by * at end. Not 1 by 1, as now.

For example: +3967* - block all numbers with the +3967 at the beginning.

As done for now - only full number for block is useless against spam calls.

7 Likes

That feature i’m also waiting.

As i knew just for now, we can simply type in Settings app field this sentence - ^+3956 and press Enter. No need to edit system files! (Sure copy this sentence from Notes, we can’t type ^ there).

Cool! But please, make this process more easy for user. * in end is more obvious and better.

5 Likes

As this already seems to support RegEx’es, which are much mightier than the usual, trivial “wildcard” characters “*” and “?”, I strongly oppose your suggestion, because this would be a huge step back.

But I fully concur that one should be able to enter all supported pattern matching strings, and it should be denoted which rules these pattern matching strings do follow (e.g. RegEx’es).

BTW, if the content of this field is always interpreted as a RegEx (regular expression), you should be able to use “.*” (i.e. any character arbitrarily often repeated) to achieve what the trivial wildcard character “*” does. I.e., reusing your example: +3967.*

P.S.: More details on this topic:

4 Likes

For the specific case (phone numbers) the only real need i could ever see i prefix-matching being needed. Do you see any other use-cases at all? While i do think people should care about the technology they use, i don’t see demanding people learn regex as reasonable.

Regex as a backend however is good, since it is well-defined and extensible, should any other use-cases pop up (though i doubt it).

Then there is the case of input - the phone keyboard already has *. Though this being the only reasonable use-case, there could even be a dedicated tick-box for it.

3 Likes

A community-driven blocklist on a open platform could be nice too to get scammers off of everyone’s devices.

…Tho with how often folks with prepaid phones rotate numbers (like myself) this could have a lot of false positives over time without expiration dates.

Thank you @olf and @attah , you summarised my thoughts about the development of this feature. When I implemented it, I wanted to have the most simple code possible (see the links @olf provided). I thought about using regexp as the filtering backend, but then I thought that my use case involved only exact matching and prefix matching. So that’s what I implemented.

If someone has the necessity to use a regexp matching, then, it’s quite straight forward to implement and to keep it backward compatible with existing dconf entries, one can use a prefix like regexp:^\+3956.*$. The idea of having a library exposed by the plugin is also to hide this backend complexity and use intentional calls like filter.ignoreNumbersStartingWith().

About having the full capabilities exposed to the users via an UI. That would be nice, but I didn’t find something easy to use. But since it’s in dconf entries and the plugin is exposing a library to change them, one can create an advance QML app to do it.

3 Likes

We, simple Sailfish OS users, waiting for clear and described menu in Settings, where we can easy ignore/reject/whitelist calls. As done on all 2 most widespread OS’es in the world.

Without copying symbols from Notes to insert block number field, without modifying system/user files from Terminal and so on.

If You will do it with simple * and ? at end of number - good. If with ^ at beginning - also good. If in some else, Your own way (as Sailfish always do, and we admire it for this) - good too. But please, easy and obvious for usual users, not programmers. We want more people for use Sailfish OS too. And You want it, we hope.

4 Likes

A quick fix for the entry of more characters would be to remove

302                     inputMethodHints: Qt.ImhDialableCharactersOnly

from

/usr/share/jolla-settings/pages/jolla-voicecall/voicecall.qml

That should make the regular keyboard appear (giving the possibility to add characters which will break the whole thing, but hey, so does the copy paste method).

5 Likes

Oh, then you are seeing too little: I know a couple of phone numbers, where something in the middle of the number indicates a different call route. I.e. there is a common country prefix, a couple of digits which depend on the call route (and are not of equal length) and a postfix which identifies the SIM card in the calling device. Consequently it would be convenient to have, e.g. a single white-list entry for such a caller.

Though this is surely not a common case, such use-cases exist.
Still, this could also be achieved with the usual “shell-style” wildcards “*” and “?” (or even “*” alone, for a loss in matching precision), if +3957*1234 is allowed.


Now I am confused and have to take the time to look at the code some time:

  • Why is @windes only able to obtain a working prefix matching when entering “^+3957” (as advised by @ric9k), if this is not using a RegEx currently?
  • No, I did not intend to state, “This should be implemented via RegEx”. I merely stated, “If this already accepts RegExes, please do not drop this feature”. Thinking about it (see first paragraph of this message), “shell-style” wildcards ("*" & “?”) are sufficient.
  • I absolutely do not believe that one must be able to input RegExes (if supported) via GUI: A dconf write /sailfish/voicecall/filter/<filter-list> ["’RegEx1’, ‘RegEx2’, ‘RegEx3’"] is fully sufficient, when properly documented.
    Though I would be glad, if one can enter RegExes at the GUI when they are supported.
  • But as @windes correctly pointed out, one must be able to input all characters needed for simple matching and the explanation of this dialogue must clearly state which input is expected rsp. possible here.
    Currently I perceive exactly this as the main culprit for simple users to utilise this feature, not its functionality.
1 Like

Hi,
I tried to check the given directory/file ( /usr/share/jolla-settings/pages/jolla-voicecall/voicecall.qml) from your comment, but could not find on my C2 (v.5.0.0.43). Could you give me some hints or links about locations of setup files (in general) and Gconf variable names of SFOS. I could not find a decent info about it.

You are either looking using a sailjailed app, or 5.0.0.43 doesn’t have that file yet.

1 Like