<p>Friendly Automation <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11402">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Benjamin Keith Ford: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_readexten: new option 'p' to stop reading on '#' key<br><br>This patch adds the 'p' option.<br>The extension entered will be considered complete when a # is entered.<br><br>Change-Id: If77c40c9c8b525885730821e768f5dea71cf04c1<br>---<br>M apps/app_readexten.c<br>A doc/CHANGES-staging/app_readexten_pound.txt<br>2 files changed, 14 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_readexten.c b/apps/app_readexten.c</span><br><span>index fbb290c..a809f92 100644</span><br><span>--- a/apps/app_readexten.c</span><br><span>+++ b/apps/app_readexten.c</span><br><span>@@ -65,6 +65,10 @@</span><br><span> <option name="n"></span><br><span> <para>Read digits even if the channel is not answered.</para></span><br><span> </option></span><br><span style="color: hsl(120, 100%, 40%);">+ <option name="p"></span><br><span style="color: hsl(120, 100%, 40%);">+ <para>The extension entered will be considered complete when a <literal>#</literal></span><br><span style="color: hsl(120, 100%, 40%);">+ is entered.</para></span><br><span style="color: hsl(120, 100%, 40%);">+ </option></span><br><span> </optionlist></span><br><span> </parameter></span><br><span> <parameter name="timeout"></span><br><span>@@ -102,12 +106,14 @@</span><br><span> OPT_SKIP = (1 << 0),</span><br><span> OPT_INDICATION = (1 << 1),</span><br><span> OPT_NOANSWER = (1 << 2),</span><br><span style="color: hsl(120, 100%, 40%);">+ OPT_POUND_TO_END = (1 << 3),</span><br><span> };</span><br><span> </span><br><span> AST_APP_OPTIONS(readexten_app_options, {</span><br><span> AST_APP_OPTION('s', OPT_SKIP),</span><br><span> AST_APP_OPTION('i', OPT_INDICATION),</span><br><span> AST_APP_OPTION('n', OPT_NOANSWER),</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_APP_OPTION('p', OPT_POUND_TO_END),</span><br><span> });</span><br><span> </span><br><span> static char *app = "ReadExten";</span><br><span>@@ -228,6 +234,11 @@</span><br><span> break;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_test_flag(&flags, OPT_POUND_TO_END) && res == '#') {</span><br><span style="color: hsl(120, 100%, 40%);">+ exten[x] = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ break;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> exten[x] = res;</span><br><span> if (!ast_matchmore_extension(chan, arglist.context, exten, 1 /* priority */,</span><br><span> S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {</span><br><span>diff --git a/doc/CHANGES-staging/app_readexten_pound.txt b/doc/CHANGES-staging/app_readexten_pound.txt</span><br><span>new file mode 100644</span><br><span>index 0000000..551f751</span><br><span>--- /dev/null</span><br><span>+++ b/doc/CHANGES-staging/app_readexten_pound.txt</span><br><span>@@ -0,0 +1,3 @@</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: ReadExten</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Add 'p' option to stop reading extension if user presses '#' key.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11402">change 11402</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11402"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: If77c40c9c8b525885730821e768f5dea71cf04c1 </div>
<div style="display:none"> Gerrit-Change-Number: 11402 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>