[asterisk-commits] mjordan: trunk r397524 - in /trunk: include/asterisk/ main/ res/ res/res_pjsip/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Aug 23 10:21:44 CDT 2013


Author: mjordan
Date: Fri Aug 23 10:21:40 2013
New Revision: 397524

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=397524
Log:
Update config framework/sorcery with types/options without documentation

There are times when a configuration option should not have documentation.

1. Some options are registered with a particular object merely as a warning to
   users. These options aren't even really 'deprecated' - which has its own
   separate API call - they are actually provided by a different configuration
   file. The options are merely registered so that the user gets a warning that
   a different configuration file provides the item.

2. Some object types - most notably some used by modules that use sorcery - are
   completely internal and should never be shown to the user.

3. Sorcery itself has several 'hidden' fields that should never be shown to a
   user.

This patch updates the configuration framework and sorcery with additional API
calls that allow a module to register types as internal and options as not
requiring documentation. This bypasses the XML documentation checking.

This patch also re-enables the strict XML documentation checking in trunk, as
well as updates some documentation that was missing.

Review: https://reviewboard.asterisk.org/r/2785/

(closes issue ASTERISK-22359)
Reported by: Matt Jordan

(closes issue ASTERISK-22112)
Reported by: Rusty Newton


Modified:
    trunk/include/asterisk/config_options.h
    trunk/include/asterisk/sorcery.h
    trunk/main/config_options.c
    trunk/main/features_config.c
    trunk/main/sorcery.c
    trunk/res/res_pjsip.c
    trunk/res/res_pjsip/pjsip_configuration.c
    trunk/res/res_pjsip/pjsip_options.c

Modified: trunk/include/asterisk/config_options.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/config_options.h?view=diff&rev=397524&r1=397523&r2=397524
==============================================================================
--- trunk/include/asterisk/config_options.h (original)
+++ trunk/include/asterisk/config_options.h Fri Aug 23 10:21:40 2013
@@ -116,6 +116,7 @@
 	aco_matchvalue_func matchfunc;       /*!< A function for determing whether the option value matches (i.e. hassip= requires ast_true()) */
 	enum aco_category_op category_match; /*!< Whether the following category regex is a whitelist or blacklist */
 	size_t item_offset;                  /*!< The offset in the config snapshot for the global config or item config container */
+	unsigned int hidden;  /*!< Type is for internal purposes only and it and all options should not be visible to users */
 
 	/* non-global callbacks */
 	aco_type_item_alloc item_alloc;         /*!< An allocation function for item associated with this type */
@@ -528,6 +529,7 @@
  * \param type The option type (only for default handlers)
  * \param handler The handler function for the option (only for non-default types)
  * \param flags a type specific flags, stored in the option and available to the handler
+ * \param no_doc if non-zero, this option should not have documentation
  * \param argc The number for variadic arguments
  * \param ... field offsets to store for default handlers
  *
@@ -535,7 +537,7 @@
  * \retval -1 failure
  */
 int __aco_option_register(struct aco_info *info, const char *name, enum aco_matchtype match_type, struct aco_type **types,
-	const char *default_val, enum aco_option_type type, aco_option_handler handler, unsigned int flags, size_t argc, ...);
+	const char *default_val, enum aco_option_type type, aco_option_handler handler, unsigned int flags, unsigned int no_doc, size_t argc, ...);
 
 /*! \brief Register a config option
  * \param info A pointer to the aco_info struct
@@ -551,7 +553,7 @@
  * \retval -1 Failure
  */
 #define aco_option_register(info, name, matchtype, types, default_val, opt_type, flags, ...) \
-	__aco_option_register(info, name, matchtype, types, default_val, opt_type, NULL, flags, VA_NARGS(__VA_ARGS__), __VA_ARGS__);
+	__aco_option_register(info, name, matchtype, types, default_val, opt_type, NULL, flags, 0, VA_NARGS(__VA_ARGS__), __VA_ARGS__);
 
 /*! \brief Register a config option
  * \param info A pointer to the aco_info struct
@@ -566,7 +568,25 @@
  * \retval -1 Failure
  */
 #define aco_option_register_custom(info, name, matchtype, types, default_val, handler, flags) \
