[Voiceglue] Detect DTMF start

Maruthavanan Subbarayan maruthavanan.s at symbioticinfo.com
Tue May 11 10:39:32 UTC 2010


Hi,

 

I use the below code.

 

When I press star I get nomatch.

 

Please help me to validate * key.

 

<?xml version="1.0" encoding="UTF-8"?>  <!-- -*-SGML-*- -->

<vxml version = "2.0" xmlns="http://www.w3.org/2001/vxml">

 

<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 id="main">

  <property name="inputmodes" value="dtmf"/>

  <property name="interdigittimeout" value="2s"/>

  <property name="timeout" value="4s"/>

 

  <field name="pin" type="digits?maxlength=10">

    <prompt bargein="true">

      <value expr="arrayGames[counter]"/> 

    </prompt>

    <noinput count="1">

        <prompt>I did not hear anything.  Please try again.</prompt>

        <reprompt/>

    </noinput>

    <noinput count="2">

            <prompt>I still did not hear anything.  Please try
again.</prompt>

            <reprompt/>

    </noinput>

    <noinput count="3">

                <prompt>Last attempt Please try again.</prompt>

                <reprompt/>

    </noinput>

    <noinput count="4">

                <goto next="http://192.168.100.189:8181/start.yaws"/>

    </noinput>

    <nomatch>

      <prompt>I did not get numeric digits.  Please try again.</prompt>

      <reprompt/>

    </nomatch>

  </field>

 

  <filled namelist="pin">

    <prompt><value expr="'I got ' + pin"/></prompt>

    <if cond="pin==1">

                <goto next="#previous" />

                <elseif cond="pin==2"/> 

                                <goto next="#main" />

                <elseif cond="pin==*"/> 

                                <goto next="#next" />

    </if>

      <goto next="#next" />

  </filled>

 

</form>

 

<form id="next">

  <block>

  <if cond="counter==4">

                <prompt>This is the last chant in this category To go back
press*</prompt>

                <goto next="#main" />

    <else />

                  <assign name="counter" expr="counter+1"></assign>

                  <goto next="#main" />

  </if>      

  </block>

</form>

 

<form id="previous">

  <block>

  <if cond="counter==0">

                <prompt>This is the first chant in this category To go back
press*</prompt>

                <goto next="#main" />

  <else />

                  <assign name="counter" expr="counter-1"></assign>

                  <goto next="#main" />

  </if>      

  </block>

</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/20100511/463200bb/attachment-0001.html>


More information about the Voiceglue mailing list