Simple-Dialer icon indicating copy to clipboard operation
Simple-Dialer copied to clipboard

Block phone number by region or regex

Open rzafiamy opened this issue 4 years ago • 1 comments

Is it possible to extends the "blocked number feature" in dialer app with regex capabilities ? Most people like me claim to be a victim of a "ping call" (receive a lot of unwanted calls from a bot number, the caller number changes every times but the country code is still the same ) .. It would be nice to have a feature in which we can block number using a regex (e.g: +322.* ).

rzafiamy avatar Aug 03 '20 14:08 rzafiamy

I too would love to see this feature implemented! There is in fact another FOSS app that already does this job nicely: NoPhoneSpam It is also available on f-droid: https://f-droid.org/de/packages/at.bitfire.nophonespam/ And hosted on gitlab: https://gitlab.com/bitfireAT/NoPhoneSpam

It offers both a blacklist and a whitelist approach which I find very handy: NoPhoneSpam-android-app_screenshot_medium

@tibbi Maybe you can take a look at it and adopt some of its functionality and code.

mareking avatar Sep 04 '20 11:09 mareking

If anyone is willing to test and provide feedback, I have uploaded a debug APK here

or if you'd rather build an APK yourself, do it from this branch

Rules (can change with feedback): '*' works as the wildcard character. *1919 blocks all numbers like xxxxxx1919 and +1242* blocks all numbers like +1242xxxxxxx

naveensingh avatar Sep 10 '22 18:09 naveensingh

Thanks it is working ! I have just tested it. I noticed just that only a limited pattern can be used : use of *. Full regex is not supported (e.g.: ^ , $ , [0-9]+,...)

I saw also that the blocked number does not appear in the history of call but if I remove it from the blocked number then it appears in again. For me , it could be interresting to see it in the call history even blocked.

rzafiamy avatar Sep 11 '22 06:09 rzafiamy

the initial implementation will be with asterisks yet, dont expect any advanced regexes yet.

tibbi avatar Sep 11 '22 08:09 tibbi