无法获取if语句在vxml中运行

时间:2012-10-23 00:48:42

标签: coldfusion vxml

我正在尝试为noinput和nomatch动态调用包含文件,但是我无法获得下面的if语句不会运行,有什么想法吗?

这是在每个页面顶部的cfmodule标签中,因此我可以捕获错误,无输入,无匹配和挂起。

<cfif thistag.executionmode is "start">

        <!--- header content goes here --->
        <cfheader name="Content-Type" value="text/xml">
        <cfheader name="Cache-Control" value= "no-cache">
        <cfheader name="Expires" value="#Now()#"><?xml version="1.0" encoding="UTF-8"?>
        <vxml version="2.1" xmlns:voxeo="http://community.voxeo.com/xmlns/vxml">

        <meta name="maintainer" content="#application.maintainer#"/>

        <var name="calledid" expr="session.calledid"/>
        <var name="callerid" expr="session.callerid"/>
        <var name="ivrsessionid" expr="session.sessionid"/>
        <var name="action"/>
        <var name="notes"/>
        <var name="flag"/>
        <var name="recording"/>
        <var name="subdialogid"/>
        <var name="MyEvent"/>
        <var name="currentField"/>

        <property name="universals" value="help"/>

        <cfoutput>
            <property name="sensitivity" value="#session.sensitivity#"/>
            <property name="confidencelevel" value="#session.confidenceLevel#"/>
        </cfoutput>

        <!---This prefetches the audio to optimize performance--->
        <property name="audiofetchhint" value="prefetch"/>

        <!---This logs if the caller hangs up.--->
        <cfoutput>
            <catch event="noinput nomatch error connection.disconnect.hangup">

                <assign name="myPage" expr="'#cgi.PATH_INFO#'" />
                <assign name="MyEvent" expr="_event"/>
                <assign name="action" expr="_event"/>
                <assign name="notes" expr="'Page: #cgi.PATH_INFO# - Field: ' + currentField"/>
                <data name="MyDataName" src="#attributes.historyPath#" namelist="calledid callerid ivrsessionid action notes MyEvent currentField" method="post"/>

            </catch>

            <!---I cannot get the if statement to run--->
            <if cond="'1 == 1'">
                <cfinclude template="../inc/cctypequestionnoinput.inc" />
            <elseif cond="MyEvent == 'nomatch'"/>
                <cfinclude template="../inc/cctypequestionnomatch.inc" />
            <else/>
            </if>
        </cfoutput>



    <cfelse>

         <!--- footer content goes here --->
        </vxml>

    </cfif>

0 个答案:

没有答案