<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'>Some background information…<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'>I am using AMI to interface with Asterisk 1.6.2. <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'>With this interface, as calls come in, I have scripts built
to control call flow and interface to external applications.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'>I need to be able to play a file and collect digits at the
same time. I detect the digits via the DTMF Events on the AMI interface. I
use the Get Option command to start the play. However, I encountered a slight
timing bug. Asterisk can detect the DTMF digit at the same time our
application is sending a Get Option Command. The result is that my application
sees the digit, which is exactly as expected. When this occurs, I want to be
able to stop the play, but I have not been able to find any AMI, AGI command,
or Application to allow us to abort an existing play.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'>In the past, I have worked a few board related voice vendors
and they have used two different approaches:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'>Some vendors have an internal digit collector. When a play
is initiated, several options are passed in (# of digits to collect, clear
existing digit queue flag, timeout, etc).<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'>Other vendors provide events to notify the application when
a digit is pressed/released. In this environment, the application is
responsible for most of the work. The key feature is that provide a way for
the application to be able to stop the play.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'>Is there any way to implement either of these digit
collecting approaches using Asterisk? If not, is there some other way to get
around this problem?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'>Have a great day!<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=4 face=Arial><span style='font-size:14.0pt;
font-family:Arial'>Dan<o:p></o:p></span></font></p>
</div>
</body>
</html>