问题描述
我尝试在语音通话中以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
。
我尝试了以下方法,并且有效。不要忘记您的<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>