twilio 按顺序拨号

Ada*_*all 2 twilio twilio-twiml

我想让用户按顺序(不是同时)进行一系列调用。首选的交互是:

<say>Connecting now. Press # to continue to the next call</say>
[dials a number]
[gathers # keypress and dials next number]
...
<say>Thanks</say>
Run Code Online (Sandbox Code Playgroud)

这可能吗?或者我是否需要使用该dial action参数在用户挂断时通过下一个呼叫回拨用户?

Dev*_*der 5

Twilio 布道者在这里。

您应该能够使用 hangupOnStar 属性来完成此操作:

<Response>
    <Say>Connecting now. Press star to continue to the next call</Say>
    <Dial hangupOnStar="true">+15555555555</Dial>
    <Dial hangupOnStar="true">+15555556666</Dial>
    <Dial hangupOnStar="true">+15555557777</Dial>
    <Say>Thanks</Say>
</Response>
Run Code Online (Sandbox Code Playgroud)

该属性允许主叫方通过按 * 键断开与被叫方的连接。当这种情况发生时,Twilio 将移至并执行下一个 TwiML 动词。

希望有帮助。