How To Block Unwanted Callers On The N900
There is no call blocking application for the N900 yet, but that hasn’t stopped Vinu Thomas from coming up with a hack that lets you do just that. He clearly mentions that this is a stop gap arrangement until until steps up to create a real application with this functionality. What I’d like is an SMS blocking app as well, as SMS spam has really increased over the last one year or so.

Anyway, if you are being plagued by unwanted callers and have had enough, here’s how to get rid of them.
- The first thing you need is root access. So go ahead and download rootsh from the application manager or use this link.
- Next, if you haven’t installed a Python application in your phone, you’ll need to install maemo-python-device-env from extras-devel (here is how to enable extras-devel with one click).
- Now download this script. Inside the zip is a file callblock.py. Once you open it in notepad or whatever you like, it will look like the picture below.
- Now edit the ‘Blocklist’ in the script and put in the numbers you want to block. You can add as many number as you like, just make sure that you enclose the numbers within the quote and separate each with a comma. Also, do not have a trailing comma after the last number.
- Save and transfer this file (callblock.py) to the MyDocs folder on the N900.
- Open terminal on the device and enter the root mode by entering:
root
- Next start the call block hack by entering:
python /home/user/MyDocs/callblock.py &
That’s it. All your unwanted calls are now blocked. You will need to run this script everytime you restart your device as there is no auto start functionality yet. Edit the block list in the callblock.py file anytime you want to change the blacklisted numbers. In case you have any doubts, hit Vinu’s My Nokia World to ask him.
If you enjoyed this post, then be sure to subscribe to our Full Feed RSS. You can also Subscribe via Email and have new posts sent directly to your inbox.Share:
Similar Posts:
- How To Enable Application Repositories On The N900 With One Click
- N900 Hack: How To Get Faster Scrolling In The Menu Post PR 1.2 Firmware
- TweeGo Is A Great Looking N900 Twitter App
- Lfocus Hack Gives You Manual Focus During Video Capture – Makes N900 An Incredible Video Capture Tool
- How To Create A Physical Task Manager Button For The N900










