Page 1 of 1

How to have auto hangup after repeating <nomatch> 3 times?

Posted: Mon Jan 03, 2011 11:21 pm
by sasa
Hi support,

I'm trying to make the call disconnect with <nomatch count=3>$nomatch<disconnect/></nomatch> but the xml did not form(in the code but not formed to send to plum)... Can i get some advise?

Code: Select all

<vxml version = "2.0" ><property name="inputmodes" value="dtmf"/><property name="interdigittimeout" value="5s"/><form id="getInput"><field name="pin" type="digits?minlength=7;maxlength=15"><prompt><voice name="Tom">The Pin is not being recognized<break/> please try again</voice></prompt></field><noinput>We did not receive your request<reprompt/></noinput><noinput count="3">Sorry, I can't hear you, please try you call again later. Goodbye.<disconnect/></noinput><nomatch><prompt><voice name="Tom">The Pin is not being recognized<break/> please try again</voice></prompt><reprompt/></nomatch><block><submit namelist="session.telephone.ani pin session.telephone.dnis session.id" next="vxml_plum.pl"/></block></form></vxml>
ty
sasa

Re: How to have auto hangup after repeating <nomatch> 3 time

Posted: Tue Jan 04, 2011 9:49 am
by support
Hi sasa,

To have a call disconnect after 3 nomatches, you would use code almost identical to the code used for disconnecting after 3 noinput events:

Code: Select all

<nomatch count="3">
      <prompt>
	<voice name="Tom">
	  The Pin is not being recognized
	  <break/> 
	  please try your call again later. Goodbye.
	</voice>
      </prompt>
      <disconnect/>
</nomatch>
If you put the above code into your application, you will find that it will disconnect the user after 3 nomatch events as requested.

Regards,
Plum Support