maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   pycallblocker (https://talk.maemo.org/showthread.php?t=63356)

strayl 2010-10-04 21:58

pycallblocker
 
I installed pycallblocker but I still received call from numbers that I blocked. Anybody knows why?

Thanks!

natedog400 2010-12-28 01:07

Re: pycallblocker
 
Its great when you get ignored init?

JB101 2011-01-10 15:49

Re: pycallblocker
 
same here,
It used to work

pythonhacker 2011-01-16 18:02

Re: pycallblocker
 
The graphical PyCallblocker utility installs two Python files namely the GUI script /opt/pycallblocker/callblocker.py and the daemon file /opt/pycallblocker/callblocker-daemon.py.

Unfortunately, this is not enough to autostart the application when you switch on the phone. For that a script needs to be added to /etc/event.d folder which will do this automatically everytime.

I have written one such script along with a customized callblocker-daemon.py script which will automatically sync with any changes you make to the BlockedCallers.txt file. You can get the files from
this folder on my site.

I tested the re-loading of the numbers file by removing and adding my landline number from the BlockedCallers.txt file,

http://harvestmanontheweb.com/python/n900/

Now, this works beautifully on my n900! :)

HTH.

--Anand

JB101 2011-01-17 00:02

Re: pycallblocker
 
thanks, i'll give it a try in the morning.

cheers
J

pythonhacker 2011-01-17 06:26

Re: pycallblocker
 
I got a few emails on how to do this, well, I have written a Readme for this purpose.

Get it from http://www.harvestmanontheweb.com/py...900/Readme.txt . It tells you what to do. The required files are in the same folder, i.e http://www.harvestmanontheweb.com/python/n900/ .

Make sure you first install PyCallBlocker so as to get the GUI for editing the phone numbers. However it is possible to simply use callblocker-daemon.py and pycallblocker-d to get it to work, the only drawback would be that you will have to edit the BlockedCallers.txt file manually.

HTH.

--Anand

sneer_69 2011-03-10 21:47

Re: pycallblocker
 
I have a problem with pycallblocker. I'm using "call waiting" feature, When I make a phone call and during that call blocked number is calling it's ending my current call and allowing blocked number to call me. I'm in UK in o2. Please help

khuong 2011-03-20 05:53

Re: pycallblocker
 
Quote:

Originally Posted by sneer_69 (Post 965287)
I have a problem with pycallblocker. I'm using "call waiting" feature, When I make a phone call and during that call blocked number is calling it's ending my current call and allowing blocked number to call me. I'm in UK in o2. Please help

The solution for your case is to add another function to the callblocker-daemon.py to read the file /var/run/mce/call , which has the word "yes" if the call is active and "no" if it's not, and then change the line below in callblocker-daemon.py accordingly.

callobject = bus.get_object('com.nokia.csd.Call', '/com/nokia/csd/call/1') for no

callobject = bus.get_object('com.nokia.csd.Call', '/com/nokia/csd/call/2') for yes

Here's my noob py function to read the file 'var/run/mce/call' and return 1 if call is inactive 2 if it's active. Since this is my first py script modification, i am sure it can be optimized and hope someone in the forum can help.

Code:

def check_callstatus():
        try:
                callfile = open('/var/run/mce/call', 'rb')
                cstat = callfile.readlines()
                callfile.close()
                if cstat[0] == 'yes':
                        return 2
        except Exception:
                print "Hmm...wtf"
        return 1

Then you can change the line below in callblocker-daemon.py

from:
callobject = bus.get_object('com.nokia.csd.Call', '/com/nokia/csd/call/1')

to:
callobject = bus.get_object('com.nokia.csd.Call', '/com/nokia/csd/call/' + str(check_callstatus()))


Now whenever you're talking on the phone the blacklist callers will go straight to the voicemail box and the missed call alert box won't even show up. So you don't even know if they call you. :) I hope there will be some way to get rid of missed call alert box when not on the phone.

Mr. Incredible 2011-04-15 10:27

Re: pycallblocker
 
How can I block "Unknown Number"?
Wie blockiere ich "Unbekannte Nummer"?

badboyuk 2011-05-24 14:11

Re: pycallblocker
 
Does anyone know how to block unknown numbers? I have read that a couple people have but their details are very sketchy on how to do it. Something to do with adding in entries for unknown number blocklist and someone else mentioned this: "When you receive a call from "Unknown number", the parameter callernumber is actually an empty string. So, in order to block the calls from "Unknown number" you can check whether the length of callernumber is 0. I made this small change in the script and works just fine.
Ex.: if len(callernumber) == 0:"
This only applies to "Unknown number" calls. To make it work also with other numbers replace the line "if callernumber in blocklist:" from handle_call with "if callernumber in blocklist or len(callernumber) == 0:"

but I haven't a scooby where to enter this or how.......I have checked both old and new versions of the py scripts and can't find anything relating to what he's mentioned, so I'm at a loss.

Can someone please shed some light on this?


All times are GMT. The time now is 22:49.

vBulletin® Version 3.8.8