[svn-commits] twilson: branch group/aco_xmldocs r373968 - in /team/group/aco_xmldocs: ./ ap...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Sep 27 17:44:00 CDT 2012


Author: twilson
Date: Thu Sep 27 17:43:56 2012
New Revision: 373968

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373968
Log:
Fix some bugs, add docs for udptl, named_acl, and app_confbridge.

The format of descriptions via 'config show' needs to be re-worked to be similar
to how 'core show function' and the like work. Right now I'm just trying to get
some info in to start with so that there won't be horrible errors strewn across
the screen due to lack of documentation. Next up, res_xmpp and chan_motif.

Modified:
    team/group/aco_xmldocs/Makefile
    team/group/aco_xmldocs/apps/confbridge/conf_config_parser.c
    team/group/aco_xmldocs/doc/appdocsxml.dtd
    team/group/aco_xmldocs/include/asterisk/config_options.h
    team/group/aco_xmldocs/main/config_options.c
    team/group/aco_xmldocs/main/named_acl.c
    team/group/aco_xmldocs/main/udptl.c
    team/group/aco_xmldocs/main/xmldoc.c

Modified: team/group/aco_xmldocs/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/group/aco_xmldocs/Makefile?view=diff&rev=373968&r1=373967&r2=373968
==============================================================================
--- team/group/aco_xmldocs/Makefile (original)
+++ team/group/aco_xmldocs/Makefile Thu Sep 27 17:43:56 2012
@@ -470,21 +470,21 @@
 	done
 	$(MAKE) -C sounds install
 
-doc/core-en_US.xml: $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
+doc/core-en_US.xml: $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -r -l --include *.c --include *.cc "language=\"en_US\"" $(dir) 2>/dev/null))
 	@printf "Building Documentation For: "
 	@echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@
 	@echo "<!DOCTYPE docs SYSTEM \"appdocsxml.dtd\">" >> $@
 	@echo "<docs xmlns:xi=\"http://www.w3.org/2001/XInclude\">" >> $@
 	@for x in $(MOD_SUBDIRS); do \
 		printf "$$x " ; \
