Hello,
is there a function in PYS60 that can show us the number of the last received call??
or the last missed call??
thx
Hello,
is there a function in PYS60 that can show us the number of the last received call??
or the last missed call??
thx
Code:import logs l=logs.calls(mode='missed')[0] #The dictionary for the latest missed call #You could use 'in' instead of 'missed' for received l["number"] #Returns the value for the entry "number"
Last edited by bogdan.galiceanu; 2008-03-22 at 19:07.
Hi Bogdan Galiceanu,
I added this to the Wiki so that users may find it useful there.
http://wiki.forum.nokia.com/index.ph...st_missed_call
Kandyfloss
V 7.0642.0
18-10-06
RH-51
Nokia 7610
OK Kandyfloss, but I had already made an article about it: http://wiki.forum.nokia.com/index.php/How_to_use_logs
It's good that you added it though, as the title is more specific
Hi hassan83,
I think you can use the while loop with a e32.Ao_sleep(0.1) or e32.Ao_sleep(1) as per as your requirement!
Best Regards
Croozeus
Pankaj Nathani
www.croozeus.com
This program will check the last missed call and will call the person. what i need is a function that wait until the arrival of missed call.Code:import logs import appuifw from socket import * import socket import appuifw import e32 import telephone Destinataire = "+33650278307" l = logs.calls(mode='missed')[0] tempNumber="" tempTime="" l1= logs.calls(mode='missed')[1] print l["number"] i=0 while 1 : if (l["number"] == Destinataire): if(l["time"] != tempTime): tempTime = l["time"] telephone.dial(l["number"]) e32.ao_sleep(6) telephone.hang_up() e32.ao_sleep(4) i=i+1
we try to use while1 to make the program wait for a missed call but when we send a missed call to the fone the programs finish...
i hope that my idea is clear....
Hi hassan83,
Your code for a single missed call monitoring so it will surely exit when the phone gets a missed call.
Try this (Not tested but Hope it works)
Best RegardsCode:import logs import appuifw from socket import * import socket import appuifw import e32 import telephone Destinataire = "+33650278307" l = logs.calls(mode='missed')[0] tempNumber="" tempTime="" while True: l1= logs.calls(mode='missed')[1] print l["number"] i=0 while 1 : if (l["number"] == Destinataire): if(l["time"] != tempTime): tempTime = l["time"] telephone.dial(l["number"]) e32.ao_sleep(6) telephone.hang_up() e32.ao_sleep(4) i=i+1
Croozeus
Pankaj Nathani
www.croozeus.com
Here is an alternative:
The program keeps checking for missed calls, and when there is a new one, it waits two seconds (I did that so I'd have time to hang up and wait for the call back when I tested it), calls the number and then hangs up.
I hope it helps
Code:import telephone, e32, logs, appuifw def quit(): global i i=0 app_lock.signal() appuifw.app.exit_key_handler=quit app_lock=e32.Ao_lock() Destinataire="+33650278307" l=logs.calls(mode='missed')[0] ftime=l["time"] i=1 while(i==1): l=logs.calls(mode='missed')[0] if(l["time"]<>ftime): #If the two times are different, a new missed call has occured if(l["number"]==Destinataire): e32.ao_sleep(2) ftime=l["time"] telephone.dial(l["number"]) telephone.hang_up() app_lock.wait()
Last edited by bogdan.galiceanu; 2008-03-23 at 19:04.