[asterisk-dev] [Code Review]: Add xmldoc for config options, along with some CLI commands for viewing config option-related stuff - take 2

Matt Jordan reviewboard at asterisk.org
Thu Jan 24 16:11:25 CST 2013

> On Jan. 24, 2013, 1:29 p.m., Mark Michelson wrote:
> > /trunk/main/config_options.c, lines 740-741
> > <https://reviewboard.asterisk.org/r/2278/diff/1/?file=32927#file32927line740>
> >
> >     Probably need to set y to zero between these whiles

Agreed. (Interesting that this didn't blow up)

> On Jan. 24, 2013, 1:29 p.m., Mark Michelson wrote:
> > /trunk/main/config_options.c, lines 1010-1015
> > <https://reviewboard.asterisk.org/r/2278/diff/1/?file=32927#file32927line1010>
> >
> >     This seems a touch odd. Why create and destroy an iterator when you can just use ao2_container_count(xmldocs) to determine if you should even create an iterator?

Agreed, although you do use the iterator later. This should just check ao2_container_count first so that it doesn't have to create/destroy the iterator if no modules are loaded.

> On Jan. 24, 2013, 1:29 p.m., Mark Michelson wrote:
> > /trunk/main/config_options.c, lines 1018-1020
> > <https://reviewboard.asterisk.org/r/2278/diff/1/?file=32927#file32927line1018>
> >
> >     Have you tested that RAII_VAR is working like you would expect it to with these items? I have this feeling that since item is scoped to the function, it's not getting properly cleaned up after each iteration of this while loop.

Yeah, I don't think I can get away with that. Fixed.

- Matt

This is an automatically generated e-mail. To reply, visit:

On Jan. 24, 2013, 9:30 a.m., Matt Jordan wrote:
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2278/
> -----------------------------------------------------------
> (Updated Jan. 24, 2013, 9:30 a.m.)
> Review request for Asterisk Developers.
> Summary
> -------
> This is a continuation of Terry's work at https://reviewboard.asterisk.org/r/2058/.  It is pretty much the same, but with some additional cleanup that Terry noted on the review.
> * The CLI commands have been collapsed down to a single command - 'config show help'. This models itself off of the way (I think) users view configuration data - as a hierarchy of modules, types (the semantic meaning of the different context possibilities in a conf file), and the options for those types.
> * Some things move around to better separate concerns between xmldoc and config_options
> * Added default values and tied the type information to the config options
> * Lots and lots of documentation cleanup
> I have a feeling we'll find more things to tweak in this - both in terms of documentation and the things we'd like to show in the output of the CLI command. Given that this won't go into 11, we have some time for 12 to review the output of this and tweak it.
> I'm planning on writing the XSLT for the schema and push the documentation to a 'test area' on the wiki. That should help find other problems in the current documentation.
> Diffs
> -----
>   /trunk/Makefile 380042 
>   /trunk/apps/app_skel.c 380042 
>   /trunk/apps/confbridge/conf_config_parser.c 380042 
>   /trunk/channels/chan_motif.c 380042 
>   /trunk/configs/motif.conf.sample 380042 
>   /trunk/configs/xmpp.conf.sample 380042 
>   /trunk/doc/appdocsxml.dtd 380042 
>   /trunk/include/asterisk/_private.h 380042 
>   /trunk/include/asterisk/config_options.h 380042 
>   /trunk/include/asterisk/xml.h 380042 
>   /trunk/include/asterisk/xmldoc.h 380042 
>   /trunk/main/asterisk.c 380042 
>   /trunk/main/config_options.c 380042 
>   /trunk/main/named_acl.c 380042 
>   /trunk/main/udptl.c 380042 
>   /trunk/main/xml.c 380042 
>   /trunk/main/xmldoc.c 380042 
>   /trunk/res/res_xmpp.c 380042 
> Diff: https://reviewboard.asterisk.org/r/2278/diff
> Testing
> -------
> Lots of typing 'config show help'. Some sample outputs:
> *CLI> config show help
> The following modules have configuration information:
> 	udptl
> 	chan_motif
> 	app_confbridge
> 	res_xmpp
> 	app_skel
> 	named_acl
> *CLI> config show help app_confbridge 
> Conference Bridge Application
> Configuration option types for app_confbridge:
>               global: Unused, but reserved.                                           
>         user_profile: A named profile to apply to specific callers.                   
>       bridge_profile: A named profile to apply to specific bridges.                   
>                 menu: A conference user menu    
> *CLI> config show help app_confbridge user_profile
> user_profile: [category !~ /^general$/ matchfield: type = user]
> A named profile to apply to specific callers.
> Callers in a ConfBridge have a profile associated with them that determine
> their options. A configuration section is determined to be a user_profile
> when the 'type' parameter has a value of 'user'. 
>                 type: Define this configuration category as a user profile.                         
>                admin: Sets if the user is an admin or not                                           
>               marked: Sets if this is a marked user or not                                          
>           startmuted: Sets if all users should start out muted                                      
> music_on_hold_when_e: Play MOH when user is alone or waiting on a marked user                       
>                quiet: Silence enter/leave prompts and user intros for this user                     
>  announce_user_count: Sets if the number of users should be announced to the user                   
> announce_user_count_: Announce user count to all the other users when this user joins               
>   announce_only_user: Announce to a user when they join an empty conference                         
>          wait_marked: Sets if the user must wait for a marked user to enter before joining a confere
>           end_marked: Kick the user from the conference when the last marked user leaves            
> talk_detection_event: Set whether or not notifications of when a user begins and ends talking should
>     dtmf_passthrough: Sets whether or not DTMF should pass through the conference                   
>  announce_join_leave: Prompt user for their name when joining a conference and play it to the confer
>                  pin: Sets a PIN the user must enter before joining the conference                  
>  music_on_hold_class: The MOH class to use for this user                                            
>         announcement: Sound file to play to the user when they join a conference                    
>              denoise: Apply a denoise filter to the audio before mixing                             
>     dsp_drop_silence: Drop what Asterisk detects as silence from audio sent to the bridge           
> dsp_silence_threshol: The number ofmilliseconds of detected silence necessary to trigger silence det
> dsp_talking_threshol: The number of milliseconds of detected non-silence necessary to triger talk de
>         jitterbuffer: Place a jitter buffer on the user's audio stream before audio mixing is perfor
>             template: When using the CONFBRIDGE dialplan function, use a user profile as a template
> *CLI> config show help app_confbridge user_profile dsp_silence_threshold 
> [user_profile]
> dsp_silence_threshold = [Unsigned Integer] (Default: 2500) (Regex: false)
> The number of milliseconds of detected silence necessary to trigger silence
> detection
>  The time in milliseconds of sound falling within the what the dsp has
> established as baseline silence before a user is considered be silent.  This
> value affects several operations and should not be changed unless the impact
> on call quality is fully understood.
> What this value affects internally:
>  1. When talk detection AMI events are enabled, this value determines when
>  the user has stopped talking after a period of talking.  If this value is
>  set too low AMI events indicating the user has stopped talking may get falsely
>  sent out when the user briefly pauses during mid sentence. 
>  2. The drop_silence option depends on this value to determine when the
>  user's audio should begin to be dropped from the conference bridge after
>  the user stops talking.  If this value is set too low the user's audio stream
>  may sound choppy to the other participants. This is caused by the user
>  transitioning constantly from silence to talking during mid sentence. 
>  The best way to approach this option is to set it slightly above the maximum
>  amount of ms of silence a user may generate during natural speech. 
> By default this value is 2500ms. Valid values are 1 through 2^31.
> Thanks,
> Matt

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

More information about the asterisk-dev mailing list