Page 1 of 1

nomatch not working for some reason?

Posted: Wed Oct 04, 2006 8:04 pm
by brent.russell
I have a grammar of:
<grammar type="application/x-jsgf">1|2</grammar>
When a user presses 3 it just disconnects and does not reprompt. It should follow what <nomatch> says if I am correct

Here is my form:

<form id="confirmCallerID">
<field name="confirmNumberChoice" type="digits">
<grammar type="application/x-jsgf">1|2</grammar>
<property name="interdigittimeout" value="4s" />
<prompt timeout="6s">If this phone number is correct, press one, if not press two.</prompt>
<filled>
<if cond="confirmNumberChoice==1">
<goto next="#mainMenu"/>
<elseif cond="confirmNumberChoice==2"/>
<goto next="#getNumber"/>
</if>
</filled>
<noinput>
<reprompt/>
</noinput>
<nomatch>
Sorry, that was not one of the choices.
<reprompt/>
</nomatch>
</field>
</form>

Any help is greatly appriciated
-Brent

IVR code error due to enabling two grammars

Posted: Fri Oct 06, 2006 1:17 pm
by support
Hello,

The problem with your IVR code is that you are actually enabling two IVR grammars. The first <grammar> is the built-in digits IVR grammar specified by setting the field type="digits". This indicates that the IVR system should look for any number of digits as a match case. The second is the custom grammar "1|2" you are defining. Removing the type="digits" from your <field> should resolve your IVR issue:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.1">

<form id="confirmCallerID">
	<field name="confirmNumberChoice">
		<grammar type="application/x-jsgf">1|2</grammar>
		<property name="interdigittimeout" value="4s" />
		<prompt timeout="6s">If this phone number is correct, press one, if not press two.</prompt>
		<filled>
			<if cond="confirmNumberChoice==1">
				<goto next="#mainMenu"/>
			<elseif cond="confirmNumberChoice==2"/>
				<goto next="#getNumber"/>
			</if>
		</filled>
		<noinput>
			<reprompt/>
		</noinput>
		<nomatch>
			Sorry, that was not one of the choices.
			<reprompt/>
		</nomatch>
	</field>
</form>

</vxml>
Regards,
Plum Support