[Asterisk-code-review] func_lookup: Fork of HINT function (asterisk[master])

N A asteriskteam at digium.com
Mon Aug 2 13:23:18 CDT 2021


Attention is currently required from: George Joseph.
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 9:

(1 comment)

Patchset:

PS9: 
> > For instance, say you want to pass five lookups into an application without first saving them as v […]
If I'm understanding it right, this seems to be oriented around fetching a value from the DB and parsing it.

e.g. NoOp(${EVAL(${DB(something/1234)})})

I'm not sure I understand how this is a general dialplan value lookup tool. Say I want whatever's at priority 1 here:
exten => s,1,NoOp()
same => n,Answer

... same => n,NoOp(${LOOKUP(s at test)}) or maybe NoOp(${LOOKUP(test,s,1)})

Gosub itself has no mechanism to get dialplan values, other than using other functions. Additionally, it's designed to do something, not return a value, which makes it clunky.

Something like this being possible is more the idea: MyApp(${LOOKUP(3 at test-context)},${LOOKUP(${CALLERID(num)},something,${LOOKUP(${LOOKUP(test,s,${EPOCH})}@something-else)}).

An EVAL wrapper around DB is a bit short of the goal. If it was named ${DIALPLAN_VALUE()} perhaps the intent might be a little clearer. Just like DB gets something from AstDB, this gets something in the dialplan.



-- 
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: 9
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Sarah Autumn <sarah at endlesstemple.org>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Mon, 02 Aug 2021 18:23:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210802/deb7d445/attachment.html>


More information about the asterisk-code-review mailing list