How to get number of incomming call?
I can trap event of incomming call, but cant detect of phone number...
How to get number of incomming call?
I can trap event of incomming call, but cant detect of phone number...
Hi, amir
Just check this code :How to get number of incomming call?
Best regards,Code:import logs #import the module n=logs.calls(mode='in') #set mode to get the list of incoming numbers. for i in range(len(n)): print n[i]["number"]
RaHuL
Big thanx) its work!
How i can hang up incoming call? Function telephone.hang_up() work only with telephone.dial(number). I use this code:
Code:import logs, appuifw, os, e32, time, telephone global n n = logs.calls(mode='in') def handle_hang_up(status): global n if status[0] == telephone.EStatusRinging: telephone.hang_up() elif status[0] == telephone.EStatusDisconnecting: time.sleep(1) print n[0]["number"] telephone.call_state(handle_hang_up) lock = e32.Ao_lock() os.abort = lock.signal lock.wait()
Ya, its true this function work only either you have initiated the call or you have picked (received ) the call.
best regards,
RaHuL
rahulvala, and so, how i can hang up a call???
can you give work example?
If you are using module telephone then you can use this function to cancel the call.
telephone.hang_up()
Best regards,
RaHuL