Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

"If" Statement in vxml

Help
Azazel69
2005-02-20
2013-04-16
  • Azazel69
    Azazel69
    2005-02-20

    Hi!

    I want to make a check for an access code.
    So wrote the following code:

    <?xml version="1.0" ?>
    <vxml version="2.0">
    <var name="accesscode" expr="'1001'" />
    <form id="first">
    <field type="digits" name="codeinput">
      <prompt>Please type in your access code</prompt>   
    </field>   
    <if cond="accesscode == codeinput">
      <block>You successfully entered your code!</block>
    </if>
    </form>
    </vxml>

    I tried many different if statements but I couldn't get a single one to work. I'm using the windows version 2.6.1. I have seen in the release notes that the if statement should be working. So what is my mistake?

    Thanks in advance,
    Peter

     
    • tobi-wan
      tobi-wan
      2005-02-20

      hi,

      what is the exact error? how does it not work?

      in the <field> element you could try type=digits?length=4 maybe this works better...

      best luck!

      please report back if this does not help, including a description of the error.

      t

       
    • Azazel69
      Azazel69
      2005-02-20

      Thanks for your help, but it didn't work.
      I can't even run this statement:
      <if cond="1 == 1">
      </if>
      At least this should work!

      Maybe you have some working examples?

      Here the last lines of my .log file:
      Feb 20 15:07:37.98|TUCPU=0|TKCPU=0|0|60001|testClient::ChannelThread|Connected: 0
      Feb 20 15:07:37.98|TUCPU=0|TKCPU=0|0|60001|testClient::ChannelThread|TTS Engine to use: 'IBMViaVoice'
      Feb 20 15:07:37.98|TUCPU=0|TKCPU=0|0|7000||New call
      Feb 20 15:07:37.98|TUCPU=0|TKCPU=0|0|60001|testClient::ChannelThread|In a Call
      Feb 20 15:07:37.98|TUCPU=0|TKCPU=0|0|EVENT|0|ANII=6508470000|DNIS=6174284444|VURL=d:\publicVoiceXML\examples\test.vxml

      Nothing is recorded as you can see...

      Peter

       
    • tobi-wan
      tobi-wan
      2005-02-22

      please provide the whole log in a high log-level, all i can see here is that the call is accepted.

      how does the actual result compare to the expected one? (what do you hear, what did you want to hear?)

      regards,

      t