Question

I'm using Twilio for phone verification, and the hundred times + that I've tested it works, but somehow I occasionally received failed notifications (I have a mail() function in the else statement).

Is there any way I can actually know if:

  1. The recipient's phone rang but he didn't pick up
  2. The recipient pickup up the call but didn't enter the verification code.
  3. The recipient rejected the call when the bell rang.

So I can accurately determine whats going on. Currently I only see the call as "completed" but I'm not sure if the number was wrong, or the call was rejected etc..

Thanks

Was it helpful?

Solution

Twilio evangelist here.

For the first scenario (no pickup), you can use the StatusCallback parameter to specify a URL twilio will request when a call ends. We pass along a CallStatus parameter that tells you why the call ended.

For the second scenario this is something that you will need to track since only your app knows what is a valid code.

The third scenario I'm not quite sure I understand. Do you mean when the phone rings they ignore the call? To Twilio that is essentially the same as not answering it.

Hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top