Twilio 自动驾驶仪不说它应该说的 [英] Twilio autopilot doesnt say what it is supposed to say

查看:16
本文介绍了Twilio 自动驾驶仪不说它应该说的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我觉得这里被堵住了.我编写了一个 Twilio 自动驾驶任务来处理来电.它应该说些什么,然后将呼叫的控制权转移到处理程序,该处理程序将呼叫转移到外部号码.代码如下:

I feel blocked here. I have written a Twilio autopilot task that is handling an incoming phone call. It is supposed to say something, then transfer the controle of the call to a handler that will transfer the call to an external number. Here is the code:

{
    "actions": [
        {
            "say": "For this question, I will put you in contact with our customer care specialist."
        },
        {
            "handoff": {
                "channel": "voice",
                "uri": "https://handler.twilio.com/twiml/xxx-my hander id here-xxx"
            }
        }
    ]
}

然后处理程序的 url 转到带有此内容的 twimlbin :

then the url of the handler goes to a twimlbin with this content :

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Dial>+32xxxxx</Dial>
</Response>

问题是任务直接进入handoff"动作,没有说文字.所以呼叫立即转移到+32xxxxx并且任务不说文本.我试图删除交接,然后任务是说出它应该说的内容.我真的不知道我做错了什么.任何人的想法?提前谢谢

The problem is that the task is going directly to the "handoff" action and does not say the text. So the call is transfered to +32xxxxx immediately and the task does not say the text. I have tried to remove the handoff and then the task is saying what it is supposed to say. I really don't know what I am doing wrong. Anybody an idea ? thx in advance

推荐答案

Twilio 布道者在这里.

Twilio evangelist here.

因此,目前如果您在任务中包含 handoff 操作,Autopilot 会忽略任务中的所有其他操作,仅执行切换.要在您的情况下解决此问题,您可以在您现在拥有的任何其他 TwiML 之前将一个动词放在您要移交给的 TwiMLBin 中.

So currently if you include the handoff action in a task, Autopilot ignores all other actions in the task and only executes the handoff. To work around this in your case, you can put a verb in the TwiMLBin you're handing off to before whatever other TwiML you have there now.

因此简化您的任务:

{
  "actions": [
    {
      "handoff": {
            "channel": "voice",
            "uri": "https://handler.twilio.com/twiml/xxx-my hander id here-xxx"
      }
    }
  ]
}

在您的 TwiML Bin 中:

And in your TwiML Bin:

<Response>
    <Say>For this question, I will put you in contact with our customer care specialist.</Say>

    <!-- the rest of your TwiML -->

</Response>

团队知道这并不理想,他们正在考虑改变它.

The team knows this isn't ideal and its something they are looking at changing it.

希望有所帮助.

这篇关于Twilio 自动驾驶仪不说它应该说的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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