Is it possible to add additional variables to the action attribute in the gather tag?

混江龙づ霸主 提交于 2019-12-11 09:26:30

问题


I have a multi-step Call in function but I want both calls to run through the same script. I'm not sure if it can be achieved by nesting gather tags. First is it possible to nest the gather tags like this?

<gather action="page.php?step=1">
    <say>Enter ID #</say>
    <gather action="page.php?step=2">
        <say>Pres 1 to do blah blah</say>
    </gather>
</gather>

Second is can I add a variable to the action attribute in the <Gather> tag. It doesn't seem to be working for me.


回答1:


Twilio Evangelist here.

If you change the method of your Gather action method to GET, it might be easier for you:

<Gather action="page.php?step=2" method="GET">
    <Say>Pres 1 to do blah blah</Say>
</Gather>

Also, in the example above you have a <Gather> inside of a <Gather>, which isn't supported.

I'm not sure how PHP does routing, but I've tended towards using the URL rather than a query:

<Gather action="/next_step/1"> ... </Gather>

or

<Gather action="/next_step/456"> ... </Gather>

Hope this helps!



来源:https://stackoverflow.com/questions/19121392/is-it-possible-to-add-additional-variables-to-the-action-attribute-in-the-gather

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!