<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"
xmlns:ns0="http://schemas.microsoft.com/office/2004/12/omml">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--a:link
        {mso-style-priority:99;}
span.MSOHYPERLINK
        {mso-style-priority:99;}
a:visited
        {mso-style-priority:99;}
span.MSOHYPERLINKFOLLOWED
        {mso-style-priority:99;}
p.MSOACETATE
        {mso-style-priority:99;}
li.MSOACETATE
        {mso-style-priority:99;}
div.MSOACETATE
        {mso-style-priority:99;}
span.BALLOONTEXTCHAR
        {mso-style-priority:99;}

 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Gill Sans MT";}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:Calibri;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:Tahoma;}
span.BalloonTextChar
        {font-family:Tahoma;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Gill Sans MT";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Use read with one digit.&nbsp; If you want
a specific digit, test for it like this<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt; s,1(readacct),Read(digitacc,record/enteracct,1,skip,1,5])<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt;
s,n,Gotoif($[&quot;${LEN(${digitacc})}&quot; &gt; &quot;1&quot;]?readacct)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>exten =&gt; s,n,Gotoif($[&quot;${digitacc}&quot;
!= &quot;5&quot;]?readacct)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>This instance &#8220;loops&#8221; until 5
is pressed.<o:p></o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt;font-family:"Times New Roman"'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Bharath B. Reddy Bynagari<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, August 31, 2009 8:27
AM<br>
<b><span style='font-weight:bold'>To:</span></b>
asterisk-users@lists.digium.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> [asterisk-users] How to
stop IVR once system receives DTMF?</span></font><font size=3
face="Times New Roman"><span style='font-size:12.0pt;font-family:"Times New Roman"'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Gill Sans MT"><span style='font-size:
10.0pt;font-family:"Gill Sans MT"'>Hi,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Gill Sans MT"><span style='font-size:
10.0pt;font-family:"Gill Sans MT"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Gill Sans MT"><span style='font-size:
10.0pt;font-family:"Gill Sans MT"'>We are trying to implement a complex
business logic in Asterisk. Executing &#8220;Wait_For_Digit&#8221; command
after playing IVR. We want to stop the IVR once we receive the digit. It is not
recognizing the Digit until it completes the IVR. How can we stop the IVR once
we receive the digit?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Gill Sans MT"><span style='font-size:
10.0pt;font-family:"Gill Sans MT"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Gill Sans MT"><span style='font-size:
10.0pt;font-family:"Gill Sans MT"'>Thanks <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Gill Sans MT"><span style='font-size:
10.0pt;font-family:"Gill Sans MT"'>BB<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Calibri><span style='font-size:11.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>