We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

<nomatch> doesn't execute

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
sdstuder
Posts: 16
Joined: Fri Mar 18, 2005 6:38 pm

<nomatch> doesn't execute

Post by sdstuder »

Hi all,

This is type of vxml, i m running. But problem is <nomatch> is not working properly. I have given grammar to check entered value should be either 1 or 2 except these values(like 3,4,5, so on) nomatch should be executed. But on entering except 1 or 2, it doesn't go in nomatch it goes in <filled> block.

Code: Select all

<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
	<form>		
		<block>
			<assign name="nErrorCount" expr="0"/>
                        <prompt bargein="false">
				<voice name = "lauren">
					Welcome 
				</voice>
			</prompt>

		</block>

		<!--Extension -->
		<field name="sExtension" type="digits">
			<property name="confidencelevel" value="0.60"/>
			<property name="inputmodes" value="dtmf"/>

                       <prompt bargein="true">
				<voice>
					please enter the extension 
				</voice>
			</prompt>
                        
			<nomatch>
				<assign name="nErrorCount" expr="nErrorCount+1"/>
				<if cond="nErrorCount==10">
					<prompt bargein="true">
						<voice>
				I was unable to understand after ten attempts.  
				Goodbye.  
						</voice>
					</prompt>
					<disconnect/>
				<else/>
					<prompt bargein="true">
						<voice>
							I did not understand. 
						</voice>
					</prompt>
					</if>
			</nomatch>
			<noinput>
				<assign name="nErrorCount" expr="nErrorCount+1"/>
				<if cond="nErrorCount==10">
					<prompt bargein="true">
						<voice>
			After ten attempts, I was unable to understand the extension you requested.  				
							Goodbye.  
						</voice>
					</prompt>
					<disconnect/>
				<else/>
					<prompt bargein="true">
						<voice>
							I did not hear you.
						</voice>
					</prompt>
					<reprompt/>
				</if>
			</noinput>
                        <filled>
                                 <prompt bargein="true">
						<voice>
							You entered one or two
						</voice>
				</prompt>
                       </filled>   
                       <grammar>  ( yes | 1 | no | 2 ) </grammar>     
		</field>
</form>
</vxml>

Please guide to figure out what wrong is going on.

Thanking you.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR code for <nomatch> not executing

Post by support »

Hi,

The following example of IVR code should help you achieve this.

nomatchexecute.php:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
   <form>   
      <block>
         <prompt bargein="false">
            <voice name="lauren">
               Welcome
            </voice>
         </prompt>
      </block>

      <!--Extension -->
      <field name="sExtension">
         <property name="inputmodes" value="dtmf"/>

         <grammar type="application/x-jsgf" mode="dtmf">
           ( 1 | 2 )+
         </grammar>

         <prompt bargein="true">
            <voice>
               Please enter the extension
            </voice>
         </prompt>
                       
         <nomatch>
               <prompt bargein="true">
                  <voice>
                     I did not understand.
                  </voice>
               </prompt>
               <reprompt/>
         </nomatch>

         <nomatch count="10">
               <prompt bargein="true">
                  <voice>
                     I was unable to understand after ten attempts. 
                     Goodbye.  
                  </voice>
               </prompt>
               <disconnect/> 
         </nomatch>

         <noinput>
               <prompt bargein="true">
                  <voice>
                     I did not hear you. 
                  </voice>
               </prompt>
               <reprompt/>
         </noinput>

         <noinput count="10">
               <prompt bargein="true">
                  <voice>
                     After ten attempts, I was unable to understand the extension you requested.              
                     Goodbye.  
                  </voice>
               </prompt>
               <disconnect/> 
         </noinput>

         <filled>
            <prompt bargein="true">
                  <voice>
                     You entered one or two.
                  </voice>
            </prompt>
         </filled>   
   
      </field>
</form>
</vxml> 
From this IVR example, the user has to enter 1s or 2s on their phone keypad for the extension. If the user enters anything else, this will prompt a nomatch event. After 10 nomatch events have occurred, the IVR application hangs up.

Hope this helps.

Regards,
Plum Support
Last edited by support on Tue Feb 16, 2010 2:02 pm, edited 3 times in total.

sdstuder
Posts: 16
Joined: Fri Mar 18, 2005 6:38 pm

<nomatch> doesn't execute

Post by sdstuder »

Hi,

Thanks for replying.

Well, i tried this,
it didnt work.
I entered three, but instead of going into <nomatch> block it went into <filled> block.
After that, I tried to do workaround for this nomatch by changing <filled> block inside code,

Code: Select all

<vxml version="2.0">
   <form>   
      <block>
         <prompt bargein="false">
            <voice name="lauren">
               Welcome
            </voice>
         </prompt>
      </block>

      <!--Extension -->
      <field name="sExtension">
         <property name="inputmodes" value="dtmf"/>

         <grammar type="application/x-jsgf" mode="dtmf">
           ( 1 | 2 )+
         </grammar>

         <prompt bargein="true">
            <voice>
               Please enter the extension
            </voice>
         </prompt>
                       
         <nomatch>
               <prompt bargein="true">
                  <voice>
                     I did not understand.
                  </voice>
               </prompt>
               <reprompt/>
         </nomatch>

         <nomatch count="10">
               <prompt bargein="true">
                  <voice>
                     I was unable to understand after ten attempts.
                     Goodbye. 
                  </voice>
               </prompt>
               <disconnect/>
         </nomatch>

         <noinput>
               <prompt bargein="true">
                  <voice>
                     I did not hear you.
                  </voice>
               </prompt>
               <reprompt/>
         </noinput>

         <noinput count="10">
               <prompt bargein="true">
                  <voice>
                     After ten attempts, I was unable to understand the extension you requested.             
                     Goodbye. 
                  </voice>
               </prompt>
               <disconnect/>
         </noinput>

         <filled>
                        <if cond="sExtension==1 || sExtension==2">
			<prompt bargein="true">
				<voice name = "lauren">
					Please hold.
				</voice>
			</prompt>		
			<goto expr="'http://testingwebsite/RequestVxml.aspx?callernum='+session.telephone.ani+'&callednum='+session.telephone.dnis+'&voicesessionid='+session.id+'&extension='+sExtension"/>
                       <else/>
                             <prompt bargein="true">
				<voice name = "lauren">
					I did not understand. 
				</voice>
			  </prompt>
                          <reprompt/>
		     </if>
                       </filled>                        

   
      </field>
</form>
</vxml> 
 
But here, i got problem in <reprompt/>, here, if i enter 3, it goes in else block, but it doesn't take me back to prompt where extension is asked to enter, instead it hangs up call.

Please guide me, problem is stuck.

Thanking you.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Clarification of IVR code when <nomatch> doesn't exec

Post by support »

Hi,

Do you have an IVR call log that demonstrates this IVR issue? When we have entered 3 on our phone keypad with our previous IVR code, it always throws a nomatch event for us.

Also, what kind of phone are you using to enter your inputs?

We need more information to see how you are getting this IVR problem as we are unable to reproduce it from our end.

Regards,
Plum Support

Post Reply