A
Right now I have sequential dialing being done using Dial verb but now I want my application to do the calling for which the dial verb does not work and thus I need the REST api.....
I can't figure out how to do this, I am new to REST. Does using a timeout make it skip lines? If timeout works then perhaps I can make this work but other than that I really have no ideas..
Also, how can I get the status of the call in REST?
Lets say my code looks like this, how would I change it to get the status of the call and set a timeout on the call?
<?php
// Include the Twilio PHP library
require 'Services/Twilio.php';
// Twilio REST API version
$version = "2010-04-01";
// Set our Account SID and AuthToken
$sid = 'AC123';
$token = 'abcd';
// A phone number you have previously validated with Twilio
$phonenumber = '4151234567';
// Instantiate a new Twilio Rest Client
$client = new Services_Twilio($sid, $token, $version);
try {
// Initiate a new outbound call
$call = $client->account->calls->create(
$phonenumber, // The number of the phone initiating the call
'5101234567', // The number of the phone receiving call
'http://demo.twilio.com/welcom/voice/'
);
echo 'Started call: ' . $call->sid;
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}