Results 1 to 2 of 2

Thread: VXML script not working,

  1. #1

    Default

    Hi, we want to choose an extension before the prompt ends but it doesn't read the digits keyed in and starts back again.

    Somehow when it jumps to the field1 or field3 segment it does not read the digits correctly.

    Any idea?

    <?xml version="1.0" encoding="UTF-8"?>
    <vxml version="2.0">
    <noinput count="1">
    <assign name="field1" expr="'61'"/>
    <goto nextitem="field2" />
    </noinput>

    <form id="mainform">
    <object name="dtfield" classid="datetime">
    <filled>
    <if cond="datetime_wday == '1'">
    <prompt bargein="true"> <audio src="welcome.wav" /> </prompt>
    <goto nextitem="field3"/>

    </if>
    <if cond="datetime_wday == '7'">
    <prompt bargein="true"> <audio src="welcome.wav" /> </prompt>
    <goto nextitem="field3"/>
    </if>
    <if cond="datetime_hour &amp;gt; '7'">
    <if cond="datetime_hour &amp;lt; '17'">
    <prompt bargein="true"> <audio src="welcome.wav" /> </prompt>
    <goto nextitem="field1" />
    <elseif cond="datetime_hour == '17'"/>
    <if cond="datetime_min &amp;lt; '31'">
    <prompt bargein="true"> <audio src="welcome.wav" /> </prompt>
    <goto nextitem="field1" />
    <elseif cond="datetime_min &amp;gt; '30'" />
    <prompt bargein="true"> <audio src="welcome.wav" /> </prompt>
    <goto nextitem="field3"/>
    </if>
    <elseif cond="datetime_hour == '7'"/>
    <if cond="datetime_min &amp;lt; '31'">
    <prompt bargein="true"> <audio src="welcome.wav" /> </prompt>
    <goto nextitem="field3" />
    <elseif cond="datetime_min &amp;gt; '30'" />
    <prompt bargein="true"> <audio src="welcome.wav" /> </prompt>
    <goto nextitem="field1"/>
    </if>
    <elseif cond="datetime_hour gt; '17'"/>
    <prompt bargein="true"> <audio src="welcome.wav" /> </prompt>
    <goto nextitem="field3"/>
    </if>
    <else/>
    <prompt bargein="true"> <audio src="welcome.wav" /> </prompt>
    <goto nextitem="field3"/>
    </if>
    </filled>
    </object>

    <field name="field1" type="digits?length=1" modal="false">
    <link dtmf="#" next="#dirspell"/>
    <prompt bargein="true" timeout="5s">
    <audio src="recurring.wav" />
    </prompt>
    <option dtmf="1" value="44" />
    <option dtmf="2" value="30" />
    <option dtmf="0" value="61"/>
    <filled>
    <goto nextitem="field2"/>
    </filled>
    </field>
    <object name="field2" classid="connect">
    <param name="extension" expr="field1"/>
    <filled>
    <prompt> <audio src="timeover.wav" /> </prompt>
    <exit/>
    </filled>
    <nomatch>
    <goto nextitem="field1"/>
    </nomatch>
    </object>
    <field name="field3" type="digits?length=1" modal="false">
    <prompt timeout="5s">
    <audio src="closed.wav" />
    </prompt>
    <option dtmf="1" value="44" />
    <option dtmf="2" value="30" />

    <filled>
    <goto nextitem="field4"/>
    </filled>
    </field>
    <object name="field4" classid="connect">
    <param name="extension" expr="field3"/>
    <filled>
    <noinput count="1">
    <assign name="field1" expr="'61'"/>
    <goto nextitem="field2" />
    </noinput>
    </filled>
    <nomatch>
    <goto nextitem="field3"/>
    </nomatch>
    </object>
    </form>
    <var name="varExtension"/>
    <var name="varFilename"/>
    <var name="varRoll" expr="'true'"/>
    <form id="dirspell">
    <link dtmf="*" next="#mainform"/>
    <object name="field5" classid="directory">
    <param name="roll" expr="varRoll"/>
    <prompt> <audio src="pubdirspell.wav" /> </prompt>
    <nomatch>
    <prompt> <audio src="nomatch.wav" /> </prompt>
    <reprompt/>
    </nomatch>
    <filled>
    <assign name="varExtension" expr="_extension" />
    <assign name="varFilename" expr="_filename" />
    <assign name="varRoll" expr="'false'" />
    <goto next="#diraccept"/>
    </filled>
    </object>
    </form>
    <!-- accept menu, plays file attached to spelled extension -->
    <!-- and offers three choices to input -->
    <menu id="diraccept">
    <prompt> <audio expr="varFilename" /> </prompt>
    <prompt> <audio src="pubdiraccept.wav" /> </prompt>
    <choice dtmf="1" next="#dirroll"/>
    <choice dtmf="*" next="#dirspell"/>
    <choice dtmf="#" next="#dirmainform"/>
    </menu>
    <!-- roll form, sets varRoll to true to perform roll over the spelled entries -->
    <form id="dirroll">
    <block>
    <assign name="varRoll" expr="'true'" />
    <goto next="#dirspell"/>
    </block>
    </form>
    <!-- main form, dials to already spelled and accepted extension -->
    <form id="dirmainform">
    <object name="field2" classid="connect">
    <param name="extension" expr="varExtension"/>
    <filled>
    <prompt> <audio src="timeover.wav" /> </prompt>
    <exit/>
    </filled>
    <nomatch>
    <goto next="#dirspell"/>
    </nomatch>
    </object>
    </form>


    </vxml>


  2. #2

    Default

    I'll try to interpret your script.
    At the first, script invokes "datetime" object and according to current time jumps to "field1" or "field3".
    Then interpreter waits for input.

    <field name="field1" type="digits?length=1" modal="false">
    This means that digit length is 1 in another words no more than one digit is acceptable here.
    I believe it should be
    <field name="field1" type="digits?length=2" modal="false">

    However you still can define options with one digit
    <option dtmf="1" value="44" />
    <option dtmf="2" value="30" />
    <option dtmf="0" value="61"/>


    Hope it'll help.

    ________
    M5
    ________
    Vaporizers
    Last edited by arsen; 08-20-2011 at 11:42 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Using Quadro audio files w/ VXML
    By threebit in forum VXML Scripting on Quadro
    Replies: 17
    Last Post: 10-27-2009, 03:14 AM
  2. VXML Help
    By stakano in forum 'How Do I' Questions
    Replies: 1
    Last Post: 08-06-2007, 06:26 PM
  3. XML script HELP
    By alfredp in forum VXML Scripting on Quadro
    Replies: 1
    Last Post: 03-05-2007, 07:12 AM
  4. Out of Hours Script
    By ivscorp in forum Troubleshooting and Problems
    Replies: 1
    Last Post: 03-04-2007, 12:45 PM
  5. CID not working
    By alraiky in forum 'How Do I' Questions
    Replies: 6
    Last Post: 09-23-2006, 06:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •