Twillio 呼叫筛选在应答时静音

编程入门 行业动态 更新时间:2024-10-21 10:05:48
本文介绍了Twillio 呼叫筛选在应答时静音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我正在使用 https://www.twilio/docs/上的呼叫筛选示例操作方法/电话筛选

当我通过座机拨打我的 Twilio 号码时,它会被转发到我的手机,并提示我按一个键接受"问题是,一旦我在我的手机上接听电话,来电就会停止响铃,并且在我按下任意键后大约 5 秒内保持静音.

When I place a call to my incoming Twilio number via landline, it is forwarded to my mobile and I am prompted to "press a key to accept" Problem is that as soon as I answer it on my mobile the incoming call stops getting the ringing tone and has silence until about 5 seconds after I press any key.

一旦我在我的手机上接听电话,用户就会陷入沉默,并认为电话已被接听,但直到我按下一个键来接听电话,然后直到 Twilio 进行连接在通话中,这就是我可以与此人交谈的重点.

As soon as I answer the call on my mobile the user is presented with silence and has the impression that the call has been answered but it is not until I have pressed a key to accept the call and further until Twilio does its hookup of the call, that is the point that I can talk to the person.

在电话真正连接到我之前,我可以向他们展示音乐或铃声吗?

Could I present them with music or a ringing tone until the cal really has been connected to me?

这里是转发代码

<?php 

// Set the numbers to call
$numbers = array("<number to call 1>", "<number to call 2>", "<number to call   n>");
$number_index = isset($_REQUEST['number_index']) ? $_REQUEST['number_index'] : "0";
$DialCallStatus = isset($_REQUEST['DialCallStatus']) ?    $_REQUEST['DialCallStatus'] : "";

header("content-type: text/xml"); 

// Check the status of the call and 
// that there is a valid number to call

if($DialCallStatus!="completed" && $number_index<count($numbers)){ 
?>
<Response>
<Dial action="attempt_call.php?number_index=<?php echo $number_index+1 ?>">
    <Number url="screen_for_machine.php">
    <?php echo $numbers[$number_index] ?>
    </Number>
</Dial>
</Response>
<?php
} else {
?>
<Response>
    <Hangup/>
</Response>
<?php
}
?>

以及让我接听电话的部分

And the part that asks me to accept the call

<?php header("content-type: text/xml");
echo '<?xml version="1.0" encoding="UTF-8"?>';
?>
<Response>
<Gather action="complete_call.php">
    <Say>Press any key to accept this call</Say>
</Gather>
<Hangup/>
</Response>

推荐答案

此处为 Twilio 客户支持.

Twilio Customer Support here.

我建议您将来电者置于会议中,这将允许您在代理决定接听电话时使用 waitURL 参数播放保持音乐:

What I would recommend is that you place the incoming caller into conference, this would allow you to use the waitURL parameter to play hold music whilst your agent decides to take the call:

https://www.twilio/docs/howto/simple-conference

这篇关于Twillio 呼叫筛选在应答时静音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-29 16:36:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1192122.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:静音   Twillio

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!