[Asterisk-code-review] func_lookup: Fork of HINT function (asterisk[master])
N A
asteriskteam at digium.com
Mon Jul 19 17:47:33 CDT 2021
Attention is currently required from: Joshua Colp.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16075 )
Change subject: func_lookup: Fork of HINT function
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
> No, the priority number itself doesn't matter. […]
What you're saying sounds like it would work, but it also sounds like reinventing the wheel, and a big one at that.
Okay, that addresses the extensions (keys), somewhat - what about the lookups (values)? The dialplan needs to be able to handle and parse these like any other value.
I know I included a few examples with just static values, e.g.
exten => something,lookup,42
,but in practice, that's not as useful compared to things that are more dynamic. Fundamentally, it's a lookup of dialplan logic, hence why it fits so nicely in the dialplan.
It doesn't make much sense why this should be any more foreign to the dialplan than this would be:
[sub-lookup]
exten => _3XX,1,Return(42)
exten => _39X,1,Return(${SHELL(something)})
exten => _4XX,1,Return(${CURL(something)})
exten => _5XX/_50X,1,Return(999)
exten => _5XX/5XX,1,Return(888)
exten => _5XX,1,Gosub(some-other-sub,${CALLERID(num)},1)
same => n,Return(${GOSUB_RETVAL})
exten => _X!,1,Return()
It makes no less sense to include a lookup context in the dialplan than that, it's just a context, albeit more elegant to use/manage.
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16075
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Iad81019689674c9f4ac77d235f5d7234adbb1432
Gerrit-Change-Number: 16075
Gerrit-PatchSet: 4
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Sarah Autumn <sarah at endlesstemple.org>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Mon, 19 Jul 2021 22:47:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210719/d0e5d880/attachment-0001.html>
More information about the asterisk-code-review
mailing list