Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TwiML App: If the caller hangs up in the middle of the application process, does Twilio notify the app of a hang up?

Tags:

twilio

I am trying to figure out a way to capture if the caller hangs up in the middle of TwiML instructions. If the caller hangs up (abandons the call) does twilio notify the application of such?

I see the status callback url setting but I just get a "completed" status. I was wondering if the caller was in a middle of a gather and hung up would twilio know the call hung up and report it? Or am I supposed to just see the "completed" status and at that time determine if the call actually successfully completed or not?

like image 307
Brandon Avatar asked Jun 06 '14 17:06

Brandon


1 Answers

Twilio evangelist here.

To my knowledge we don't have a specific way of telling you that a caller hung up during the middle of a <Gather> other than the status callback passing you the CallStatus, which as you points out just tells you that the call was completed, not where within a TwiML document or a call flow the caller was.

If you want to know where within a call flow the call ends (for example the caller hangs up), I'm pretty sure that is something you would need to track in your own application. You could do that by storing the callSid of the phone call along with some meta data that helps your app know where in the flow the call is, and just updating each time Twilio makes a webhook request to your app.

Hope that helps.

like image 94
Devin Rader Avatar answered Nov 08 '22 02:11

Devin Rader