Install phonehook on Sony Xperia XA2 running SFOS 5.0

I’ve tried installing phonehook on Sony Xperia XA2 running SFOS 5.0 but a pop-up says it cannot be installed. I’ve tried the latest versions all of which could not be installed:

phonehook-0.10.1-1.armv7hl.rpm
phonehook-0.10.0master.20241024195643.4ad26cd-1.aarch64.rpm
phonehook-0.10.0-1.aarch64.rpm

I need phonehook to block a range of numbers typically used by call centres.
I’ve tried instead several Android apps, none of which have worked. Phonehook was working on SFOS 3.4.012 and when I upgraded to 5.0 I was asked to uninstall it before installing SFOS 5.0. Now it cannot be reinstalled.

Any suggestions on how to make it work? Are there any alternative call blocking apps that function on Sailfish? I am aware you can block numbers in sailfish 5.0 but I more interested in a full featured call blocking app.

Of course not!

Define full-featured.
What’s wrong with the built-in functionality?

By full features I mean black lists, white lists, range of numbers.

The actual implementation under the hood supports patterns prefixes - so putting them in with the CLI should get you ranges. Hopefully the phone app is open sourced soon so we can fix that piece of UI.

What is the purpose of black and white lists at the same time? O.o

1 Like

Same as in a firewall, where you can block all and then allow specific connections.

Block a whole country and only allow the one contact, you know from there?
Block all and only allow your known numbers for a on call duty phone?

Maybe even use a schedule to block all and only allow your family group in your sleeping time?

How do you use CLI to block a range of numbers. Can you please explain step by step and in layman’s terms? I am not a tech savvy.

It appears the input in the settings app is unsanitized/unguarded, so you can write it there as well. However, you will have to copy in the character ^ to signify prefix match.

I.e. ^+12345678 would block +12345678000 to +12345678999.

At least i can’t see a need for more granular ranges than what this affords us.

@slalomsk8er
I guess my operator is too good at doing it for me. Blocking a whole country hasn’t crossed my mind.

However, interaction with do-not-disturb is another matter. If friends/family call me when i’m sleeping without reason, that’s a social problem and not a technical one.

The settings input(s) maps to the dconf key /sailfish/voicecall/filter/rejected-numbers, but there are also /sailfish/voicecall/filter/ignored-numbers and sailfish/voicecall/filter/whitelist.

Exactly, why one would whitelist and have a discussion with them, if they abuse the privilege.

1 Like

Sorry it took me a while to find it. On Sailfish go to Settings - Phone - Blocked Numbers - Add number. Type the symbols ^+(start range to block). I’ll try it once I get bombarded again with incessant calls from promoters and advertisers using call centres. I wouldn’t need any call blocking apps if this works. Sailfish just keeps getting better. Thank you.

Can anyone explain what the *P key is used for in settings - blocked numbers -add number? The key appears on the keypad once you click on “add number”.

1 Like

It is just a feature of the “phone” keyboard, it has little or no use for the specific application.
It is something with pausing, waiting for dial tone and whatnot. E.g. if you want to program an inside extension number in some oldschool switchboard or dial your way through a phone tree by default.

Nitpick, but potentially important: it should be “prefix to block” - “start of range” is something different.

Also you putting the + outside the parenthesis suggests a possible misunderstanding. The number to block contains the plus - it is not some control character like the ^.

Yes, I should have mentioned the exclusion of the parenthesis. Thank you for making the explanation. Just to make things clear, sometimes you receive calls with the country code e.g. +34 for Spain e.g. +346319… for Spain and other times a mobile number 6319… without the country code. In both cases you would need to include the ^+34 in the block field?

As far as i can tell, numbers for incoming calls never appear in their local form in the incoming call screen, call log etc. Sure, you can dial or have contacts in local format, but that is really besides the point.

I am referring to local calls as I am located in Spain. My local call history appears without the country code.

Screenshot or didn’t happen. Remember we are talking about unknown numbers and incoming calls.

I hid some names that are saved on my phone. As you can see all numbers are without the country code.

Very strange. And they are not nameless saved contacts?

I guess you’ll just have to try - but i do think this system handles normalized “international” numbers only as of now. And i can confirm the input doesn’t do any normalization when saving in the backend.

Edit: after staring at the matching function a bit - it looks like both might work. I still recommend using full numbers though.

Who would save a contact without a name? Surely they’ll forget who is calling them. The numbers saved are the ones scribbled out. All numbers in the screenshot are local numbers. I’ll try blocking a number without the country code exactly as it appears displayed on my phone and see what happens. I’ll also test what happens if the same number is blocked by including the country code.

I confirm, both blocking methods work; with or without the country code. I included at least 5 digits of the caller’s number apart from the country code and closed the settings folder.

1 Like