-	__aco_option_register(info, name, matchtype, types, default_val, OPT_CUSTOM_T, handler, flags, 0);
+	__aco_option_register(info, name, matchtype, types, default_val, OPT_CUSTOM_T, handler, flags, 0, 0);
+
+/*! \brief Register a config option with no expected documentation
+ * \param info A pointer to the aco_info struct
+ * \param name The name of the option
+ * \param matchtype
+ * \param types An array of valid option types for matching categories to the correct struct type
+ * \param default_val The default value of the option in the same format as defined in a config file
+ * \param handler The handler callback for the option
+ * \param flags \a type specific flags, stored in the option and available to the handler
+ *
+ * \note This is used primarily with custom options that only have internal purposes
+ * and that should be ignored by the user.
+ *
+ * \retval 0 Success
+ * \retval -1 Failure
+ */
+#define aco_option_register_custom_nodoc(info, name, matchtype, types, default_val, handler, flags) \
+	__aco_option_register(info, name, matchtype, types, default_val, OPT_CUSTOM_T, handler, flags, 1, 0);
 
 /*! \brief Register a deprecated (and aliased) config option
  * \param info A pointer to the aco_info struct

Modified: trunk/include/asterisk/sorcery.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/sorcery.h?view=diff&rev=397524&r1=397523&r2=397524
==============================================================================
--- trunk/include/asterisk/sorcery.h (original)
+++ trunk/include/asterisk/sorcery.h Fri Aug 23 10:21:40 2013
@@ -345,14 +345,48 @@
  *
  * \param sorcery Pointer to a sorcery structure
  * \param type Type of object
+ * \param hidden All objects of this type are internal and should not be manipulated by users
  * \param alloc Required object allocation callback
  * \param transform Optional transformation callback
  * \param apply Optional object set apply callback
  *
- * \retval 0 success
- * \retval -1 failure
- */
-int ast_sorcery_object_register(struct ast_sorcery *sorcery, const char *type, aco_type_item_alloc alloc, sorcery_transform_handler transform, sorcery_apply_handler apply);
+ * \note In general, this function should not be used directly. One of the various
+ * macro'd versions should be used instead.
+ *
+ * \retval 0 success
+ * \retval -1 failure
+ */
+int __ast_sorcery_object_register(struct ast_sorcery *sorcery, const char *type, unsigned int hidden, aco_type_item_alloc alloc, sorcery_transform_handler transform, sorcery_apply_handler apply);
+
+/*!
+ * \brief Register an object type
+ *
+ * \param sorcery Pointer to a sorcery structure
+ * \param type Type of object
+ * \param alloc Required object allocation callback
+ * \param transform Optional transformation callback
+ * \param apply Optional object set apply callback
+ *
+ * \retval 0 success
+ * \retval -1 failure
+ */
+#define ast_sorcery_object_register(sorcery, type, alloc, transform, apply) \
+	__ast_sorcery_object_register((sorcery), (type), 0, (alloc), (transform), (apply))
+
+/*!
+ * \brief Register an internal, hidden object type
+ *
+ * \param sorcery Pointer to a sorcery structure
+ * \param type Type of object
+ * \param alloc Required object allocation callback
+ * \param transform Optional transformation callback
+ * \param apply Optional object set apply callback
+ *
+ * \retval 0 success
+ * \retval -1 failure
+ */
+#define ast_sorcery_internal_object_register(sorcery, type, alloc, transform, apply) \
+	__ast_sorcery_object_register((sorcery), (type), 1, (alloc), (transform), (apply))
 
 /*!
  * \brief Set the copy handler for an object type
@@ -401,7 +435,8 @@
  * \retval -1 failure
  */
 int __ast_sorcery_object_field_register(struct ast_sorcery *sorcery, const char *type, const char *name, const char *default_val, enum aco_option_type opt_type,
-                                        aco_option_handler config_handler, sorcery_field_handler sorcery_handler, unsigned int flags, size_t argc, ...);
+                                        aco_option_handler config_handler, sorcery_field_handler sorcery_handler, unsigned int flags, unsigned int no_doc,
+                                        size_t argc, ...);
 
 /*!
  * \brief Register a field within an object
@@ -417,7 +452,23 @@
  * \retval -1 failure
  */
 #define ast_sorcery_object_field_register(sorcery, type, name, default_val, opt_type, flags, ...) \
