trying to get call state in "real time" but is not work
my example code
def answer(call):
try:
print("call state is ", call.state)
while True:
if call.state == CallState.ENDED:
print("Call ended")
elif call.state == CallState.ANSWERED:
print("Call answered")
elif call.state == CallState.RINGING:
print("Ringing")
elif call.state == CallState.DIALING:
print("Dialing")
else:
print("Call state is ", call.state)
time.sleep(1)
when i make the call is print state ("Ringing") but even if i end the call without anwser from my phone is keep print Ringing , how i can make it to get current call state?
Hey ,
trying to get call state in "real time" but is not work
my example code
when i make the call is print state ("Ringing") but even if i end the call without anwser from my phone is keep print Ringing , how i can make it to get current call state?
Thank you