Problems with verb Record timeout when calling an IVR

蹲街弑〆低调 提交于 2020-01-04 05:54:22

问题


We're trying to use Twilio to create an automated test framework for those IVRs.

We do an outbound call from Twilio to the IVR, use the verb Say/Play to interact with the IVR and we're using Record to capture what the IVR is saying, latter we transcribe it and make the assertions.

When I ask Twilio to call a phone number and I pretend to be the IVR, everything works perfectly. But when I ask Twilio to call the real IVR, apparently the Record verb can't recognize the pauses, when the IVR stops talking and is waiting for some input.

We tried tweak the timeout attribute but no luck, it records everything and only when the IVR ends the call, Twilio give me the callback with the entire recording. We want each interaction with the IVR in a separate audio, the way we have when I'm pretending.

Here is an example of the TwiML with the Record verb:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Record action="http://foo/nextStep"
            method="POST" 
            playBeep="false" 
            recordingStatusCallback="http://foo/recordStatus" 
            timeout="2"
            transcribe="false"
            trim="do-not-trim" />
</Response>

回答1:


Twilio developer evangelist here.

Rather than using <Record> for this, I would recommend using <Gather input="speech">. The intention of speech input with <Gather> is to react to input to build a voice enabled IVR, but I can only imagine that it will work better in this testing scenario too. It will live transcribe the results for you in place of returning the recordings for you.

Let me know if that helps.



来源:https://stackoverflow.com/questions/49049380/problems-with-verb-record-timeout-when-calling-an-ivr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!