Help with VoiceXML bug
Posted: Tue Aug 07, 2007 3:41 pm
I'm making a web-based employee time clock program, where employees can clock in and out of work. I have the application built and it runs fine on a Voxeo account, but when i transferred it over to PlumVoice, there are some slight bugs. The bug is in my menu code. For some reason when you select a choice (DTMF), it doesn't recognize it. Here is the code:
<form>
<var name='userID' expr='$userID'/>
<var name='password' expr='$_POST[password]'/>
<var name='callerID' expr='session.callerid'/>
<field name='menuChoice'>
<grammar type='text/gsl'>
[dtmf-1 dtmf-2 dtmf-3]
</grammar>
<prompt bargein='true'>
Press 1 to clock $clockText.
Press 2 to check to do list.
Press 3 to check messages.
</prompt>
<noinput>
<prompt bargein='true'>
Please select a number from the menu.
</prompt>
<reprompt/>
</noinput>
<nomatch>
<prompt bargein='true'>
Please select a number from the menu.
</prompt>
<reprompt/>
</nomatch>
</field>
<filled namelist='menuChoice' mode='all'>
<if cond='menuChoice==1'>
<submit next='clockInOut.php' method='post' namelist='userID password callerID'/>
<elseif cond='menuChoice==2'/>
<submit next='checkTasks.php' method='post' namelist='userID password'/>
<elseif cond='menuChoice==3'/>
<submit next='checkMessages.php' method='post' namelist='userID password'/>
</if>
</filled>
</form>
I've been trying to debug it, but I'm not really sure where I'm going wrong. Can anyone help me with this?
Thanks so much,
Jason
<form>
<var name='userID' expr='$userID'/>
<var name='password' expr='$_POST[password]'/>
<var name='callerID' expr='session.callerid'/>
<field name='menuChoice'>
<grammar type='text/gsl'>
[dtmf-1 dtmf-2 dtmf-3]
</grammar>
<prompt bargein='true'>
Press 1 to clock $clockText.
Press 2 to check to do list.
Press 3 to check messages.
</prompt>
<noinput>
<prompt bargein='true'>
Please select a number from the menu.
</prompt>
<reprompt/>
</noinput>
<nomatch>
<prompt bargein='true'>
Please select a number from the menu.
</prompt>
<reprompt/>
</nomatch>
</field>
<filled namelist='menuChoice' mode='all'>
<if cond='menuChoice==1'>
<submit next='clockInOut.php' method='post' namelist='userID password callerID'/>
<elseif cond='menuChoice==2'/>
<submit next='checkTasks.php' method='post' namelist='userID password'/>
<elseif cond='menuChoice==3'/>
<submit next='checkMessages.php' method='post' namelist='userID password'/>
</if>
</filled>
</form>
I've been trying to debug it, but I'm not really sure where I'm going wrong. Can anyone help me with this?
Thanks so much,
Jason