Needs to know call status from Twilio once the call is answered or reject
$from ='99xyzzzz';
$to='44nnnnnn';
$response=$client->account->calls->create($from, $to,'www.example.com/Twio.php');
echo $response->status;
But every time it returns queued if a call is answered or reject. I checked Twilio logs it shows call status is Completed. How can I get actual status of a call once the call is answered or rejected
The Twilio Docs say "By default, your application does not get any notification when a call is complete, if the line is busy, or no one answers. To get notification of call status, include the "StatusCallback" parameter with your REST request."
StatusCallback
is a URL that Twilio will hit AFTER the call has been made, and will contain details about the call.
So, setup another URL on your site to handle the incoming request, then you can use that data to update your records. You'll get CallDuration
, RecordingUrl
, RecordingSid
, and RecordingDuration
from that.