What I want to do is simply call a list of numbers. If a number do not answer, I will need to call an alternative number for that specific number.
So I have put together the code below, which makes the outbound call. But I have no sample of StatusCallback code that will be called for the status of the call being made and in the StatusCallback, it will call another number if the status was un-answered.
$account_sid = 'Some Value';
$auth_token = 'Some Value';
$client = new \Services_Twilio($account_sid, $auth_token);
$client->account->calls->create('+448008021203', '+441604280111', 'xyz.com/play_msg.html', array(
'Method' => 'GET',
"StatusCallback" => "xyz.com/call_events.php",
"StatusCallbackMethod" => "POST",
"StatusCallbackEvent" => array("answered", "completed"),
'Record' => 'false',
));
Can someone please share existing sample to do this?