[asterisk-dev] [Code Review] AMI - Set channel variables with setvar= when manager user originates calls

Terry Wilson reviewboard at asterisk.org
Thu Jun 14 16:17:34 CDT 2012


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


According to the discussion at http://lists.digium.com/pipermail/asterisk-dev/2011-November/052068.html Kevin was ok with this on principle. He mentioned changing the name from "setvar" to "channelvar", but since there is already a "channelvars" option that does something completely different, it might be a good idea to just leave it as is. As soon as the other issues mentioned by mjordan in his revision 3 review are taken care, along with my comments this should be good go.


/trunk/main/config.c
<https://reviewboard.asterisk.org/r/1412/#comment12214>

    This function already exists now and can be removed from the patch.



/trunk/main/manager.c
<https://reviewboard.asterisk.org/r/1412/#comment12217>

    whitespace



/trunk/main/manager.c
<https://reviewboard.asterisk.org/r/1412/#comment12218>

    Here, due to the way reloads are done, it looks like you need to check if user->chanvars exsits, if it does free the old chanvars and then do this stuff.
    
    Also, user->chanvars is never freed anywhere (session->chanvars are). Basically, whenever ast_free(user) is called, you need to first ast_variables_destroy(user->chanvars).  Someday, I imagine these linked lists will turn into ao2 containers and we will be able to use destructors for this kind of thing (and my config options api stuff).


- Terry


On Sept. 21, 2011, 4:44 a.m., Olle E Johansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1412/
> -----------------------------------------------------------
> 
> (Updated Sept. 21, 2011, 4:44 a.m.)
> 
> 
> Review request for Asterisk Developers and Tilghman Lesher.
> 
> 
> Summary
> -------
> 
> When the manager originates calls, there's no way to add channel variables. THis patch adds a setvar= option in manager.conf for a specific account, much like in sip.conf
> 
> This is different form variables in the originate in that these are set on every call, regardless of settings in the manager client software. Good for usage in combination with the manager event filters.
> 
> 
> This addresses bug 18143.
>     https://issues.asterisk.org/jira/browse/18143
> 
> 
> Diffs
> -----
> 
>   /trunk/CHANGES 336090 
>   /trunk/Makefile 336090 
>   /trunk/configs/manager.conf.sample 336090 
>   /trunk/include/asterisk/config.h 336090 
>   /trunk/main/config.c 336090 
>   /trunk/main/manager.c 336090 
> 
> Diff: https://reviewboard.asterisk.org/r/1412/diff
> 
> 
> Testing
> -------
> 
> In-house testing while developing. Channel variables added (proved by dumpchan() )
> 
> 
> Thanks,
> 
> Olle E
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120614/5119981b/attachment-0001.htm>


More information about the asterisk-dev mailing list