我想在twilio上记录去电并在x秒后停止 一切正常,除了超时或最大长度 我有两个文件: makecall.php
to_number = "+33123456789";
$client = new Client($account_sid, $auth_token);
$client->account->calls->create(
$to_number,
$twilio_number,
array(
"record" => True,
"maxLength" => 30,
"RecordingStatusCallback" => "callback.php",
"Url" => "answercall.php"
)
);
answercall.php
require '../vendor/autoload.php';
use Twilio\TwiML\VoiceResponse;
$response = new VoiceResponse();
$response->record(['maxLength' => 30]);
header('Content-Type: text/xml');
echo $response;;
我也在接听电话中尝试过
$response->pause(['length' => 30]);
$response->hangup();
但它不会停止记录!