Twilio 说“正在录音"客户从 Web 应用程序接听电话后 [英] Twilio Say "Call is being recorded" after customer answers call from web application

查看:24
本文介绍了Twilio 说“正在录音"客户从 Web 应用程序接听电话后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Dial action="actionurl/" callerId="+1xxxxxxxxxx" record="record-from-answer-dual" timeLimit="3600" timeout="30">
<Number>+1yyyyyyyyyy</Number>
</Dial>
</Response>

我目前的 TWIML 如下.这会从浏览器拨打电话,号码为 +1xxxxxxxxxx 到 +1yyyyyyyyyy.我想向被叫方播放一段录音,上面写着正在录音".我试图在不创建会议的情况下找到解决方案.

My current TWIML is as follows. This places an outgoing call from the browser with number +1xxxxxxxxxx to +1yyyyyyyyyy. I want to play a recording saying "The call is being recorded" to the party being called. I am trying to find a solution without creating a conference.

通过使用 Say 动词然后拨打 Web 应用程序客户端,我很容易地为来电实现了这种行为.

I acheived this behavior for incoming calls quite easily by using the Say verb and then dialing the web application client.

推荐答案

Twilio 开发人员布道者在这里.

Twilio developer evangelist here.

您可以使用所谓的 whisper 来做到这一点.耳语让您可以留言或让被呼叫的人在连接之前提供一些输入.

You can do this with what is called a whisper. A whisper allows you to leave a message or allow the person being called to provide some input before being connected.

要实现耳语,请使用 url< 的/code> 属性指向您要在呼叫连接之前播放的 TwiML.在消息的情况下,该 TwiML 可以是带有您要阅读的消息的 元素.

To implement a whisper, you use the url attribute of <Number> to point to the TwiML you want to play before the calls are connected. In the case of a message, that TwiML can be a <Say> element with the message you want to read.

它看起来像这样:

<Response>
  <Dial action="actionurl/" callerId="+1xxxxxxxxxx" record="record-from-answer-dual" timeLimit="3600" timeout="30">
    <Number url="/recording-message">+1yyyyyyyyyy</Number>
  </Dial>
</Response>

然后在 /recording-message 你会返回更多的 TwiML:

And then at /recording-message you would return more TwiML:

<Response>
  <Say>This call is being recorded for monitoring or training purposes.</Say>
</Response>

这篇关于Twilio 说“正在录音"客户从 Web 应用程序接听电话后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