使用循环重复语音呼叫时,Twilio具有暂停时间

问题描述

我尝试在语音通话中以python代码here的形式重复发送一条消息,该消息被here引导,但没有起作用,即对于{length> {length} is <Pause length="3">

call = client.calls.create(
    twiml = f'''
    <Response>
        <Gather>
            <Say loop="{loop}">{message}</Say>
            <Pause length="3"></Pause>
        </Gather>
        <Redirect>/gather.xml</Redirect>
    </Response>
    ''',to    = to,from_ = from_,)

解决方法

看看SSML Pause

Adding a Pause

SSML Break Tag

我尝试了以下方法,并且有效。不要忘记您的<Gather> action url

<Response>
    <Gather>
        <Say loop="3">This is a message with a pause between loops<break time="3s"/></Say>
    </Gather>
    <Redirect>/gather.xml</Redirect>
</Response>

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...