Tracking Exact Moment When User Answers Outbound Call
We are facing an issue with tracking the exact moment when a user answers a call (picks up the phone) during outbound calling. We wanted to use the participant joined webhook for this, but we noticed that it triggers when the ringing starts, not when the user actually picks up.
Is there a way to more accurately track the moment when the user picks up the phone during an outbound call? Perhaps there is another webhook or method that we can use for this purpose?
Thank you for your assistance!
this makes sense.. we need to align the lifecycle better to match user expectations. we'll work on improving this behavior
Hi @davidzhao , could you kindly clarify which status I should listen for to identify that the user has picked up the phone during an outbound call? If I'm not mistaken, I should listen to the tracks?
Hey @vlxdisluv! First, participant created by SIP will update it's sip.callStatus to active, which can be observed with participant attribute hook in the SDK. Second, outbound SIP participant will not subscribe to anyone's tracks until the call is dialed. So this could be another indicator.
Hey @vlxdisluv! First, participant created by SIP will update it's
sip.callStatustoactive, which can be observed with participant attribute hook in the SDK. Second, outbound SIP participant will not subscribe to anyone's tracks until the call is dialed. So this could be another indicator.
Is there a way to reliably detect whether a SIP INVITE request was unsuccessful, particularly when the SIP trunk service is unavailable and a 500 error is returned? Can this be tracked through specific events or mechanisms? Additionally, is it possible to determine whether the call was answered by the intended recipient or an answering machine the call was forwarded to?
Yes, SIP service will set DisconnectReason for a LK participant to a specific value in this case, see https://github.com/livekit/sip/issues/191. The actual change is https://github.com/livekit/protocol/pull/845.
Regarding answering machine detection - we do not support it directly yet. Should be done externally with an Agent for now. The issue is https://github.com/livekit/sip/issues/117. We now plan to emit specific events via the data channel when SIP service detects telephony tones. This may help the Agent detect it more reliably.
@dennwc Tracking on this to see whether anything in progress to emit the events for SIP Service answering machine detection