A little bit tricky, but a cool trick.
unbelievable that this guide comes without any warning, especially the part about enabling extras-devel… where is your responsibility?
[...] via 1|2 [...]
Prometoys,
If you care to click the link which explains how to enable extras-devel, you will notice the following in the first para itself.
“Extras-Devel is the place where applications reside when they are in the alpha mode and definitely not ready for the average consumer.”
[...] пользователей: http://www.mynokiaworld.com/2010/02/block-unwanted-calls-on-your-n900/ http://maemocentral.com/2010/02/22/how-to-block-unwanted-callers-on-the-n900/ 1 | Call Blocking, MeeGo-Maemo, Nokia [...]
Prometoys ,
You are not forced to enable extras-devel. If you want to use your N900 only as a phone then stick to the initial catalogs. If you want to see the full potential of the device you have to enable outher catalogs and play with aplications. As Vaibhav Sharma said: this applications are not for the average consumer.
i s it possible to block anonymous calls?
Not yet!
Just a bit of a follow up. Since you’re using python you might as well use a set for the blocklist instead of explicitly iterating through a list.
Anyway, this also very very hackishly adds custom ring tones to your script. I tried updating the configuration with profiled calls, but it doesn’t take effect fast enough. And that also would mean decompressing the ring tones when the call comes in. However, changing a symlinked cached tone seems to do the trick. To use this, you will also need to prepare the cached wavs, see the second script for a sloppy fix for that.
#! /usr/bin/python
import gobject, dbus
import time
import os
from dbus.mainloop.glib import DBusGMainLoop
def handle_call(obj_path, callernumber):
global blocklist
print “call from “+callernumber
if callernumber in special_ringtones:
print ‘Special ring tone for: %s’ %callernumber
bus = dbus.SessionBus()
profiled = bus.get_object(‘com.nokia.profiled’, ‘/com/nokia/profiled’)
proxy = dbus.Interface(profiled, ‘com.nokia.profiled’)
old_ring = os.path.basename(proxy.get_value(‘general’,'ringing.alert.tone’))
os.system(“ln -sf /home/user/.local/share/sounds/”+special_ringtones[callernumber]+”.wav.keep”+
” /home/user/.local/share/sounds/”+old_ring+”.wav”)
time.sleep(3)
os.system(“ln -sf /home/user/.local/share/sounds/”+old_ring+”.wav.keep /home/user/.local/share/sounds/”+old_ring+”.wav”)
elif callernumber in blocklist:
print ‘I dont have to block %s’ %callernumber
bus = dbus.SystemBus()
callobject = bus.get_object(‘com.nokia.csd.Call’, ‘/com/nokia/csd/call/1′)
smsiface = dbus.Interface(callobject, ‘com.nokia.csd.Call.Instance’)
smsiface.Release()
blocklist = set(["+918067337555","+918067348300","+918066167590"])
special_ringtones = { “17185551212″: “Tinker.aac”,
“18175551212″: “Temporal.aac” }
DBusGMainLoop(set_as_default=True)
bus = dbus.SystemBus()
bus.add_signal_receiver(handle_call, path=’/com/nokia/csd/call’, dbus_interface=’com.nokia.csd.Call’, signal_name=’Coming’)
gobject.MainLoop().run()
################# script to prepare audio files ###############
#! /usr/bin/python
import dbus
import sys
import os
import time
bus = dbus.SessionBus()
profiled = bus.get_object(‘com.nokia.profiled’, ‘/com/nokia/profiled’)
proxy = dbus.Interface(profiled, ‘com.nokia.profiled’)
old = os.path.basename(proxy.get_value(‘general’,'ringing.alert.tone’))
f = os.path.abspath(sys.argv[1])
b = os.path.basename(sys.argv[1])
if os.path.isfile(“/home/user/.local/share/sounds/”+b+”.wav.keep”):
exit(0)
if (os.path.isfile(‘/home/user/.local/share/sounds/’+old+’.wav’) and not
os.path.islink(‘/home/user/.local/share/sounds/’+old+’.wav’)):
os.rename(“/home/user/.local/share/sounds/”+old+”.wav”,
“/home/user/.local/share/sounds/”+old+”.wav.keep”)
os.symlink(“/home/user/.local/share/sounds/”+old+”.wav.keep”,
“/home/user/.local/share/sounds/”+old+”.wav”)
if (len(sys.argv) > 1):
proxy.set_value(‘general’,'ringing.alert.tone’,f)
time.sleep(2)
if(os.path.isfile(“/home/user/.local/share/sounds/”+b+”.wav”)):
os.link( “/home/user/.local/share/sounds/”+b+”.wav”,
“/home/user/.local/share/sounds/”+b+”.wav.keep”)
if(os.path.islink(“/home/user/.local/share/sounds/”+old+”.wav”)):
os.unlink(“/home/user/.local/share/sounds/”+old+”.wav”)
os.symlink(“/home/user/.local/share/sounds/”+b+”.wav.keep”,
“/home/user/.local/share/sounds/”+old+”.wav”)
proxy.set_value(‘general’,'ringing.alert.tone’,old)
Hi,
I’m writing a UI for your script, and I’d like to include your code in my package. But I didn’t found any licence around here, so, I’m I allowed to use your code?
Greeting from Austria
–
Srdjan
Add:
I’d also like to redistribute your code, so is GPL OK for you?
Thanks!
- -
Srdjan
[...] How To Block Unwanted Callers On The N900 [...]
Hello!
I’m following the steps above, but x-terminal keeps telling me “not found”, any solution please?
thank you.
I got 2 problems, maybe some1 will be kind enough to respond and helps us out
1. Where is actually situated MyDocs
2. On qwerty keyboard isn`t any “&”, how can we get it?
All the best
Leave your response!
Recent Posts
Find Us On Twitter

You can also, Follow @v4ibhavCategories
Archives
Subscribe
Subscribe On YouTube
Find Us On Facebook
Nokia Lumia 800
Recent Comments
Most Commented
Popular Posts