-		for i in $$x/*.c; do \
+		for i in `find $$x -name *.c`; do \
 			$(AWK) -f build_tools/get_documentation $$i >> $@ ; \
 		done ; \
 	done
 	@echo
 	@echo "</docs>" >> $@
 
-doc/full-en_US.xml: $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -l "language=\"en_US\"" $(dir)/*.c $(dir)/*.cc 2>/dev/null))
+doc/full-en_US.xml: $(foreach dir,$(MOD_SUBDIRS),$(shell $(GREP) -r -l --include *.c --include *.cc "language=\"en_US\"" $(dir) 2>/dev/null))
 ifeq ($(PYTHON),:)
 	@echo "--------------------------------------------------------------------------"
 	@echo "---        Please install python to build full documentation           ---"

Modified: team/group/aco_xmldocs/apps/confbridge/conf_config_parser.c
URL: http://svnview.digium.com/svn/asterisk/team/group/aco_xmldocs/apps/confbridge/conf_config_parser.c?view=diff&rev=373968&r1=373967&r2=373968
==============================================================================
--- team/group/aco_xmldocs/apps/confbridge/conf_config_parser.c (original)
+++ team/group/aco_xmldocs/apps/confbridge/conf_config_parser.c Thu Sep 27 17:43:56 2012
@@ -40,6 +40,403 @@
 #include "asterisk/stringfields.h"
 #include "asterisk/pbx.h"
 
+
+/*** DOCUMENTATION
+	<configInfo name="app_confbridge" language="en_US">
+		<configFile name="confbridge.conf">
+			<configObject name="global">
+				<synopsis>Unused, but reserved</synopsis>
+			</configObject>
+			<configObject name="user_profile">
+				<synopsis>A named profile to apply to specific callers</synopsis>
+				<configOption name="type">
+					<synopsis>Define this configuration category as a user profile</synopsis>
+				</configOption>
+				<configOption name="admin" default="no">
+					<synopsis>Sets if the user is an admin or not</synopsis>
+				</configOption>
+				<configOption name="marked" default="no">
+					<synopsis>Sets if this is a marked user or not</synopsis>
+				</configOption>
+				<configOption name="startmuted" default="no">
+					<synopsis>Sets if all users should start out muted</synopsis>
+				</configOption>
+				<configOption name="music_on_hold_when_empty" default="no">
+					<synopsis>Play MOH when user is alone or waiting on a marked user</synopsis>
+				</configOption>
+				<configOption name="quiet" default="no">
+					<synopsis>Silence enter/leave prompts and user intros for this user</synopsis>
+				</configOption>
+				<configOption name="announce_user_count" default="no">
+					<synopsis>Sets if the number of users should be announced to the user</synopsis>
+				</configOption>
+				<configOption name="announce_user_count_all" default="no">
+					<synopsis>Announce user count to all the other users when this user joins</synopsis>
+					<description><para>Sets if the number of users should be announced to all the other users
+						in the conference when this user joins. This option can be either set to 'yes' or
+						a number. When set to a number, the announcement will only occur once the user
+						count is above the specified number.
+					</para></description>
+				</configOption>
+				<configOption name="announce_only_user" default="yes">
+					<synopsis>Announce to a user when they join an empty conference</synopsis>
+				</configOption>
+				<configOption name="wait_marked" default="no">
+					<synopsis>Sets if the user must wait for a marked user to enter before joining a conference</synopsis>
+				</configOption>
+				<configOption name="end_marked" default="no">
+					<synopsis>Kick the user from the conference when the last marked user leaves</synopsis>
+				</configOption>
+				<configOption name="talk_detection_events" default="no">
+					<synopsis>Set whether or not notifications of when a user begins and ends talking should be sent out as events over AMI</synopsis>
+				</configOption>
+				<configOption name="dtmf_passthrough" default="no">
+					<synopsis>Sets whether or not DTMF should pass through the conference</synopsis>
+				</configOption>
+				<configOption name="announce_join_leave" default="no">
+					<synopsis>Prompt user for their name when joining a conference and play it to the conference when they enter</synopsis>
+				</configOption>
+				<configOption name="pin">
+					<synopsis>Sets a PIN the user must enter before joining the conference</synopsis>
+				</configOption>
+				<configOption name="music_on_hold_class">
+					<synopsis>The MOH class to use for this user</synopsis>
+				</configOption>
+				<configOption name="announcement">
+					<synopsis>Sound file to play to the user when they join a conference</synopsis>
+				</configOption>
+				<configOption name="denoise" default="no">
+					<synopsis>Apply a denoise filter to the audio before mixing</synopsis>
+					<description><para>Sets whether or not a denoise filter should be applied
+						to the audio before mixing or not.  Off by default. Requires
+						codec_speex to be built and installed.  Do not confuse this option
+						with drop_silence.  Denoise is useful if there is a lot of background
+						noise for a user as it attempts to remove the noise while preserving
+						the speech.  This option does NOT remove silence from being mixed into
+						the conference and does come at the cost of a slight performance hit.
+					</para></description>
+				</configOption>
+				<configOption name="dsp_drop_silence">
+					<synopsis>Drop what Asterisk detects as silence from audio sent to the bridge</synopsis>
+					<description><para>
+						This option drops what Asterisk detects as silence from
+						entering into the bridge.  Enabling this option will drastically
+						improve performance and help remove the buildup of background
+						noise from the conference. Highly recommended for large conferences
+						due to its performance enhancements.
+					</para></description>
+				</configOption>
+				<configOption name="dsp_silence_threshold" default="2500">
+					<synopsis>The number ofmilliseconds of detected silence necessary to trigger silence detection</synopsis>
+					<description><para>
+						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
+					</para></description>
+				</configOption>
+				<configOption name="dsp_talking_threshold" default="60">
+					<synopsis>The number of milliseconds of detected non-silence necessary to triger talk detection</synopsis>
+					<description><para>
+						The time in milliseconds of sound above what the dsp has
+						established as base line silence for a user before a user
+						is considered to be talking.  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. Audio is only mixed out of a user's incoming audio stream
+						   if talking is detected.  If this value is set too
+						   loose the user will hear themselves briefly each
+						   time they begin talking until the dsp has time to
+						   establish that they are in fact talking.
+						2. When talk detection AMI events are enabled, this value 
+						   determines when talking has begun which results in
+						   an AMI event to fire.  If this value is set too tight
+						   AMI events may be falsely triggered by variants in
+						   room noise.
+						3. The drop_silence option depends on this value to determine
+						   when the user's audio should be mixed into the bridge
+						   after periods of silence.  If this value is too loose
+						   the beginning of a user's speech will get cut off as they
+						   transition from silence to talking.
+
+						By default this value is 160 ms. Valid values are 1 through 2^31
+					</para></description>
+				</configOption>
+				<configOption name="jitterbuffer" default="no">
+					<synopsis>Place a jitter buffer on the user's audio stream before audio mixing is performed</synopsis>
+					<description><para>
+						Enabling this option places a jitterbuffer on the user's audio stream
+						before audio mixing is performed.  This is highly recommended but will
+						add a slight delay to the audio.  This option is using the JITTERBUFFER
+						dialplan function's default adaptive jitterbuffer.  For a more fine tuned
+						jitterbuffer, disable this option and use the JITTERBUFFER dialplan function
+						on the user before entering the ConfBridge application.
+					</para></description>
+				</configOption>
+				<configOption name="template">
+					<synopsis>When using the CONFBRIDGE dialplan function, use a user profile as a template for creating a new temporary profile</synopsis>
+				</configOption>
+			</configObject>
+			<configObject name="bridge_profile">
+				<configOption name="type">
+					<synopsis>Define this configuration category as a bridge profile</synopsis>
+				</configOption>
+				<configOption name="jitterbuffer" default="no">
+					<synopsis>Place a jitter buffer on the conference's audio stream</synopsis>
+				</configOption>
+				<configOption name="internal_sample_rate" default="auto">
+					<synopsis>Set the internal native sample rate for mixing the conference</synopsis>
+					<description><para>
+						Sets the internal native sample rate the
+						conference is mixed at.  This is set to automatically
+						adjust the sample rate to the best quality by default.
+						Other values can be anything from 8000-192000.  If a
+						sample rate is set that Asterisk does not support, the
+						closest sample rate Asterisk does support to the one requested
+						will be used.
+					</para></description>
+				</configOption>
+				<configOption name="mixing_interval" default="20">
+					<synopsis>Sets the internal mixing interval in milliseconds for the bridge</synopsis>
+					<description><para>
+						Sets the internal mixing interval in milliseconds for the bridge.  This
+						number reflects how tight or loose the mixing will be for the conference.
+						In order to improve performance a larger mixing interval such as 40ms may
+						be chosen.  Using a larger mixing interval comes at the cost of introducing
+						larger amounts of delay into the bridge.  Valid values here are 10, 20, 40,
+						or 80.
+					</para></description>
+				</configOption>
+				<configOption name="record_conference" default="no">
+					<synopsis>Record the conference starting with the first active user's entrance and ending with the last active user's exit</synopsis>
+					<description><para>
+						Records the conference call starting when the first user
+						enters the room, and ending when the last user exits the room.
+						The default recorded filename is
+						'confbridge-${name of conference bridge}-${start time}.wav
+						and the default format is 8khz slinear.  This file will be
+						located in the configured monitoring directory in asterisk.conf.
+					</para></description>
+				</configOption>
+				<configOption name="record_file" default="confbridge-${name of conference bridge}-${start time}.wav">
+					<synopsis>The filename of the conference recording</synopsis>
+					<description><para>
+						When record_conference is set to yes, the specific name of the
+						record file can be set using this option.  Note that since multiple
+						conferences may use the same bridge profile, this may cause issues
+						depending on the configuration.  It is recommended to only use this
+						option dynamically with the CONFBRIDGE() dialplan function. This
+						allows the record name to be specified and a unique name to be chosen.
+						By default, the record_file is stored in Asterisk's spool/monitor directory
+						with a unique filename starting with the 'confbridge' prefix.
+					</para></description>
+				</configOption>
+				<configOption name="video_mode">
+					<synopsis>Sets how confbridge handles video distribution to the conference participants</synopsis>
+					<description><para>
+						Sets how confbridge handles video distribution to the conference participants.
+						Note that participants wanting to view and be the source of a video feed
+						_MUST_ be sharing the same video codec.  Also, using video in conjunction with
+						with the jitterbuffer currently results in the audio being slightly out of sync
+						with the video.  This is a result of the jitterbuffer only working on the audio
+						stream.  It is recommended to disable the jitterbuffer when video is used.
+
+						--- MODES ---
+						none: No video sources are set by default in the conference. It is still
+							  possible for a user to be set as a video source via AMI or DTMF action
+							  at any time.
+
+						follow_talker: The video feed will follow whoever is talking and providing video.
+
+						last_marked: The last marked user to join the conference with video capabilities
+									 will be the single source of video distributed to all participants.
+									 If multiple marked users are capable of video, the last one to join
+									 is always the source, when that user leaves it goes to the one who
+									 joined before them.
+
+						first_marked: The first marked user to join the conference with video capabilities
+									  is the single source of video distribution among all participants. If
+									  that user leaves, the marked user to join after them becomes the source.
+					</para></description>
+				</configOption>
+				<configOption name="max_members">
+					<synopsis>Limit the maximum number of participants for a single conference</synopsis>
+					<description><para>
+						This option limits the number of participants for a single
+						conference to a specific number.  By default conferences
+						have no participant limit. After the limit is reached, the
+						conference will be locked until someone leaves.  Note however
+						that an Admin user will always be alowed to join the conference
+						regardless if this limit is reached or not.
+					</para></description>
+				</configOption>
+				<configOption name="^sound_" regex="true">
+					<synopsis>Override the various conference bridge sound files</synopsis>
+					<description><para>
+						All sounds in the conference are customizable using the bridge profile options below.
+						Simply state the option followed by the filename or full path of the filename after
+						the option.  Example: sound_had_joined=conf-hasjoin  This will play the conf-hasjoin
+						sound file found in the sounds directory when announcing someone's name is joining the
+						conference.
+
+						sound_join       : The sound played to everyone when someone enters the conference.
+						sound_leave      : The sound played to everyone when someone leaves the conference.
+						sound_has_joined : The sound played before announcing someone's name has
+										   joined the conference. This is used for user intros.
+										   Example "_____ has joined the conference"
+						sound_has_left   : The sound played when announcing someone's name has
+										   left the conference. This is used for user intros.
+										   Example "_____ has left the conference"
+						sound_kicked     : The sound played to a user who has been kicked from the conference.
+						sound_muted      : The sound played when the mute option it toggled on.
+						sound_unmuted    : The sound played when the mute option it toggled off.
+						sound_only_person: The sound played when the user is the only person in the conference.
+						sound_only_one   : The sound played to a user when there is only one other
+										   person is in the conference.
+						sound_there_are  : The sound played when announcing how many users there
+										   are in a conference.
+						sound_other_in_party : This file is used in conjunction with 'sound_there_are"
+											   when announcing how many users there are in the conference.
+											   The sounds are stringed together like this.
+											   "sound_there_are" ${number of participants} "sound_other_in_party"
+						sound_place_into_conference : The sound played when someone is placed into the conference
+													  after waiting for a marked user.
+						sound_wait_for_leader : The sound played when a user is placed into a conference that
+												 can not start until a marked user enters.
+						sound_leader_has_left : The sound played when the last marked user leaves the conference.
+						sound_get_pin     : The sound played when prompting for a conference pin number.
+						sound_invalid_pin : The sound played when an invalid pin is entered too many times.
+						sound_locked      : The sound played to a user trying to join a locked conference.
+						sound_locked_now  : The sound played to an admin after toggling the conference to locked mode.
+						sound_unlocked_now: The sound played to an admin after toggling the conference to unlocked mode.
+						sound_error_menu  : The sound played when an invalid menu option is entered.
+					</para></description>
+				</configOption>
+				<configOption name="template">
+					<synopsis>When using the CONFBRIDGE dialplan function, use a bridge profile as a template for creating a new temporary profile</synopsis>
+				</configOption>
+			</configObject>
+			<configObject name="menu">
+				<configOption name="type">
+					<synopsis>Define this configuration category as a menu</synopsis>
+				</configOption>
+				<configOption name="^[0-9A-D*#]+$">
+					<synopsis>DTMF sequences to assign various confbridge actions to</synopsis>
+					<description><para>
+--- ConfBridge Menu Options ---
+The ConfBridge application also has the ability to apply custom DTMF menus to
+each channel using the application.  Like the User and Bridge profiles a menu
+is passed in to ConfBridge as an argument in the dialplan.
+
+Below is a list of menu actions that can be assigned to a DTMF sequence.
+
+A single DTMF sequence can have multiple actions associated with it. This is
+accomplished by stringing the actions together and using a ',' as the
+delimiter.  Example:  Both listening and talking volume is reset when '5' is
+pressed.  5=reset_talking_volume, reset_listening_volume
+
+playback(filename&amp;filename2&amp;...)
+                                     ; Playback will play back an audio file to a channel
+                                     ; and then immediately return to the conference.
+                                     ; This file can not be interupted by DTMF.
+                                     ; Mutliple files can be chained together using the
+                                     ; '&amp;' character.
+playback_and_continue(filename&amp;filename2&amp;...)
+                                     ; playback_and_continue will
+                                     ; play back a prompt while continuing to
+                                     ; collect the dtmf sequence.  This is useful
+                                     ; when using a menu prompt that describes all
+                                     ; the menu options.  Note however that any DTMF
+                                     ; during this action will terminate the prompts
+                                     ; playback.  Prompt files can be chained together
+                                     ; using the '&amp;' character as a delimiter.
+toggle_mute      ; Toggle turning on and off mute.  Mute will make the user silent
+                 ; to everyone else, but the user will still be able to listen in.
+                 ; continue to collect the dtmf sequence.
+no_op ; This action does nothing (No Operation). Its only real purpose exists for
+      ; being able to reserve a sequence in the config as a menu exit sequence.
+decrease_listening_volume ; Decreases the channel's listening volume.
+increase_listening_volume ; Increases the channel's listening volume.
+reset_listening_volume    ; Reset channel's listening volume to default level.
+
+decrease_talking_volume ; Decreases the channel's talking volume.
+increase_talking_volume ; Icreases the channel's talking volume.
+reset_talking_volume    ; Reset channel's talking volume to default level.
+
+dialplan_exec(context,exten,priority)  ; The dialplan_exec action allows a user
+                                       ; to escape from the conference and execute
+                                       ; commands in the dialplan.  Once the dialplan
+                                       ; exits the user will be put back into the
+                                       ; conference.  The possibilities are endless!
+leave_conference ; This action allows a user to exit the conference and continue
+                 ; execution in the dialplan.
+
+admin_kick_last  ; This action allows an Admin to kick the last participant from the
+                 ; conference. This action will only work for admins which allows
+                 ; a single menu to be used for both users and admins.
+
+admin_toggle_conference_lock ; This action allows an Admin to toggle locking and
+                             ; unlocking the conference.  Non admins can not use
+                             ; this action even if it is in their menu.
+
+set_as_single_video_src   ; This action allows any user to set themselves as the
+                          ; single video source distributed to all participants.
+                          ; This will make the video feed stick to them regardless
+                          ; of what the video_mode is set to.
+
+release_as_single_video_src ; This action allows a user to release themselves as
+                            ; the video source.  If video_mode is not set to "none"
+                            ; this action will result in the conference returning to
+                            ; whatever video mode the bridge profile is using.
+                            ;
+                            ; Note that this action will have no effect if the user
+                            ; is not currently the video source.  Also, the user is
+                            ; not guaranteed by using this action that they will not
+                            ; become the video source again.  The bridge will return
+                            ; to whatever operation the video_mode option is set to
+                            ; upon release of the video src.
+
+admin_toggle_mute_participants ; This action allows an administrator to toggle the mute
+                               ; state for all non-admins within a conference.  All
+                               ; admin users are unaffected by this option.  Note that all
+                               ; users, regardless of their admin status, are notified
+                               ; that the conference is muted.
+
+participant_count        ; This action plays back the number of participants currently
+                         ; in a conference
+					</para></description>
+				</configOption>
+			</configObject>
+		</configFile>
+	</configInfo>
+***/
+
 struct confbridge_cfg {
 	struct ao2_container *bridge_profiles;
 	struct ao2_container *user_profiles;
@@ -81,6 +478,7 @@
 
 static struct aco_type bridge_type = {
 	.type = ACO_ITEM,
+	.name = "bridge_profile",
 	.category_match = ACO_BLACKLIST,
 	.category = "^general$",
 	.matchfield = "type",
@@ -117,6 +515,7 @@
 
 static struct aco_type user_type = {
 	.type = ACO_ITEM,
+	.name  = "user_profile",
 	.category_match = ACO_BLACKLIST,
 	.category = "^general$",
 	.matchfield = "type",
@@ -147,6 +546,7 @@
 
 static struct aco_type menu_type = {
 	.type = ACO_ITEM,
+	.name = "menu",
 	.category_match = ACO_BLACKLIST,
 	.category = "^general$",
 	.matchfield = "type",
@@ -164,6 +564,7 @@
 /* The general category is reserved, but unused */
 static struct aco_type general_type = {
 	.type = ACO_GLOBAL,
+	.name = "global",
 	.category_match = ACO_WHITELIST,
 	.category = "^general$",
 };
@@ -1263,8 +1664,6 @@
 
 	/* User options */
 	aco_option_register(&cfg_info, "type", ACO_EXACT, user_types, NULL, OPT_NOOP_T, 0, 0);
-	aco_option_register(&cfg_info, "type", ACO_EXACT, bridge_types, NULL, OPT_NOOP_T, 0, 0);
-	aco_option_register(&cfg_info, "type", ACO_EXACT, menu_types, NULL, OPT_NOOP_T, 0, 0);
 	aco_option_register(&cfg_info, "admin", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_ADMIN);
 	aco_option_register(&cfg_info, "marked", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_MARKEDUSER);
 	aco_option_register(&cfg_info, "startmuted", ACO_EXACT, user_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct user_profile, flags), USER_OPT_STARTMUTED);
@@ -1291,6 +1690,7 @@
 	aco_option_register_custom(&cfg_info, "template", ACO_EXACT, user_types, NULL, user_template_handler, 0);
 
 	/* Bridge options */
+	aco_option_register(&cfg_info, "type", ACO_EXACT, bridge_types, NULL, OPT_NOOP_T, 0, 0);
 	aco_option_register(&cfg_info, "jitterbuffer", ACO_EXACT, bridge_types, "no", OPT_BOOLFLAG_T, 1, FLDSET(struct bridge_profile, flags), USER_OPT_JITTERBUFFER);
 	/* "auto" will fail to parse as a uint, but we use PARSE_DEFAULT to set the value to 0 in that case, which is the value that auto resolves to */
 	aco_option_register(&cfg_info, "internal_sample_rate", ACO_EXACT, bridge_types, "0", OPT_UINT_T, PARSE_DEFAULT, FLDSET(struct bridge_profile, internal_sample_rate), 0);
@@ -1304,6 +1704,7 @@
 	aco_option_register_custom(&cfg_info, "template", ACO_EXACT, bridge_types, NULL, bridge_template_handler, 0);
 
 	/* Menu options */
+	aco_option_register(&cfg_info, "type", ACO_EXACT, menu_types, NULL, OPT_NOOP_T, 0, 0);
 	aco_option_register_custom(&cfg_info, "^[0-9A-D*#]+$", ACO_REGEX, menu_types, NULL, menu_option_handler, 0);
 
 	if (aco_process_config(&cfg_info, reload) == ACO_PROCESS_ERROR) {

Modified: team/group/aco_xmldocs/doc/appdocsxml.dtd
URL: http://svnview.digium.com/svn/asterisk/team/group/aco_xmldocs/doc/appdocsxml.dtd?view=diff&rev=373968&r1=373967&r2=373968
==============================================================================
--- team/group/aco_xmldocs/doc/appdocsxml.dtd (original)
+++ team/group/aco_xmldocs/doc/appdocsxml.dtd Thu Sep 27 17:43:56 2012
@@ -44,7 +44,7 @@
   <!ATTLIST configFile name CDATA #REQUIRED>
 
   <!ELEMENT configObject (synopsis?|description?|syntax?|configOption)*>
-  <!ATTLIST configObject name ID #REQUIRED>
+  <!ATTLIST configObject name CDATA #REQUIRED>
 
   <!ELEMENT configOption (synopsis,description?,syntax?)*>
   <!ATTLIST configOption name CDATA #REQUIRED>

Modified: team/group/aco_xmldocs/include/asterisk/config_options.h
URL: http://svnview.digium.com/svn/asterisk/team/group/aco_xmldocs/include/asterisk/config_options.h?view=diff&rev=373968&r1=373967&r2=373968
==============================================================================
--- team/group/aco_xmldocs/include/asterisk/config_options.h (original)
+++ team/group/aco_xmldocs/include/asterisk/config_options.h Thu Sep 27 17:43:56 2012
@@ -198,6 +198,14 @@
 #define CONFIG_INFO_STANDARD(name, arr, alloc, ...) \
 static struct aco_info name = { \
 	.module = AST_MODULE, \
+	.global_obj = &arr, \
+	.snapshot_alloc = alloc, \
+	__VA_ARGS__ \
+};
+
+#define CONFIG_INFO_CORE(mod, name, arr, alloc, ...) \
+static struct aco_info name = { \
+	.module = mod, \
 	.global_obj = &arr, \
 	.snapshot_alloc = alloc, \
 	__VA_ARGS__ \

Modified: team/group/aco_xmldocs/main/config_options.c
URL: http://svnview.digium.com/svn/asterisk/team/group/aco_xmldocs/main/config_options.c?view=diff&rev=373968&r1=373967&r2=373968
==============================================================================
--- team/group/aco_xmldocs/main/config_options.c (original)
+++ team/group/aco_xmldocs/main/config_options.c Thu Sep 27 17:43:56 2012
@@ -287,11 +287,6 @@
 		return -1;
 	};
 
-	if (link_option_to_types(info, types, opt)) {
-		ao2_ref(opt, -1);
-		return -1;
-	}
-
 #ifdef AST_XML_DOCS
 	{
 		RAII_VAR(struct ast_xml_doc_item *, config_info, ao2_find(xmldocs, info->module, OBJ_KEY), ao2_cleanup);
@@ -306,6 +301,11 @@
 		ast_string_field_set(config_option, default_value, opt->default_val);
 	}
 #endif /* AST_XML_DOCS */
+
+	if (link_option_to_types(info, types, opt)) {
+		ao2_ref(opt, -1);
+		return -1;
+	}
 
 	return 0;
 }

Modified: team/group/aco_xmldocs/main/named_acl.c
URL: http://svnview.digium.com/svn/asterisk/team/group/aco_xmldocs/main/named_acl.c?view=diff&rev=373968&r1=373967&r2=373968
==============================================================================
--- team/group/aco_xmldocs/main/named_acl.c (original)
+++ team/group/aco_xmldocs/main/named_acl.c Thu Sep 27 17:43:56 2012
@@ -44,11 +44,21 @@
 #define NACL_CONFIG "acl.conf"
 #define ACL_FAMILY "acls"
 
-struct named_acl_global_config {
-	AST_DECLARE_STRING_FIELDS(
-		/* Nothing here yet. */
-	);
-};
+/*** DOCUMENTATION
+	<configInfo name="named_acl" language="en_US">
+		<configFile name="named_acl.conf">
+			<configObject name="named_acl">
+				<synopsis>Options for configuring a named ACL</synopsis>
+				<configOption name="permit">
+					<synopsis>An address/subnet from which to allow access</synopsis>
+				</configOption>
+				<configOption name="deny">
+					<synopsis>An address/subnet from which to disallow access</synopsis>
+				</configOption>
+			</configObject>
+		</configFile>
+	</configInfo>
+***/
 
 /*
  * Configuration structure - holds pointers to ao2 containers used for configuration
@@ -56,7 +66,6 @@
  * time, it's really a config options friendly wrapper for the named ACL container
  */
 struct named_acl_config {
-	struct named_acl_global_config *global;
 	struct ao2_container *named_acl_list;
 };
 
@@ -70,6 +79,7 @@
 /* Config type for named ACL profiles (must not be named general) */
 static struct aco_type named_acl_type = {
 	.type = ACO_ITEM,                  /*!< named_acls are items stored in containers, not individual global objects */
+	.name = "named_acl",
 	.category_match = ACO_BLACKLIST,
 	.category = "^general$",           /*!< Match everything but "general" */
 	.item_alloc = named_acl_alloc,     /*!< A callback to allocate a new named_acl based on category */
@@ -77,26 +87,16 @@
 	.item_offset = offsetof(struct named_acl_config, named_acl_list), /*!< Could leave this out since 0 */
 };
 
-/* Config type for the general part of the ACL profile (must be named general) */
-static struct aco_type global_option = {
-	.type = ACO_GLOBAL,
-	.item_offset = offsetof(struct named_acl_config, global),
-	.category_match = ACO_WHITELIST,
-	.category = "^general$",
-};
-
 /* This array of aco_type structs is necessary to use aco_option_register */
 struct aco_type *named_acl_types[] = ACO_TYPES(&named_acl_type);
 
-struct aco_type *global_options[] = ACO_TYPES(&global_option);
-
 struct aco_file named_acl_conf = {
 	.filename = "acl.conf",
-	.types = ACO_TYPES(&named_acl_type, &global_option),
+	.types = ACO_TYPES(&named_acl_type),
 };
 
 /* Create a config info struct that describes the config processing for named ACLs. */
-CONFIG_INFO_STANDARD(cfg_info, globals, named_acl_config_alloc,
+CONFIG_INFO_CORE("named_acl", cfg_info, globals, named_acl_config_alloc,
 	.files = ACO_FILES(&named_acl_conf),
 );
 
@@ -124,13 +124,6 @@
 {
 	struct named_acl_config *cfg = obj;
 	ao2_cleanup(cfg->named_acl_list);
-	ao2_cleanup(cfg->global);
-}
-
-static void named_acl_global_config_destructor(void *obj)
-{
-	struct named_acl_global_config *global = obj;
-	ast_string_field_free_memory(global);
 }
 
 /*! \brief allocator callback for named_acl_config. Notice it returns void * since it is used by
@@ -142,14 +135,6 @@
 
 	if (!(cfg = ao2_alloc(sizeof(*cfg), named_acl_config_destructor))) {
 		return NULL;
-	}
-
-	if (!(cfg->global = ao2_alloc(sizeof(*cfg->global), named_acl_global_config_destructor))) {
-		goto error;
-	}
-
-	if (ast_string_field_init(cfg->global, 128)) {
-		goto error;
 	}
 
 	if (!(cfg->named_acl_list = ao2_container_alloc(37, named_acl_hash_fn, named_acl_cmp_fn))) {

Modified: team/group/aco_xmldocs/main/udptl.c
URL: http://svnview.digium.com/svn/asterisk/team/group/aco_xmldocs/main/udptl.c?view=diff&rev=373968&r1=373967&r2=373968
==============================================================================
--- team/group/aco_xmldocs/main/udptl.c (original)
+++ team/group/aco_xmldocs/main/udptl.c Thu Sep 27 17:43:56 2012
@@ -71,6 +71,40 @@
 #include "asterisk/cli.h"
 #include "asterisk/unaligned.h"
 
+/*** DOCUMENTATION
+	<configInfo name="udptl" language="en_US">
+		<configFile name="udptl.conf">
+			<configObject name="global">
+				<synopsis>Global options for configuring UDPTL</synopsis>
+				<configOption name="udptlstart">
+					<synopsis>The start of the UDPTL port range</synopsis>
+				</configOption>
+				<configOption name="udptlend">
+					<synopsis>The end of the UDPTL port range</synopsis>
+				</configOption>
+				<configOption name="udptlchecksums">
+					<synopsis>Whether to enable or disable UDP checksums on UDPTL traffic</synopsis>
+				</configOption>
+				<configOption name="udptlfecentries">
+					<synopsis>The number of error correction entries in a UDPTL packet</synopsis>
+				</configOption>
+				<configOption name="udptlfecspan">
+					<synopsis>The span over which parity is calculated for FEC ina UDPTL packet</synopsis>
+				</configOption>
+				<configOption name="use_even_ports">
+					<synopsis>Whether to only use even-numbered UDPTL ports</synopsis>
+				</configOption>
+				<configOption name="t38faxudpec">
+					<synopsis>Removed</synopsis>
+				</configOption>
+				<configOption name="t38faxmaxdatagram">
+					<synopsis>Removed</synopsis>
+				</configOption>
+			</configObject>
+		</configFile>
+	</configInfo>
+***/
+
 #define UDPTL_MTU		1200
 
 #if !defined(FALSE)
@@ -197,6 +231,7 @@
 
 static struct aco_type general_option = {
 	.type = ACO_GLOBAL,
+	.name = "global",
 	.category_match = ACO_WHITELIST,
 	.item_offset = offsetof(struct udptl_config, general),
 	.category = "^general$",
@@ -209,7 +244,7 @@
 	.types = ACO_TYPES(&general_option),
 };
 
-CONFIG_INFO_STANDARD(cfg_info, globals, udptl_snapshot_alloc,
+CONFIG_INFO_CORE("udptl", cfg_info, globals, udptl_snapshot_alloc,
 	.files = ACO_FILES(&udptl_conf),
 	.pre_apply_config = udptl_pre_apply_config,
 );

Modified: team/group/aco_xmldocs/main/xmldoc.c
URL: http://svnview.digium.com/svn/asterisk/team/group/aco_xmldocs/main/xmldoc.c?view=diff&rev=373968&r1=373967&r2=373968
==============================================================================
--- team/group/aco_xmldocs/main/xmldoc.c (original)
+++ team/group/aco_xmldocs/main/xmldoc.c Thu Sep 27 17:43:56 2012
@@ -2318,11 +2318,11 @@
 
 	/* If we already have a syntax element, bail. This isn't an error, since we may unload a module which
 	 * has updated the docs and then load it again. */
-	if ((results = query_xmldocs("//configInfo[@name='%s']/*/configObject[@name='%s']/syntax", name, module))) {
+	if ((results = query_xmldocs("//configInfo[@name='%s']/*/configObject[@name='%s']/syntax", module, name))) {
 		return 0;
 	}
 
-	if (!(results = query_xmldocs("//configInfo[@name='%s']/*/configObject[@name='%s']", name, module))) {
+	if (!(results = query_xmldocs("//configInfo[@name='%s']/*/configObject[@name='%s']", module, name))) {
 		ast_log(LOG_WARNING, "Cannot update type '%s' in module '%s' because it has no existing documentation!\n", name, module);
 		return XMLDOC_STRICT ? -1 : 0;
 	}




More information about the svn-commits mailing list