收集动词超时(Twilio)

时间:2016-02-11 14:04:01

标签: twilio-php

我目前正致力于用户互动Twilio TwiLM。 这是我的TwiLM,当它超时时,它只是挂断电话。 我甚至不确定Twilio中是否可以这样做,但是当它超时时我可以反复调用该动作(URL)。

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Gather numDigits="1" timeout="10" action="twilio_handler.php">
        <Say voice="alice">Please press 1 to continue</Say>
    </Gather>
</Response>

感谢。

1 个答案:

答案 0 :(得分:2)

Twilio传道者在这里。

如果<Gather>次超时Twilio将在文档中查找要执行的下一个TwiML动词,那么如果要重复提示,您可以使用<Redirect>动词重定向Twilio回到了同样的TwiML:

<?xml version="1.0" encoding="UTF-8"?>
<!-- page located at http://example.com/gather_hints.xml -->
<Response>
    <Gather action="/process_gather.php" method="GET">
        <Say>Enter something, or not</Say>
    </Gather>
    <Redirect method="GET">
        /gather_hints.xml
    </Redirect>
</Response>

您可以在我们的网站上找到关于this sample code<Redirect>和更多信息。

希望有所帮助。