Twilio autopilot handoff action is not working wit

2019-07-30 20:59发布

I have a Twilio autopilot task from an incoming call, which performs a greeting then asks a question before redirecting to a new task called 'callnumber'. This all works fine.

The 'callnumber' task looks like this

{
    "actions": [
        {
            "handoff": {
                "channel": "voice",
                "uri": "https://handler.twilio.com/twiml/TWIMLBINID"
            }
        }
    ]
}

TWIMLBINID actually has the correct ID from the Twiml Bin.

This is the Twiml content in the bin:

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

Unfortunately I'm not hearing this Response spoken out and instead just get the standard 'an error has occurred' voice message.

I've tried a few different versions of this, even calling an xml file hosted on my own public web server and seeing the same problem. Also tried the dial verb and still seeing this issue.

I feel like I may have missed some configuration, after seeing similar posts like: Twilio autopilot doesnt say what it is supposed to say

Any help is much appreciated!

2条回答
来,给爷笑一个
2楼-- · 2019-07-30 21:42

I was able to get the TwiML Bin working with similar JSON, when I have it associated with a Task that has samples.

So, for example, a call comes in to your Autopilot assistant and initially triggers the Assistant Initiation Task of hello_world where you modified the predefined JSON with a listen action.

{
    "actions": [
        {
            "say": "How can I help you today?"
        },
        {
            "listen": true
        }
    ]
}

You then respond so the task associated with your handoff JSON/TwiML Bin is executed (based on the samples you provided). If you try to call the handoff task directly, it fails.

查看更多
Summer. ? 凉城
3楼-- · 2019-07-30 21:45

I have the same JSON for "actions" of the task-seems perfect. But 2 Small differences for the TwiMLbin : 1)don't forget to put the xml tag in the TwiLbin : It should be :

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say>For this question, I will put you in contact ...</Say>
</Response>

2)I don't understand how your twiMLbin has such an hyperlink. Normally the syntax is https://handler.twilio.com/twiml/******SID****** and the SID can not be chosen and mine has 34 characters. (do not use the "friendly name" of the twiMLbin). You have a button in the twiMLbin to copy-paste it directly.

for me it works. Otherwise please provide some more elements

-do you have queries associated to the autopilot task ? if you have task(s) that do not have any queries, the model will refuse to build (you can check this in the screen "natural language router" / tab "build models").

-are you sure you don't have conflicting query that triggers another task than the one you think (typically with short queries, they "vampirize" other intents). For that please provide the logs of the queries (query Vs Task) of your autopilot assistant.

nb : I confirm what philnash said : you should really try with a phone call. I experienced also some "glitches" with the Twilio simulator.

查看更多
登录 后发表回答