[asterisk-dev] [Code Review] AST-33: Create a list of channel variables to be posted within AMI call events

Russell Bryant russell at digium.com
Fri Nov 13 16:14:56 CST 2009



> On 2009-11-13 14:38:12, Tilghman Lesher wrote:
> > /trunk/main/manager.c, line 5632
> > <https://reviewboard.asterisk.org/r/368/diff/4/?file=7495#file7495line5632>
> >
> >     Considering where it's located, I don't think we're likely to run out of stack here.  There are many other places in manager.c which I would attack first, if that was a problem.  astman_get_variables() in particular is a big offender, with ast_strdupa() within a nested loop.

I don't think poor existing code is an argument to lower the bar on quality of new code.


- Russell


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


On 2009-11-12 13:09:51, Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/368/
> -----------------------------------------------------------
> 
> (Updated 2009-11-12 13:09:51)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> The intent of this patch is to post various variables from a related channel, when posting certain call-related events to the manager interface.
> 
> For example, the following manager.conf entry:
> 
> channelvars=SV_OWNER,SV_PEER,DISPLAY_URL
> 
> will result in the following manager output for a Newstate event:
> 
> Event: Newstate
> Privilege: call,all
> Channel: SIP/200-08b75888
> State: Up
> CallerID: 200
> CallerIDName: Snom Phone
> Uniqueid: 1209084781.0
> ChanVariable(SIP/123-0123abcd): SV_OWNER=a1101
> ChanVariable(SIP/123-0123abcd): SV_PEER=a1116
> ChanVariable(SIP/123-0123abcd): DISPLAY_URL=
> 
> For Link events, you'll also see ChanVariable-type entries for the
> corresponding bridged channel.
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_chanspy.c 229360 
>   /trunk/apps/app_dial.c 229360 
>   /trunk/apps/app_fax.c 229360 
>   /trunk/apps/app_meetme.c 229360 
>   /trunk/apps/app_minivm.c 229360 
>   /trunk/apps/app_queue.c 229360 
>   /trunk/apps/app_voicemail.c 229360 
>   /trunk/channels/chan_iax2.c 229360 
>   /trunk/channels/chan_sip.c 229360 
>   /trunk/configs/manager.conf.sample 229360 
>   /trunk/include/asterisk/manager.h 229360 
>   /trunk/main/cdr.c 229360 
>   /trunk/main/channel.c 229360 
>   /trunk/main/features.c 229360 
>   /trunk/main/manager.c 229360 
>   /trunk/res/res_monitor.c 229360 
>   /trunk/res/res_musiconhold.c 229360 
> 
> Diff: https://reviewboard.asterisk.org/r/368/diff
> 
> 
> Testing
> -------
> 
> Tested with no channel variables, 2 variables, and 4 variables, combinations of both regular variables and dialplan functions.
> 
> 
> Thanks,
> 
> Tilghman
> 
>




More information about the asterisk-dev mailing list