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

Olle E Johansson oej at edvina.net
Sat Oct 3 06:36:57 CDT 2009


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


Comments after playing around with this code:

- I think we should rename ast_channel_manager_event to ast_manager_channel_event since ast_channel is used for more channel specific functions and we could very well start using ast_manager for manager API.

- You always assume that we have two channels and call append_channel_variables on both, even though one of them frequently is a NULL. In my backport I added a check for null channels before calling the append function.

- Olle E


On 2009-09-28 17:41:15, Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/368/
> -----------------------------------------------------------
> 
> (Updated 2009-09-28 17:41:15)
> 
> 
> 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_meetme.c 220768 
>   /trunk/apps/app_minivm.c 220768 
>   /trunk/apps/app_queue.c 220768 
>   /trunk/apps/app_voicemail.c 220768 
>   /trunk/channels/chan_iax2.c 220768 
>   /trunk/channels/chan_sip.c 220768 
>   /trunk/configs/manager.conf.sample 220768 
>   /trunk/include/asterisk/manager.h 220768 
>   /trunk/main/cdr.c 220768 
>   /trunk/main/channel.c 220768 
>   /trunk/main/features.c 220768 
>   /trunk/main/manager.c 220768 
>   /trunk/res/res_monitor.c 220768 
>   /trunk/res/res_musiconhold.c 220768 
>   /trunk/apps/app_chanspy.c 220768 
>   /trunk/apps/app_dial.c 220768 
>   /trunk/apps/app_fax.c 220768 
> 
> 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