-    __ast_sorcery_object_field_register(sorcery, type, name, default_val, opt_type, NULL, NULL, flags, VA_NARGS(__VA_ARGS__), __VA_ARGS__)
+    __ast_sorcery_object_field_register(sorcery, type, name, default_val, opt_type, NULL, NULL, flags, 0, VA_NARGS(__VA_ARGS__), __VA_ARGS__)
+
+/*!
+ * \brief Register a field within an object without documentation
+ *
+ * \param sorcery Pointer to a sorcery structure
+ * \param type Type of object
+ * \param name Name of the field
+ * \param default_val Default value of the field
+ * \param opt_type Option type
+ * \param flags Option type specific flags
+ *
+ * \retval 0 success
+ * \retval -1 failure
+ */
+#define ast_sorcery_object_field_register_nodoc(sorcery, type, name, default_val, opt_type, flags, ...) \
+    __ast_sorcery_object_field_register(sorcery, type, name, default_val, opt_type, NULL, NULL, flags, 1, VA_NARGS(__VA_ARGS__), __VA_ARGS__)
 
 /*!
  * \brief Register a field within an object with custom handlers

Modified: trunk/main/config_options.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/config_options.c?view=diff&rev=397524&r1=397523&r2=397524
==============================================================================
--- trunk/main/config_options.c (original)
+++ trunk/main/config_options.c Fri Aug 23 10:21:40 2013
@@ -69,6 +69,7 @@
 	enum aco_option_type type;
 	aco_option_handler handler;
 	unsigned int flags;
+	unsigned int no_doc:1;
 	unsigned char deprecated:1;
 	size_t argc;
 	intptr_t args[0];
@@ -183,7 +184,7 @@
 		}
 		if (!ao2_link(type->internal->opts, opt)
 #ifdef AST_XML_DOCS
-				|| xmldoc_update_config_option(types, info->module, opt->name, type->name, opt->default_val, opt->match_type == ACO_REGEX, opt->type)
+				|| (!opt->no_doc && xmldoc_update_config_option(types, info->module, opt->name, type->name, opt->default_val, opt->match_type == ACO_REGEX, opt->type))
 #endif /* AST_XML_DOCS */
 		) {
 			do {
@@ -276,7 +277,8 @@
 #endif /* AST_XML_DOCS */
 
 int __aco_option_register(struct aco_info *info, const char *name, enum aco_matchtype matchtype, struct aco_type **types,
-	const char *default_val, enum aco_option_type kind, aco_option_handler handler, unsigned int flags, size_t argc, ...)
+	const char *default_val, enum aco_option_type kind, aco_option_handler handler, unsigned int flags,
+	unsigned int no_doc, size_t argc, ...)
 {
 	struct aco_option *opt;
 	va_list ap;
@@ -313,6 +315,7 @@
 	opt->handler = handler;
 	opt->flags = flags;
 	opt->argc = argc;
+	opt->no_doc = no_doc;
 
 	if (!opt->handler && !(opt->handler = ast_config_option_default_handler(opt->type))) {
 		/* This should never happen */
@@ -765,7 +768,7 @@
 				goto error;
 			}
 #ifdef AST_XML_DOCS
-			if (xmldoc_update_config_type(info->module, type->name, type->category, type->matchfield, type->matchvalue, type->category_match == ACO_WHITELIST)) {
+			if (!type->hidden && xmldoc_update_config_type(info->module, type->name, type->category, type->matchfield, type->matchvalue, type->category_match == ACO_WHITELIST)) {
 				goto error;
 			}
 #endif /* AST_XML_DOCS */
@@ -917,7 +920,7 @@
 /* Define as 0 if we want to allow configurations to be registered without
  * documentation
  */
-#define XMLDOC_STRICT 0
+#define XMLDOC_STRICT 1
 
 /*! \internal
  * \brief Update the XML documentation for a config type based on its registration

Modified: trunk/main/features_config.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features_config.c?view=diff&rev=397524&r1=397523&r2=397524
==============================================================================
--- trunk/main/features_config.c (original)
+++ trunk/main/features_config.c Fri Aug 23 10:21:40 2013
@@ -1654,39 +1654,39 @@
 	aco_option_register_custom(&cfg_info, "pickupfailsound", ACO_EXACT, global_options,
 			DEFAULT_PICKUPFAILSOUND, pickup_handler, 0);
 
-	aco_option_register_custom(&cfg_info, "context", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "context", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "parkext", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "parkext", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "parkext_exclusive", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "parkext_exclusive", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "parkinghints", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "parkinghints", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "parkedmusicclass", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "parkedmusicclass", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "parkingtime", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "parkingtime", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "parkpos", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "parkpos", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "findslot", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "findslot", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "parkedcalltransfers", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "parkedcalltransfers", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "parkedcallreparking", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "parkedcallreparking", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "parkedcallhangup", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "parkedcallhangup", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "parkedcallrecording", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "parkedcallrecording", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "comebackcontext", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "comebackcontext", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "comebacktoorigin", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "comebacktoorigin", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "comebackdialtime", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "comebackdialtime", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "parkeddynamic", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "parkeddynamic", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
-	aco_option_register_custom(&cfg_info, "adsipark", ACO_EXACT, global_options,
+	aco_option_register_custom_nodoc(&cfg_info, "adsipark", ACO_EXACT, global_options,
 			"", unsupported_handler, 0);
 
 	aco_option_register_custom(&cfg_info, "blindxfer", ACO_EXACT, featuremap_options,

Modified: trunk/main/sorcery.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/sorcery.c?view=diff&rev=397524&r1=397523&r2=397524
==============================================================================
--- trunk/main/sorcery.c (original)
+++ trunk/main/sorcery.c Fri Aug 23 10:21:40 2013
@@ -575,7 +575,7 @@
 	return 0;
 }
 
-int ast_sorcery_object_register(struct ast_sorcery *sorcery, const char *type, aco_type_item_alloc alloc, sorcery_transform_handler transform, sorcery_apply_handler apply)
+int __ast_sorcery_object_register(struct ast_sorcery *sorcery, const char *type, unsigned int hidden, aco_type_item_alloc alloc, sorcery_transform_handler transform, sorcery_apply_handler apply)
 {
 	RAII_VAR(struct ast_sorcery_object_type *, object_type, ao2_find(sorcery->types, type, OBJ_KEY), ao2_cleanup);
 
@@ -587,6 +587,7 @@
 	object_type->type.type = ACO_ITEM;
 	object_type->type.category = ".?";
 	object_type->type.item_alloc = alloc;
+	object_type->type.hidden = hidden;
 
 	object_type->transform = transform;
 	object_type->apply = apply;
@@ -639,13 +640,13 @@
 	object_field->multiple_handler = sorcery_handler;
 
 	ao2_link(object_type->fields, object_field);
-	__aco_option_register(object_type->info, regex, ACO_REGEX, object_type->file->types, "", OPT_CUSTOM_T, config_handler, 0, 0);
+	__aco_option_register(object_type->info, regex, ACO_REGEX, object_type->file->types, "", OPT_CUSTOM_T, config_handler, 0, 1, 0);
 
 	return 0;
 }
 
 int __ast_sorcery_object_field_register(struct ast_sorcery *sorcery, const char *type, const char *name, const char *default_val, enum aco_option_type opt_type,
-					aco_option_handler config_handler, sorcery_field_handler sorcery_handler, unsigned int flags, size_t argc, ...)
+					aco_option_handler config_handler, sorcery_field_handler sorcery_handler, unsigned int flags, unsigned int no_doc, size_t argc, ...)
 {
 	RAII_VAR(struct ast_sorcery_object_type *, object_type, ao2_find(sorcery->types, type, OBJ_KEY), ao2_cleanup);
 	RAII_VAR(struct ast_sorcery_object_field *, object_field, NULL, ao2_cleanup);
@@ -677,15 +678,15 @@
 
 	/* TODO: Improve this hack */
 	if (!argc) {
-		__aco_option_register(object_type->info, name, ACO_EXACT, object_type->file->types, default_val, opt_type, config_handler, flags, argc);
+		__aco_option_register(object_type->info, name, ACO_EXACT, object_type->file->types, default_val, opt_type, config_handler, flags, no_doc, argc);
 	} else if (argc == 1) {
-		__aco_option_register(object_type->info, name, ACO_EXACT, object_type->file->types, default_val, opt_type, config_handler, flags, argc,
+		__aco_option_register(object_type->info, name, ACO_EXACT, object_type->file->types, default_val, opt_type, config_handler, flags, no_doc, argc,
 				      object_field->args[0]);
 	} else if (argc == 2) {
-		__aco_option_register(object_type->info, name, ACO_EXACT, object_type->file->types, default_val, opt_type, config_handler, flags, argc,
+		__aco_option_register(object_type->info, name, ACO_EXACT, object_type->file->types, default_val, opt_type, config_handler, flags, no_doc, argc,
 				      object_field->args[0], object_field->args[1]);
 	} else if (argc == 3) {
-		__aco_option_register(object_type->info, name, ACO_EXACT, object_type->file->types, default_val, opt_type, config_handler, flags, argc,
+		__aco_option_register(object_type->info, name, ACO_EXACT, object_type->file->types, default_val, opt_type, config_handler, flags, no_doc, argc,
 				      object_field->args[0], object_field->args[1], object_field->args[2]);
 	} else {
 		ast_assert(0); /* The hack... she does us no good for this */

Modified: trunk/res/res_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip.c?view=diff&rev=397524&r1=397523&r2=397524
==============================================================================
--- trunk/res/res_pjsip.c (original)
+++ trunk/res/res_pjsip.c Fri Aug 23 10:21:40 2013
@@ -256,6 +256,10 @@
 				<configOption name="rtp_symmetric" default="no">
 					<synopsis>Enforce that RTP must be symmetric</synopsis>
 				</configOption>
+				<configOption name="send_diversion" default="yes">
+					<synopsis>Send the Diversion header, conveying the diversion
+					information to the called user agent</synopsis>
+				</configOption>
 				<configOption name="send_pai" default="no">
 					<synopsis>Send the P-Asserted-Identity header</synopsis>
 				</configOption>
@@ -670,15 +674,6 @@
 					<synopsis>Username to use for account</synopsis>
 				</configOption>
 			</configObject>
-			<configObject name="nat_hook">
-				<synopsis>XXX This exists only to prevent XML documentation errors.</synopsis>
-				<configOption name="external_media_address">
-					<synopsis>I should be undocumented or hidden</synopsis>
-				</configOption>
-				<configOption name="method">
-					<synopsis>I should be undocumented or hidden</synopsis>
-				</configOption>
-			</configObject>
 			<configObject name="domain_alias">
 				<synopsis>Domain Alias</synopsis>
 				<description><para>
@@ -769,6 +764,8 @@
 							<enum name="udp" />
 							<enum name="tcp" />
 							<enum name="tls" />
+							<enum name="ws" />
+							<enum name="wss" />
 						</enumlist>
 					</description>
 				</configOption>
@@ -783,6 +780,24 @@
 				</configOption>
 				<configOption name="verify_server" default="false">
 					<synopsis>Require verification of server certificate (TLS ONLY)</synopsis>
+				</configOption>
+				<configOption name="tos" default="false">
+					<synopsis>Enable TOS for the signalling sent over this transport</synopsis>
+					<description>
+					<para>See <literal>https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service</literal>
+					for more information on this parameter.</para>
+					<note><para>This option does not apply to the <replaceable>ws</replaceable>
+					or the <replaceable>wss</replaceable> protocols.</para></note>
+					</description>
+				</configOption>
+				<configOption name="cos" default="false">
+					<synopsis>Enable COS for the signalling sent over this transport</synopsis>
+					<description>
+					<para>See <literal>https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service</literal>
+					for more information on this parameter.</para>
+					<note><para>This option does not apply to the <replaceable>ws</replaceable>
+					or the <replaceable>wss</replaceable> protocols.</para></note>
+					</description>
 				</configOption>
 			</configObject>
 			<configObject name="contact">
@@ -809,28 +824,6 @@
 					<description><para>
 						Interval between attempts to qualify the contact for reachability.
 						If <literal>0</literal> never qualify. Time in seconds.
-					</para></description>
-				</configOption>
-			</configObject>
-			<configObject name="contact_status">
-				<synopsis>Status for a contact</synopsis>
-				<description><para>
-					The contact status keeps track of whether or not a contact is reachable
-					and how long it took to qualify the contact (round trip time).
-				</para></description>
-				<configOption name="status">
-					<synopsis>A contact's status</synopsis>
-					<description>
-						<enumlist>
-							<enum name="AVAILABLE" />
-							<enum name="UNAVAILABLE" />
-						</enumlist>
-					</description>
-				</configOption>
-				<configOption name="rtt">
-					<synopsis>Round trip time</synopsis>
-					<description><para>
-						The time, in microseconds, it took to qualify the contact.
 					</para></description>
 				</configOption>
 			</configObject>
@@ -972,7 +965,7 @@
 					A value of 0 indicates no maximum.</synopsis>
 				</configOption>
 				<configOption name="type">
-                                        <synopsis>Must be of type 'system'.</synopsis>
+					<synopsis>Must be of type 'system'.</synopsis>
 				</configOption>
 			</configObject>
 			<configObject name="global">
@@ -984,11 +977,11 @@
 				<configOption name="maxforwards" default="70">
 					<synopsis>Value used in Max-Forwards header for SIP requests.</synopsis>
 				</configOption>
+				<configOption name="type">
+					<synopsis>Must be of type 'global'.</synopsis>
+				</configOption>
 				<configOption name="useragent" default="Asterisk &lt;Asterisk Version&gt;">
 					<synopsis>Value used in User-Agent header for SIP requests and Server header for SIP responses.</synopsis>
-				</configOption>
-				<configOption name="type">
-                                        <synopsis>Must be of type 'global'.</synopsis>
 				</configOption>
 			</configObject>
 		</configFile>

Modified: trunk/res/res_pjsip/pjsip_configuration.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip/pjsip_configuration.c?view=diff&rev=397524&r1=397523&r2=397524
==============================================================================
--- trunk/res/res_pjsip/pjsip_configuration.c (original)
+++ trunk/res/res_pjsip/pjsip_configuration.c Fri Aug 23 10:21:40 2013
@@ -628,7 +628,7 @@
 		return -1;
 	}
 
-	ast_sorcery_object_register(sip_sorcery, "nat_hook", sip_nat_hook_alloc, NULL, NULL);
+	ast_sorcery_internal_object_register(sip_sorcery, "nat_hook", sip_nat_hook_alloc, NULL, NULL);
 
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "type", "", OPT_NOOP_T, 0, 0);
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "context", "default", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, context));
@@ -696,7 +696,6 @@
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "cos_video", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, media.cos_video));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "allowsubscribe", "yes", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, subscription.allow));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "subminexpiry", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, subscription.minexpiry));
-	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "subminexpirey", "0", OPT_UINT_T, 0, FLDSET(struct ast_sip_endpoint, subscription.minexpiry));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "fromuser", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, fromuser));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "fromdomain", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, fromdomain));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "mwifromuser", "", OPT_STRINGFIELD_T, 0, STRFLDSET(struct ast_sip_endpoint, subscription.mwi.fromuser));

