Page 1 of 1

Accepting calues other than mentioned in IF-ELSEIF condition

Posted: Thu Dec 07, 2006 7:58 am
by awaneeshp
Hi,

I have a problem while accepting an input other than mentioned in the IF-ELSEIF condition.The VXML is as follows...

Code: Select all

<form id="confirm_ssn_number">
    <block>
      <prompt>
        <voice name="crystal">
          <break size="medium" />The Number you entered is<break size="medium" /><say-as type="acronym">
            <value expr="ssn_number" />
          </say-as>
        </voice>
      </prompt>
    </block>
    <field name="ssn" type="digits?length=1">
      <prompt>
        <voice name="crystal">
          <break size="medium" />Press or Say 1 if this is correct?<break size="medium" />Press or Say 2  to Re enter
        </voice>
      </prompt>
    </field>
    <filled>
      <if cond="ssn=='1'">
             <goto next="#prompt_dob" />
        <elseif cond="ssn=='2'" />
            <goto next="#prompt_ssn_number" />
        <else/>
          <prompt>
             <voice name="crystal">
               <break size="medium" />I did not understand your entry.
             </voice>
          </prompt>
          <reprompt/>
        </if>
    </filled>
  </form>

In the above code when we enter any value other than 1 or 2 then the IVR speaks out "I did not understand your entry" & gets discconected.

Instead of getting disconnected it should repromt the message "Press or Say 1 if this is correct?<break size="medium" />Press or Say 2 to Re enter", so that the caller enters the correct values 1 or 2.

Please let me know whats wrong with this VXML & how to get it corrected.

Thanks,
-Awaneesh

IVR issue is <reprompt /> can't be used alone in <f

Posted: Thu Dec 07, 2006 12:04 pm
by support
Hi,

The IVR problem is that <reprompt /> cannot be used alone inside of a <filled>. You must first clear the field variable 'ssn' using <clear /> and then <reprompt />:

<filled>
<if cond="ssn=='1'">
<goto next="#prompt_dob" />
<elseif cond="ssn=='2'" />
<goto next="#prompt_ssn_number" />
<else/>
<prompt>
<voice name="crystal">
<break size="medium" />I did not understand your entry.
</voice>
</prompt>
<clear namelist="ssn" />
<reprompt/>
</if>
</filled>


Regards,

Plum Supoprt