Spam blocker for phosh, to automatically hang up calls from unknown callers

The author is none other than @kop316 :slight_smile:

11 Likes

Although I cannot find it explicitly in the documentation, I suppose that the ringtone from an unknown number is also suppressed simultaneous with the hang up? (Otherwise, what would the point be…)

One ring instead of 10, 11, 12…? :wink:

2 Likes

@Zimmy, it is more or less suppressed yes. The program hooks into the dbus of GNOME calls to listen for new calls and makes a bunch of decisions based on what it sees. If you are looking at it, it flashes on and off.

I can’t make it hang up any faster/fully suppress the notification without actually being a part of GNOME calls. I intended it to be easy to merge in GNOME calls, which is why it’s written how it is (C, GObject). I already talked to the call’s devs, and I am waiting to see their interest in merging this code into theirs.

I more or less scripted how I respond to calls from unknown numbers (i.e. did they call twice? is it from a prefix I recognize? is it a blocked number?), and I added a settings file to have folks tailor it how they want to.

If you have other thoughts, feel free to file issues/thoughts/MRs/etc.

EDIT: In my very scientific test of sticking my pinephone in my pocket and calling it, I did not feel anything. I did get a “missed call” notification.

6 Likes

:heart_eyes: :heart_eyes: :smiling_face_with_three_hearts:

Very nice

1 Like

I very much look forward to giving this a test drive - thank you very much, @kop316 ! :slight_smile: I’m hoping the required minimum version of 41.alpha for gnome-calls is available with no fuss under byzantium; per below, amber presently isn’t up to snuff. Still, the blocker is too good to wait… I’ll likely try installing the current 41.beta in short order.

$ sudo apt list -a gnome-calls
Listing… Done
gnome-calls/amber-phone 0.3.2-1pureos1~amber1 arm64 [upgradable from: 0.2.0-2pureos1~amber1]
gnome-calls/now 0.2.0-2pureos1~amber1 arm64 [installed,upgradable to: 0.3.2-1pureos1~amber1]

This is a good contribution to the community. Kudos to you for building this program.

But there is only one problem. It’s the same problem with all spam blockers and not just this one. And it’s an unresolved technology issue, not easy to fix. Spammers no longer use their own number on their outgoing caller-id. I get literally ten or more spam calls most days. Sometimes five of them can be from the same caller using different numbers each time to identify themselves. So blocking them does no good. It’s not their number that’s calling anyway and the next time they call you, they’ll be identifying themselves as someone new anyway. All you can do is block all calls that are not in your address book. But then if anyone else calls who you want to hear from, they get blocked too.

I would never buy anything from someone who disrespects me enough to lie about who they are as a means of getting around my call blocking program. But others must be doing just that. One day I got a text message from a strange number saying “Take me off your Fuc…g list”. Someone had used my number to spoof someone else. Without true authentication on every call, there’s no way to stop these tactics.

The FCC and Stir-Shaken was supposed to put a stop to all of this. But It still hasn’t changed anything.

2 Likes

Then either you gave them your number and can anticipate their call by whitelisting theirs (which this call blocker allows you to do) or they’ll leave a voicemail (right, @kop316?) in which case you call them back and whitelist their number if need be. It’s not such a problem.

You’re correct, the calls just go straight to voicemail.

It’d be implemented same strategy used by Truecaller that I’m using with success: community sharing! The first(s?) receiving spam call/text, marks it as spam so the rest of users using same app will be automatically protected.

One thing that’s common here in the U.S. is robocalls using phone numbers that start with the same area code and prefix as your own.

Example: If your number is (555) 111-1234, then you might get robocalls from (555) 111-1299, or from other numbers in the same series.

I guess telemarketers think you might answer if the calling number looks vaguely familiar, or similar to your own. (I wouldn’t! :rofl: )

So accommodating wild card entries in the app would be very useful: block (555) 123*, for instance.

1 Like

So I already do this? Heck, I even included the option to allow blocked numbers through if you want to.

I had the same thoughts as you. My university has a prefix, so if a number comes from my school 555-555-*, it will go through.

2 Likes

One thing I have always wanted but could never quite achieve on Android was basically to have different ringtones based on who is calling, but on a schedule.
In other words, I have my phone on vibrate 100% of the time. But, I want the phone to ring for my wife’s number only, so long as it isn’t during my normal work hours.

It sounds like what you did hear would support part of that (allow me to match against a phone number on incoming calls), and that is great. But I would really love some way to set up “ringtone profiles” or something like that to say what number can make what vibrate/ring, and when.

On another note, thank you for including this 555--* type matching, as I am way too familiar with getting spam calls from my area code.

I only have access to what is on the dbus. I added a suggestion for silencing it, and maybe that is something that coiuld be added too.