Modified: trunk/res/res_pjsip/pjsip_options.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip/pjsip_options.c?view=diff&rev=397524&r1=397523&r2=397524
==============================================================================
--- trunk/res/res_pjsip/pjsip_options.c (original)
+++ trunk/res/res_pjsip/pjsip_options.c Fri Aug 23 10:21:40 2013
@@ -734,15 +734,15 @@
 	/* initialize sorcery ast_sip_contact_status resource */
 	ast_sorcery_apply_default(sorcery, CONTACT_STATUS, "memory", NULL);
 
-	if (ast_sorcery_object_register(sorcery, CONTACT_STATUS,
+	if (ast_sorcery_internal_object_register(sorcery, CONTACT_STATUS,
 					contact_status_alloc, NULL, NULL)) {
 		ast_log(LOG_ERROR, "Unable to register ast_sip_contact_status in sorcery\n");
 		return -1;
 	}
 
-	ast_sorcery_object_field_register(sorcery, CONTACT_STATUS, "rtt", "0", OPT_UINT_T,
+	ast_sorcery_object_field_register_nodoc(sorcery, CONTACT_STATUS, "rtt", "0", OPT_UINT_T,
 					  1, FLDSET(struct ast_sip_contact_status, status));
-	ast_sorcery_object_field_register(sorcery, CONTACT_STATUS, "rtt", "0", OPT_UINT_T,
+	ast_sorcery_object_field_register_nodoc(sorcery, CONTACT_STATUS, "rtt", "0", OPT_UINT_T,
 					  1, FLDSET(struct ast_sip_contact_status, rtt));
 
 	return 0;




More information about the asterisk-commits mailing list