本文介绍了如何在vxml中连接变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在VXML中连接变量.考虑以下示例VXML,

How to concat varible in VXML. consider following example VXML,

<?xml version="1.0" encoding="UTF-8"?>
<vxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2001/vxml" version="2.0" xsi:schemaLocation="http://www.w3.org/2001/vxml  http://www.w3.org/TR/voicexml20/vxml.xsd">
    <form>
        <block>
            <audio src="{url1}"/>
            <audio src="{url2}"/>
        </block>
        <field name="dtmf">
            <option dtmf="1" value="1"/>
            <option dtmf="2" value="2"/>
            <option dtmf="2" value="3"/>
            <filled>
                <submit next="{url3}" namelist="action toneId dtmf" method="get"/>
            </filled>
        </field>
        <noinput>
            <reprompt/>
        </noinput>
        <nomatch>
            <reprompt/>
        </nomatch>
    </form>
</vxml>

{url3} = {some string} + {some variable = value},我想这样,其中url3得到两个值.

{url3} = {some string} + {some variable=value}, I want to get like this, There are url3 get concating two value.

推荐答案

更改:

<submit next="{url3}" namelist="action toneId dtmf" method="get"/>

<submit expr="{some string} + {some variable=value}" namelist="action toneId dtmf" method="get"/>

或举一个更具体的例子:

or for a more concrete example:

<submit expr="'http://yourserver.com/api/' + servletName" namelist="action toneId dtmf" method="get"/>

这篇关于如何在vxml中连接变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 17:03