Reputation: 68670
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:
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
Upvotes: 3
Views: 1867
Reputation: 10366
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.
Upvotes: 3