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

我只是一个虾纸丫 提交于 2019-12-12 11:17:07

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/24087517/twiml-app-if-the-caller-hangs-up-in-the-middle-of-the-application-process-does

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!