0

I want to create vxml file for that process.

1). Press 1 for confirm.

2). Press 2 for next.

3). Press 3 for back.

but this function isn't working, what can do for it?

<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">

<form id="1">
    <field name="F_1">
        <prompt>
            Your choices are
            <break strength="medium" />
            press one or say shatner, press two or
            say Nimoy, press three or say terminal Thilina.
        </prompt>

        <option value="1" dtmf="1"></option>
        <option value="2" dtmf="2"></option>
        <option value="0" dtmf="3"></option>

        <filled>
            <prompt>
                You said <value expr="F_1"/>
            </prompt>
        </filled>
    </field>

    <filled>
        <if cond="F_1 == '1'">
                <prompt>
                    Thank 
            </prompt>
        <elseif cond="F_1 == '2'" />
                <goto next="#2"/>
        <elseif cond="F_1 == '3'" />
            <goto next="#0"/>
        <else />
            <goto next="#1"/>
        </if>
    </filled>
</form>
<form id="2">
    <field name="F_2">
        <prompt>
            Your choices are not
            <break strength="medium" />
            press one or say shatner, press two or
            say Nimoy, press three or say terminal Sampath.
        </prompt>

        <option value="2" dtmf="1"></option>
        <option value="3" dtmf="2"></option>
        <option value="1" dtmf="3"></option>

        <filled>
            <prompt>
                You said <value expr="F_2"/>
            </prompt>
        </filled>
    </field>

    <filled>
        <if cond="F_2 == '1'">
                <prompt>
                    Are you get value
            </prompt>
        <elseif cond="F_2 == '2'" />
                <goto next="#3"/>
        <elseif cond="F_2 == '3'" />
            <goto next="#1"/>
        <else />
            <goto next="#1"/>
        </if>
    </filled>
</form>
</vxml>

1). how I solve this? any error in if loop? How can I find my code has error?

2). How to check vxml correct format?

3). What kind error it have? There are I looking main propose is Press 3 for back not working. then there second form in can't go to first form. How I solve this?

Thilina Sampath
  • 3,615
  • 6
  • 39
  • 65

1 Answers1

0
  1. It isn't clear what you mean by this question as you haven't fully described the behaviors you are experienced versus the desired behaviors.
  2. VoiceXML syntax can be validated against the DTD. This won't verify your logic, just your element and attribute usage.
  3. Is 3 not working in the second form only? You currently have the 3 DTMF key mapped to the value of 1, which plays "Are you get value"
Jim Rush
  • 4,143
  • 3
  • 25
  • 27
  • I ran your XML through a validation web site. The only error it detected was invalid form ids. You are using numbers, not valid labels. Without more information, it is difficult to provide additional help. – Jim Rush Nov 09 '15 at 15:45
  • There are go to second form can't go to first form that is not working. – Thilina Sampath Nov 10 '15 at 03:24