2016-06-16 28 views
1

我正在使用收集动词取用户的输入,但是我在用户按下某个键之前播放mp3。 问题是我想在mp3文件播放完毕之前发布用户输入的操作URL。 我的TwiML在mp3文件播放完毕之前不会接收任何用户的输入。 我不确定在用户按下某个键时是否有办法立即发布用户的输入。Twilio收集,毫不拖延地接受用户的输入

<?xml version="1.0" encoding="UTF-8"?> 
<Response> 
    <Play>http://www.action.com/greeting.mp3?1925924752</Play> 
    <Play>http://www.action.com/selection.mp3?1925924752</Play> 
    <Gather NumDigits="1" Timeout="5" Method="GET" Action="Http://www.action.com/handler.Php?Repeated=1"/> 
    <Redirect Method="GET">http://www.action.com/handler.php?repeated=1</Redirect> 
</Response> 

谢谢。

回答

2

Twilio福音传教士在这里。

刚落,那些<Play>动词到您<Gather>

<?xml version="1.0" encoding="UTF-8"?> 
<Response> 
    <Play>http://www.action.com/greeting.mp3?1925924752</Play> 
    <Gather NumDigits="1" Timeout="5" Method="GET" Action="Http://www.action.com/handler.Php?Repeated=1"> 
    <Play>http://www.action.com/selection.mp3?1925924752</Play> 
    </Gather> 
    <Redirect Method="GET">http://www.action.com/handler.php?repeated=1</Redirect> 
</Response> 

希望有所帮助。

+0

谢谢!这样可行! – redpotato