[Asterisk-code-review] app_readexten: new option 'p' to stop reading on '#' key (...asterisk[16])
Alexei Gradinari
asteriskteam at digium.com
Wed May 22 09:52:33 CDT 2019
Alexei Gradinari has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/11387 )
Change subject: app_readexten: new option 'p' to stop reading on '#' key
......................................................................
Patch Set 2:
> Usage of the "." pattern match at the end of the extension does
> cause this to timeout. However, when I run that example, I can
> still pattern match with "#" at the end, so there seems to just be
> an issue with the "." operator, and needs to be early terminated
> for this special case.
I think better to have a simple code
if (res == '#') {
exten[x] = 0;
break;
}
instead of more complicated and unobvious
if (!ast_matchmore_extension(chan, arglist.context, exten, 1 /* priority */,
S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
if (!ast_exists_extension(chan, arglist.context, exten, 1,
S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))
&& res == '#') {
exten[x] = '\0';
}
break;
}
But for compatibility I added a new option
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11387
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: If77c40c9c8b525885730821e768f5dea71cf04c1
Gerrit-Change-Number: 11387
Gerrit-PatchSet: 2
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Comment-Date: Wed, 22 May 2019 14:52:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190522/34c69867/attachment-0001.html>
More information about the asterisk-code-review
mailing list