如果我链接到我的会议脚本,则使用 Twilio Studio,一旦帖子返回 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;
?>