Php Twilio Studio呼叫丢弃
使用Twilio Studio如果我链接到我的会议脚本,电话会在帖子返回200后立即中断 有没有办法保持通话处于活动状态Php Twilio Studio呼叫丢弃,php,twilio,conference,Php,Twilio,Conference,使用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/auto
<?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开发者福音传道者 与其在这里使用HTTP请求,为什么不使用Connect Call To小部件将呼叫连接到会议
如果需要使用HTTP请求,请确保PHP将
内容类型
标题设置为text/xml
或application/xml
和标题('Content-Type:text/xml')代码>在您回显
响应之前。感谢您的提醒。我使用这种方法是为了通过PHP记录调用,因为我似乎无法让HTTP Post小部件发送$_Post[“From”]您如何尝试在Post小部件中发送From
。。URL>POST,但我似乎无法在我的php脚本中连接到$\u POST[“From”]。哦,您需要将参数添加到小部件中的POST请求主体中。尝试类似于From={{flow.trigger.call.From}
。