dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: vxml <nomatch> tag is not executing

  1. #1
    Join Date
    Jan 2008
    Posts
    1

    vxml <nomatch> tag is not executing

    Hi all,

    This 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:
    <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.

  2. #2
    Join Date
    Jan 2010
    Posts
    3

    Re: vxml <nomatch> tag is not executing

    Hi Tarun,

    the problem you are having is because you have specified the <field> to be type="digits". This is a built-in type on most VXML IVR platforms that means that any digits can be executing. Since you specified a type, your <grammar> tag inside the field is getting completely overridden.

    For a list of common built-in field types that would be found in an IVR platform, such as the Plum Voice Hosting IVR platform, see these docs from Plum Voice:
    http://www.plumvoice.com/docs/hostin...lt-in_Grammars

    If you are trying to ask for a 1 or 2 response meaning yes or no, you may be interested in the "boolean" built-in grammar. If you want to build a fully custom grammar, you will need to remove the type attribute from your <field> and specify a complete <grammar> yourself.

    Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)