每当我点击此页面https://38e258f1.ngrok.io/placeCall.php时,它就会向我显示sid值,例如“ **********************”,但没有打电话给我的应用程序...这是我的placeCall的php代码
/*
* Makes a call to the specified client using the Twilio REST API.
*/
include('vendor/autoload.php');
include('config.php');
$identity = 'alice';
$callerNumber = '+923402117295';
$callerId = 'client:quick_start';
$to = isset($_GET["to"]) ? $_GET["to"] : "";
if (!isset($to) || empty($to)) {
$to = isset($POST["to"]) ? $_POST["to"] : "";
}
$client = new Twilio\Rest\Client($API_KEY, $API_KEY_SECRET, $ACCOUNT_SID);
$call = NULL;
if (!isset($to) || empty($to)) {
$call = $client->calls->create(
'client:alice', // Call this number
$callerId, // From a valid Twilio number
array(
'url' => 'https://'.$_SERVER['HTTP_HOST'].'/incoming.php'
)
);
} else if (is_numeric($to)) {
$call = $client->calls->create(
$to, // Call this number
$callerNumber, // From a valid Twilio number
array(
'url' => 'https://'.$_SERVER['HTTP_HOST'].'/incoming.php'
)
);
} else {
$call = $client->calls->create(
'client:'.$to, // Call this number
$callerId, // From a valid Twilio number
array(
'url' => 'https://'.$_SERVER['HTTP_HOST'].'/incoming.php'
)
);
}
print $call->sid;