Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Checking if the recipient accepted/rejected the call?

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

like image 752
eozzy Avatar asked Jan 25 '26 14:01

eozzy


1 Answers

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.

like image 62
Devin Rader Avatar answered Jan 28 '26 19:01

Devin Rader



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!