[asterisk-dev] [Code Review] 3854: manager.c - Improve documentation for manager command Getvar, Setvar

rnewton reviewboard at asterisk.org
Tue Jul 29 14:53:30 CDT 2014



> On July 29, 2014, 2:32 p.m., Joshua Colp wrote:
> > /branches/1.8/main/manager.c, line 207
> > <https://reviewboard.asterisk.org/r/3854/diff/1/?file=65275#file65275line207>
> >
> >     This confuses me, even after reading a few times. Specifically what you've added: "directly or via function". Dialplan functions usually don't set variables.
> >     
> >     "Set a channel variable or execute a dialplan function." is clearer
> >     
> >     Same applies for the other modifications.
> >     
> >     Thoughts?

That makes sense to me. I believe I was thinking of using CHANNEL(blah) with Setvar as setting a channel variable via a function, but I'm betting those arguments are not considered channel variables.

Could you use Setvar to just "execute a dialplan function" without assigning a value to the function? That is, can you really use Setvar to execute *any* dialplan function?

Also, would it make sense to just use the help text description from the Set application for the description of the Setvar manager command? Albeit with a few changes:

"This command can be used to set the value of channel variables or dialplan
functions. When setting variables, if the variable name is prefixed with
'_', the variable will be inherited into channels created from the current
channel. If the variable name is prefixed with '__', the variable will be
inherited into channels created from the current channel and all children
channels."


- rnewton


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3854/#review12902
-----------------------------------------------------------


On July 25, 2014, 2:20 p.m., rnewton wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3854/
> -----------------------------------------------------------
> 
> (Updated July 25, 2014, 2:20 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-21178
>     https://issues.asterisk.org/jira/browse/ASTERISK-21178
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> The documentation wasn't clear that AMI Getvar and Setvar could accept function calls.
> 
> This is a slight modification to improve clarity.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/main/manager.c 419562 
> 
> Diff: https://reviewboard.asterisk.org/r/3854/diff/
> 
> 
> Testing
> -------
> 
> Once finalized I'll build in dev-mode with it to make sure I didn't screw up any tags.
> 
> 
> Thanks,
> 
> rnewton
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140729/25910e87/attachment-0001.html>


More information about the asterisk-dev mailing list