[Voiceglue] VXML Arrays
Maruthavanan Subbarayan
maruthavanan.s at symbioticinfo.com
Mon May 10 12:28:15 UTC 2010
HI,
Can I use VXML arrays in voice glue, I used the below VXML and got "Serious
error has occurred" with no logs.
I have a scenario where I need to play more number of files, user can
navigate forward, next, and I should play error when tries to go beyond
limits. So I thought of keeping a array say from 1-100 keep on increasing
the array, when user select previous I would decrement the index and if you
select next I shall increment and play after validating for first and last.
Any one has experience in doing this. Please guide me to achieve this.
////////////////////////////////////////////////////////////////////
<?xml version="1.0" encoding="UTF-8" ?>
<vxml version="2.1">
<var name="counter" expr="0"/>
<var name="selection"/>
<script>
var arrayGames =
["duke nukem forever", "half life 2", "doom 3",
"shadow warrior 2", "track and field: grecian edition" ];
</script>
<form>
<property name="inputmodes" value="dtmf"/>
<property name="interdigittimeout" value="2s"/>
<property name="timeout" value="4s"/>
<block>
<prompt> Please say Yes when you hear the item you would like to purchase
</prompt>
</block>
<field name="pin" type="digits?maxlength=10" >
<prompt> <value expr="arrayGames[counter]"/> </prompt>
<noinput>
<assign name="counter" expr="counter+1"/>
<reprompt/>
</noinput>
<filled namelist="pin">
<prompt> You selected <value expr="arrayGames[counter]"/>. </prompt>
</filled>
</field>
</form>
</vxml>
Regards,
Marutha
Symbiotic Info tech, Chennai
+91 95510 78002
maruthavanan.s at symbioticinfo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.voiceglue.org/pipermail/voiceglue/attachments/20100510/da447ca9/attachment.html>
More information about the Voiceglue
mailing list