2017-07-25 30 views
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"); 

请帮帮我,谢谢

回答

0

Twilio开发板的每个传道者在这里。

我点击了国际设置的URL,但被重定向到Messaging国际设置。

你可以到这里的语音国际设置https://www.twilio.com/console/voice/settings/geo-permissions,并确保你已经在该页面上检查越南。

我会反馈错误指向错误的页面。

让我知道这是否有帮助!