You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this example, when call_status == "active" it immediately returns from (supposedly entrypoint) function, but in my understanding, the call_status should transition like "dialing" → "active" → "hangup". So if you implement like this, it never enters the call_status == "hangup" branch. Could you correct my understanding? Thanks.
start_time=perf_counter()
whileperf_counter() -start_time<30:
call_status=participant.attributes.get("sip.callStatus")
ifcall_status=="active":
logger.info("user has picked up")
returnelifcall_status=="automation":
# if DTMF is used in the `sip_call_to` number, typically used to dial# an extension or enter a PIN.# during DTMF dialing, the participant will be in the "automation" statepasselifcall_status=="hangup":
# user hung up, we'll exit the joblogger.info("user hung up, exiting job")
breakawaitasyncio.sleep(0.1)
logger.info("session timed out, exiting job")
ctx.shutdown()
In this example, when
call_status == "active"
it immediately returns from (supposedlyentrypoint
) function, but in my understanding, the call_status should transition like "dialing" → "active" → "hangup". So if you implement like this, it never enters thecall_status == "hangup"
branch. Could you correct my understanding? Thanks.https://docs.livekit.io/agents/quickstarts/outbound-calls/#monitoring-dialing-status
The text was updated successfully, but these errors were encountered: