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

George Joseph asteriskteam at digium.com
Fri Aug 6 08:15:43 CDT 2021


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

File funcs/func_lookup.c:

https://gerrit.asterisk.org/c/asterisk/+/16075/comment/ee114729_6e6cee12 
PS9, Line 127: /* Substitute variables now, using the location of the lookup */
             : 	/* strdupa required or we'll just overwrite what we read when we set these */
             : 	realcontext = ast_strdupa(ast_channel_context(chan));
             : 	realexten = ast_strdupa(ast_channel_exten(chan));
             : 	realpriority = ast_channel_priority(chan);
             : 	ast_channel_lock(chan);
             : 	ast_channel_context_set(chan, context);
             : 	ast_channel_exten_set(chan, exten);
             : 	ast_channel_priority_set(chan, priority);
             : 	ast_channel_unlock(chan);
             : 
> I think your idea of using these special channel variables is probably most elegant. […]
Thinking more about this...  Just leave it the way you have it.  It's what other functions/apps do including Gosub.  If someone wants the original extension they can set a variable with it which is what they'd have to do today anyway.  You should leave the channel locked while you call pbx_substitute_variables_helper though.



-- 
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: N A <mail at interlinked.x10host.com>
Gerrit-Comment-Date: Fri, 06 Aug 2021 13:15:43 +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/20210806/965edabe/attachment.html>


More information about the asterisk-code-review mailing list