<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">I don't believe this is needed either as the app_readexten module<br>appears to already have this functionality hardcoded in:</p><p style="white-space: pre-wrap; word-wrap: break-word;">if (!ast_matchmore_extension(chan, arglist.context, exten, 1 /*<br>priority */,<br>S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str,<br>NULL))) {<br>if (!ast_exists_extension(chan, arglist.context, exten, 1,<br>S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str,<br>NULL))<br>&& res == '#') {<br>exten[x] = '\0';<br>}<br>break;<br>}</p><p style="white-space: pre-wrap; word-wrap: break-word;">If the extension can't match any more, and the extension doesn't<br>exist, and the last digit pressed was '#' then remove the '#' digit<br>from the extension and stop accepting digits. The subsequent code<br>then does the extension check again and sets things accordingly.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">You are wrong. You can test it by yourself.<br>exten => 100,1,Playback(hello-world)<br>exten => 1001,1,Playback(tt-monkeys)<br>exten => _011[2-9]XXXX.,1,Playback(tt-monkeys)</p><p style="white-space: pre-wrap; word-wrap: break-word;">core set debug 4 app_readexten.so</p><p style="white-space: pre-wrap; word-wrap: break-word;">Enter 01122222222#, then you can repeat '#'</p><p style="white-space: pre-wrap; word-wrap: break-word;">readexten_exec: extension so far: '', timeout: 5000<br>readexten_exec: extension so far: '0', timeout: 5000<br>readexten_exec: extension so far: '01', timeout: 5000<br>readexten_exec: extension so far: '011', timeout: 5000<br>readexten_exec: extension so far: '0112', timeout: 5000<br>readexten_exec: extension so far: '01122', timeout: 5000<br>readexten_exec: extension so far: '011222', timeout: 5000<br>readexten_exec: extension so far: '0112222', timeout: 5000<br>readexten_exec: extension so far: '01122222', timeout: 5000<br>readexten_exec: extension so far: '011222222', timeout: 5000<br>readexten_exec: extension so far: '0112222222', timeout: 5000<br>readexten_exec: extension so far: '01122222222', timeout: 5000<br>readexten_exec: extension so far: '01122222222#', timeout: 5000<br>readexten_exec: extension so far: '01122222222##', timeout: 5000<br>readexten_exec: extension so far: '01122222222###', timeout: 5000<br>readexten_exec: extension so far: '01122222222####', timeout: 5000<br>readexten_exec: extension so far: '01122222222#####', timeout: 5000<br>readexten_exec: extension so far: '01122222222######', timeout: 5000<br>readexten_exec: extension so far: '01122222222#######', timeout: 5000<br>readexten_exec: extension so far: '01122222222########', timeout: 5000</p><p style="white-space: pre-wrap; word-wrap: break-word;">When you enter 01122222222#<br>ast_matchmore_extension returns -1 and ast_exists_extension returns -1</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11387">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11387">change 11387</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/+/11387"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: If77c40c9c8b525885730821e768f5dea71cf04c1 </div>
<div style="display:none"> Gerrit-Change-Number: 11387 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: 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: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 22 May 2019 14:39:19 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>