[asterisk-commits] mmichelson: branch group/CCSS r215253 - in /team/group/CCSS: apps/ include/as...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 1 17:16:37 CDT 2009


Author: mmichelson
Date: Tue Sep  1 17:16:34 2009
New Revision: 215253

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=215253
Log:
Add the monitor type to the ast_cc_interface structure.

app_dial has been modified to use this field. Now the proper
monitor callbacks may be set when the monitor is created.


Modified:
    team/group/CCSS/apps/app_dial.c
    team/group/CCSS/include/asterisk/ccss.h

Modified: team/group/CCSS/apps/app_dial.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/apps/app_dial.c?view=diff&rev=215253&r1=215252&r2=215253
==============================================================================
--- team/group/CCSS/apps/app_dial.c (original)
+++ team/group/CCSS/apps/app_dial.c Tue Sep  1 17:16:34 2009
@@ -1806,6 +1806,7 @@
 
 	cc_interface->id = ast_atomic_fetchadd_int(&dial_cc_interface_counter, +1);
 	cc_interface->parent_id = parent_id;
+	cc_interface->monitor_type = "extension";
 	strcpy(cc_interface->name, ast_str_buffer(str));
 	ast_log(LOG_NOTICE, "Created an extension cc interface for '%s' with id %d and parent %d\n", cc_interface->name, cc_interface->id, cc_interface->parent_id);
 	return cc_interface;
@@ -1900,6 +1901,11 @@
 	strcpy(cc_interface->name, name);
 	cc_interface->id = ast_atomic_fetchadd_int(&dial_cc_interface_counter, +1);
 	cc_interface->parent_id = parent_id;
+	/* XXX This data will need to be retrieved from the frame
+	 * data. However, to keep things simple for now, always use
+	 * "generic" monitor
+	 */
+	cc_interface->monitor_type = "generic";
 	ast_log(LOG_NOTICE, "Created a device cc interface for '%s' with id %d and parent %d\n", cc_interface->name, cc_interface->id, cc_interface->parent_id);
 	return cc_interface;
 }

Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=215253&r1=215252&r2=215253
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Tue Sep  1 17:16:34 2009
@@ -386,6 +386,14 @@
 	 * representing dialplan extensions.
 	 */
 	enum ast_cc_service_type service_offered;
+	/*!
+	 * The type of monitor that should be used for this interface
+	 *
+	 * This will be something like "extension" "generic" or "SIP"
+	 * This should point to a static const char *, so there is
+	 * no reason to make a new copy.
+	 */
+	const char *monitor_type;
 	AST_LIST_ENTRY(ast_cc_interface) next;
 	/* The name of the interface/extension. local channels will
 	 * have 'exten at context' for a name. Other channel types will




More information about the asterisk-commits mailing list