2
如何在Twilio中使用拨号盘功能?我正在通过浏览器拨打电话号码,拨打电话link。用于扩展呼叫的拨号盘 - Twilio
TwiML代码:
<?php
header('Content-type: text/xml');
// put a phone number you've verified with Twilio to use as a caller ID number
$callerId = '+1xxxxxxxxx';
// put your default Twilio Client name here, for when a phone number isn't given
$number = 'Name';
// get the phone number from the page request parameters, if given
if (isset($_REQUEST['PhoneNumber'])) {
$number = htmlspecialchars($_REQUEST['PhoneNumber']);
}
// wrap the phone number or client name in the appropriate TwiML verb
// by checking if the number given has only digits and format symbols
if (preg_match("/^[\d\+\-\(\) ]+$/", $number)) {
$numberOrClient = "<Number>" . $number . "</Number>";
} else {
$numberOrClient = "<Client>" . $number . "</Client>";
}
?>
<Response>
<Dial callerId="<?php echo $callerId ?>">
<?php echo $numberOrClient ?>
</Dial>
</Response>
如何我可以在页面中添加拨号盘,使用户应该能够进入extention或菜单选项?例如:点击1连接到销售经理。
请帮助我,如果有人知道这一点。提前致谢。