Honestly what I’ve always thought would be a good way to deal with this is have the phone answer the message like business saying “Please press 1 if you want to talk to the person you are calling” for messages not in the address book/not allowed in before. Then if they press one, then it actually rings you. Granted this type of setup is likely a lot of work and might mess with voicemail and whatnot.

I have heard from some friends that they recorded the “beep! Beep! BEEP! Your call could not be completed as dialed…etc” as their answering recording and it gets robocalls to stop dialing. I haven’t tried it myself

VOIP provider Callcentric has all those features that you can assign on a per-number basis or for all incoming or high-probability spam calls to your home phone, including the “disconnected” signal, “busy” signal, “press [random & changing digit] to be connected,” etc. And once a telemarketing call registers the “disconnected” message, your number is usually removed from their calling list.

You can also adjust the number of rings the caller has to endure before being sent to voicemail, which is very effective against telemarketers, who generally only let the phone ring 4 or 5 times before abandoning. Of course, you have to endure all the rings, if you’re at home, or silence them.

There may be some mobile providers that have some basic controls like that, but I’m not aware of them. Callcentric has a mobile app, but that doesn’t solve the cellular call problem.

My carrier doesn’t give me the option of turning off incomming voice mail. Also, people and robo-calls will always leave messages, no matter what my outgoing message says, telling them not to leave a voice mail for me. If I don’t have an outgoing voice message recorded, they still leave me voice messages. I hate ever taking time to listen to almost exclusively unwanted messages (some of them are long sales pitches), just to see if a friend or relative left a message later in the queue. It’s a big daily waste of time. So I refuse to ever check my voice mail, ever.

I use Google voice and set up two different outgoing messages in Google voice. GV allows you to have one outgoing voice mail message for people who are in your personal directory and one for everyone else who is not in your personal directory.

The people who are in my directory get an outgoing voice message from me that says “I can see that you are in my directory and you are someone who I know. You are an important person to me. I always carry my phone with me and I always answer my phone if at all possible for people who I know. If I missed you here this is a rare exception, please Text me or call me back later because I must have been unable to answer this time and I really want to hear from you. Please do not leave me any voice messages though because I never check my voice mail and I will never know that you called if you leave me a voice message. Thanks”.

Everyone else gets a different outgoing voice mail from me. It says “Hi, I can see that you are not in my directory. Please text me with who you are and why you want to reach me. If you are a friend, relative, a business associate, or my Doctors office, I apologize in advance. I really need to add you to my personal directory so that your calls can go right through to me every time without being blocked here. I use this system to screen out telemarketers, robo-callers, and others who I don’t want to hear from. If you are someone who I may want to hear from, please text me and I will call you back and add you to my personal directory so that you do not get accidentally blocked in the future. Please do not leave a voice mail though because I never check my voice mail and I would never get your voice mail message if you leave one. Thanks”.

This works well. If a long-lost friend, relative, or my Doctor sends me a text message with enough information for me to recognize them, I call them back. Telemarketers and robocallers never bother to text me and I never even know they tried to reach me. People in my directory go right through to me when they call, or I call them right back as soon as I can if I was unable to answer when they called. Everyone who doesn’t really listen to my outgoing voice message and who can’t follow my instructions there is an idiot and I don’t want to hear from them anyway.

Google Voice requires that your phone has its own phone number that Google voice can forward your calls to. No one who knows me has that number of the phone itself. Like I said, I can not turn off that voice mail system. My outgoing message there (to the carrier’s voice mail system) is downright hostile. It says “I don’t take calls from sales people nor from robocallers. Please remove this number from your list and don’t call back”.

What you propose is of dubious legality.

In Europe, my phone number is considered personal identifiable information, and hence you’re not allowed to share it with anyone except with my prior consent. This was so before the GDPR, and the GDPR only strengthened that right. When you sign up with TrueCaller, you automatically upload your contact list (numbers + names) to their servers. That’s how they can show me the name of one of your contacts I had no prior contact with when they call me. When you signed up with TrueCaller, you consented to uploading all of your contacts as non-negotiable part of the agreement. However, your contacts did not, so TrueCaller has no right to collect their data.

Perhaps simply uploading a phone number to a publicly available “spam caller” registry would be allowable, provided it’s not accompanied by a contact name. But you’d have to talk to a lawyer in order to make sure.

[EDIT] While slightly off-topic, since there are a lot of privacy-focused folks here, here’s where you can unlist your number from the TrueCaller database: https://www.truecaller.com/unlisting - mind you, this also means you can no longer use their app.

1 Like

I meant something similar, not exporting Truecaller for Linux

As an FYI, I have no interest in building and phone home or phone anywhere capabilities into that program. On top of the fact of that would be a decently large undertaking, I have no interest in handling any sort of data.

What I made does what I want it to, and if you have features that don’t involve talking to a database or talking online, I’m open to hearing about them.

2 Likes