1
我使用twilio呼叫系統,但是我的錯誤:錯誤:語音通話在PHP代碼中使用twilo
Error: Account not authorized to call +84983xxxxxx. Perhaps you need to enable some international permissions: https://www.twilio.com/user/account/settings/international
我在越南(+84)通過https://www.twilio.com/user/account/settings/international檢查,但仍然遇到同樣的錯誤
我的PHP代碼:
<?php
require 'twilio-php/Services/Twilio.php';
function call_notify($number) {
// Twilio REST API version
$version = "2010-04-01";
// Set our Account SID and AuthToken
$sid = 'AC34962eb3f445dfa40893e64bb8xxxxxx';
$token = '9b0667c68299cf484228344d67xxxxxx';
// A phone number you have previously validated with Twilio
$phonenumber = '+155920xxxxx';
// 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
$number, // The number of the phone receiving call
'http://103.255.238.29/notify.xml' // The URL Twilio will request when the call is answered
);
echo 'Started call: ' . $call->sid;
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
call_notify("+84983xxxxxx");
請幫幫我,謝謝