PHP Fatal error: Uncaught exception 'Twilio\Exceptions\RestException' with message '[HTTP 400] Unable to create record: Account not authorized to call +126878****. Perhaps you need to enable some international permissions: https://www.twilio.com/user/account/settings/international' in /home/gwalioro/public_html/swifnix.com/works/call/twilio-php-master/Twilio/Version.php:85
Code Here
require __DIR__ . '/twilio-php-master/Twilio/autoload.php';
use Twilio\Rest\Client;
// Your Account SID and Auth Token from twilio.com/console
$account_sid = 'ACf9bd660b13b0******';
$auth_token = '7e5d0992f716420dad9******';
// In production, these should be environment variables. E.g.:
// $auth_token = $_ENV["TWILIO_ACCOUNT_SID"]
// A Twilio number you own with SMS capabilities
$twilio_number = "+12015****";
// Where to make a voice call (your cell phone?)
$to_number = "+1268784****";
$client = new Client($account_sid, $auth_token);
$call = $client->account->calls->create(
$to_number,
$twilio_number,
array(
"url" => "http://demo.twilio.com/docs/voice.xml"
)
);
echo $call->sid;