<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Jun 10, 2013 at 7:17 PM, <span dir="ltr"><<a href="mailto:Bbarron@guesswho.com" target="_blank">Bbarron@guesswho.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">We have the need to allow a * to exit the read application in addition to the # key. This will have a different meaning than the # key. I propose adding a ‘c’ option to app_read that if passed as an option will then set the READSTATUS to CANCELLED if the * key is pressed. Variable will store the data entered up till the * key pressed.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">This is my first proposed change to the asterisk source, so I am looking for some input is this is a valid feature or if it’s too specific a feature request.<u></u><u></u></p>
</div></div><br></blockquote><div><br></div><div style>Whenever you're thinking of writing a new feature, you should ask yourself: is this feature specific to my application needs, or is it useful for a lot of business needs?</div>
<div style><br></div><div style>Consider a few points:</div><div style>(1) What if I wanted the Read application to terminate whenever someone hit '0' as opposed to '*' or '#'?</div><div style>(2) What if the semantics of the user pressing '*' meant that they should be directed to an automated attendant extension, as opposed to cancelling a transaction?</div>
<div style>(3) If you have multiple digits that exit the application - beyond just * and # - do you want the READSTATUS channel variable to convey which digit was pressed? How do you map the status values back to digits?</div>
<div style><br></div><div style>I'd approach the problem a bit differently.</div><div style><br></div><div style>(1) Provide a configuration variable that allows any number of digits to be specified as terminating digits. Syntax can be c(digits).</div>
<div style>(2) If any of those digits are pressed, the READSTATUS is set to OK</div><div style>(3) If any of those digits are pressed, the READESCAPED channel variable is set to the ending digit that is pressed<br></div></div>
<br clear="all"><div style>This way, the Read application continues to adhere to its purpose: reading DTMF. Logic about what to do with that DTMF is deferred to the dialplan. Addition of the READESCAPED channel variable conveys what key was pressed to end the read sequence, allowing a dialplan writer to switch on that logic.</div>
<div style><br></div><div style>Matt</div><div style><br></div>-- <br><div dir="ltr"><div>Matthew Jordan<br></div><div>Digium, Inc. | Engineering Manager</div><div>445 Jan Davis Drive NW - Huntsville, AL 35806 - USA</div>
<div>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> & <a href="http://asterisk.org" target="_blank">http://asterisk.org</a></div></div>
</div></div>