Twilio Studio 调用掉线
Twilio Studio Calls Drop
使用 Twilio Studio,如果我 link 我的会议脚本,呼叫会在 post returns 200 时掉线。
有没有办法让通话保持活跃?
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
// this line loads the library
require $_SERVER['DOCUMENT_ROOT'] . '/vendor/twilio-php-master/Twilio/autoload.php';
use Twilio\Twiml;
// Update with your own phone number in E.164 format
$MODERATOR = '0000';
$response = new Twiml;
// Start with a <Dial> verb
$dial = $response->dial();
// If the caller is our MODERATOR, then start the conference when they
// join and end the conference when they leave
if ($_REQUEST['From'] == $MODERATOR) {
$dial->conference('My conference', array(
'startConferenceOnEnter' => True,
'endConferenceOnExit' => True
));
} else {
// Otherwise have the caller join as a regular participant
$dial->conference('My conference', array(
'startConferenceOnEnter' => True
));
}
print $response;
?>
使用 Twilio Studio,如果我 link 我的会议脚本,呼叫会在 post returns 200 时掉线。
有没有办法让通话保持活跃?
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
// this line loads the library
require $_SERVER['DOCUMENT_ROOT'] . '/vendor/twilio-php-master/Twilio/autoload.php';
use Twilio\Twiml;
// Update with your own phone number in E.164 format
$MODERATOR = '0000';
$response = new Twiml;
// Start with a <Dial> verb
$dial = $response->dial();
// If the caller is our MODERATOR, then start the conference when they
// join and end the conference when they leave
if ($_REQUEST['From'] == $MODERATOR) {
$dial->conference('My conference', array(
'startConferenceOnEnter' => True,
'endConferenceOnExit' => True
));
} else {
// Otherwise have the caller join as a regular participant
$dial->conference('My conference', array(
'startConferenceOnEnter' => True
));
}
print $response;
?>