[svn-commits] kmoore: branch kmoore/parking_unload r396889 - in /team/kmoore/parking_unload...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Aug 17 09:51:42 CDT 2013


Author: kmoore
Date: Sat Aug 17 09:51:39 2013
New Revision: 396889

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396889
Log:
Bring up to current

Modified:
    team/kmoore/parking_unload/   (props changed)
    team/kmoore/parking_unload/apps/app_queue.c
    team/kmoore/parking_unload/apps/app_voicemail.c
    team/kmoore/parking_unload/cel/cel_custom.c
    team/kmoore/parking_unload/cel/cel_manager.c
    team/kmoore/parking_unload/cel/cel_odbc.c
    team/kmoore/parking_unload/cel/cel_pgsql.c
    team/kmoore/parking_unload/cel/cel_radius.c
    team/kmoore/parking_unload/cel/cel_sqlite3_custom.c
    team/kmoore/parking_unload/cel/cel_tds.c
    team/kmoore/parking_unload/channels/chan_dahdi.c
    team/kmoore/parking_unload/channels/chan_iax2.c
    team/kmoore/parking_unload/channels/chan_mgcp.c
    team/kmoore/parking_unload/channels/chan_sip.c
    team/kmoore/parking_unload/channels/chan_skinny.c
    team/kmoore/parking_unload/channels/chan_unistim.c
    team/kmoore/parking_unload/channels/sig_pri.c
    team/kmoore/parking_unload/channels/sig_pri.h
    team/kmoore/parking_unload/funcs/func_presencestate.c
    team/kmoore/parking_unload/include/asterisk/_private.h
    team/kmoore/parking_unload/include/asterisk/bridge.h
    team/kmoore/parking_unload/include/asterisk/bridge_channel.h
    team/kmoore/parking_unload/include/asterisk/cel.h
    team/kmoore/parking_unload/include/asterisk/devicestate.h
    team/kmoore/parking_unload/include/asterisk/event.h
    team/kmoore/parking_unload/include/asterisk/event_defs.h
    team/kmoore/parking_unload/include/asterisk/security_events_defs.h
    team/kmoore/parking_unload/main/asterisk.c
    team/kmoore/parking_unload/main/bridge.c
    team/kmoore/parking_unload/main/bridge_channel.c
    team/kmoore/parking_unload/main/ccss.c
    team/kmoore/parking_unload/main/cel.c
    team/kmoore/parking_unload/main/devicestate.c
    team/kmoore/parking_unload/main/event.c
    team/kmoore/parking_unload/main/manager.c
    team/kmoore/parking_unload/main/pbx.c
    team/kmoore/parking_unload/main/presencestate.c
    team/kmoore/parking_unload/main/security_events.c
    team/kmoore/parking_unload/res/parking/parking_applications.c
    team/kmoore/parking_unload/res/parking/parking_manager.c
    team/kmoore/parking_unload/res/parking/parking_ui.c
    team/kmoore/parking_unload/res/res_jabber.c
    team/kmoore/parking_unload/res/res_parking.c
    team/kmoore/parking_unload/res/res_security_log.c
    team/kmoore/parking_unload/res/res_xmpp.c
    team/kmoore/parking_unload/tests/test_cel.c
    team/kmoore/parking_unload/tests/test_event.c

Propchange: team/kmoore/parking_unload/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Aug 17 09:51:39 2013
@@ -1,1 +1,1 @@
-/trunk:1-396875
+/trunk:1-396888

Modified: team/kmoore/parking_unload/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/apps/app_queue.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/apps/app_queue.c (original)
+++ team/kmoore/parking_unload/apps/app_queue.c Sat Aug 17 09:51:39 2013
@@ -96,7 +96,6 @@
 #include "asterisk/astdb.h"
 #include "asterisk/devicestate.h"
 #include "asterisk/stringfields.h"
-#include "asterisk/event.h"
 #include "asterisk/astobj2.h"
 #include "asterisk/strings.h"
 #include "asterisk/global_datastores.h"

Modified: team/kmoore/parking_unload/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/apps/app_voicemail.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/apps/app_voicemail.c (original)
+++ team/kmoore/parking_unload/apps/app_voicemail.c Sat Aug 17 09:51:39 2013
@@ -131,7 +131,6 @@
 #include "asterisk/strings.h"
 #include "asterisk/smdi.h"
 #include "asterisk/astobj2.h"
-#include "asterisk/event.h"
 #include "asterisk/taskprocessor.h"
 #include "asterisk/test.h"
 

Modified: team/kmoore/parking_unload/cel/cel_custom.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/cel/cel_custom.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/cel/cel_custom.c (original)
+++ team/kmoore/parking_unload/cel/cel_custom.c Sat Aug 17 09:51:39 2013
@@ -64,7 +64,7 @@
 	AST_RWLIST_ENTRY(cel_config) list;
 };
 
-static struct ast_event_sub *event_sub = NULL;
+#define CUSTOM_BACKEND_NAME "CEL Custom CSV Logging"
 
 static AST_RWLIST_HEAD_STATIC(sinks, cel_config);
 
@@ -116,7 +116,7 @@
 	return res;
 }
 
-static void custom_log(const struct ast_event *event, void *userdata)
+static void custom_log(struct ast_event *event)
 {
 	struct ast_channel *dummy;
 	struct ast_str *str;
@@ -167,19 +167,15 @@
 
 static int unload_module(void)
 {
-	if (event_sub) {
-		event_sub = ast_event_unsubscribe(event_sub);
-	}
 
 	if (AST_RWLIST_WRLOCK(&sinks)) {
-		event_sub = ast_event_subscribe(AST_EVENT_CEL, custom_log, "CEL Custom CSV Logging",
-			NULL, AST_EVENT_IE_END);
 		ast_log(LOG_ERROR, "Unable to lock sink list.  Unload failed.\n");
 		return -1;
 	}
 
 	free_config();
 	AST_RWLIST_UNLOCK(&sinks);
+	ast_cel_backend_unregister(CUSTOM_BACKEND_NAME);
 	return 0;
 }
 
@@ -193,8 +189,9 @@
 	load_config();
 	AST_RWLIST_UNLOCK(&sinks);
 
-	event_sub = ast_event_subscribe(AST_EVENT_CEL, custom_log, "CEL Custom CSV Logging",
-		NULL, AST_EVENT_IE_END);
+	if (ast_cel_backend_register(CUSTOM_BACKEND_NAME, custom_log)) {
+		return AST_MODULE_LOAD_FAILURE;
+	}
 	return AST_MODULE_LOAD_SUCCESS;
 }
 

Modified: team/kmoore/parking_unload/cel/cel_manager.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/cel/cel_manager.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/cel/cel_manager.c (original)
+++ team/kmoore/parking_unload/cel/cel_manager.c Sat Aug 17 09:51:39 2013
@@ -57,12 +57,12 @@
 /*! \brief show_user_def is off by default */
 #define CEL_SHOW_USERDEF_DEFAULT	0
 
+#define MANAGER_BACKEND_NAME "Manager Event Logging"
+
 /*! TRUE if we should set the EventName header to USER_DEFINED on user events. */
 static unsigned char cel_show_user_def;
 
-static struct ast_event_sub *event_sub;
-
-static void manager_log(const struct ast_event *event, void *userdata)
+static void manager_log(struct ast_event *event)
 {
 	struct ast_tm timeresult;
 	char start_time[80] = "";
@@ -180,12 +180,9 @@
 
 	cel_show_user_def = new_cel_show_user_def;
 	if (enablecel && !newenablecel) {
-		if (event_sub) {
-			event_sub = ast_event_unsubscribe(event_sub);
-		}
+		ast_cel_backend_unregister(MANAGER_BACKEND_NAME);
 	} else if (!enablecel && newenablecel) {
-		event_sub = ast_event_subscribe(AST_EVENT_CEL, manager_log, "Manager Event Logging", NULL, AST_EVENT_IE_END);
-		if (!event_sub) {
+		if (ast_cel_backend_register(MANAGER_BACKEND_NAME, manager_log)) {
 			ast_log(LOG_ERROR, "Unable to register Asterisk Call Manager CEL handling\n");
 		}
 	}
@@ -196,9 +193,7 @@
 
 static int unload_module(void)
 {
-	if (event_sub) {
-		event_sub = ast_event_unsubscribe(event_sub);
-	}
+	ast_cel_backend_unregister(MANAGER_BACKEND_NAME);
 	return 0;
 }
 

Modified: team/kmoore/parking_unload/cel/cel_odbc.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/cel/cel_odbc.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/cel/cel_odbc.c (original)
+++ team/kmoore/parking_unload/cel/cel_odbc.c Sat Aug 17 09:51:39 2013
@@ -51,7 +51,8 @@
 #include "asterisk/module.h"
 
 #define	CONFIG	"cel_odbc.conf"
-static struct ast_event_sub *event_sub = NULL;
+
+#define ODBC_BACKEND_NAME "ODBC CEL backend"
 
 /*! \brief show_user_def is off by default */
 #define CEL_SHOW_USERDEF_DEFAULT	0
@@ -367,7 +368,7 @@
 				}																\
 			} while (0)
 
-static void odbc_log(const struct ast_event *event, void *userdata)
+static void odbc_log(struct ast_event *event)
 {
 	struct tables *tableptr;
 	struct columns *entry;
@@ -789,18 +790,12 @@
 
 static int unload_module(void)
 {
-	if (event_sub) {
-		event_sub = ast_event_unsubscribe(event_sub);
-	}
 	if (AST_RWLIST_WRLOCK(&odbc_tables)) {
-		event_sub = ast_event_subscribe(AST_EVENT_CEL, odbc_log, "ODBC CEL backend", NULL, AST_EVENT_IE_END);
-		if (!event_sub) {
-			ast_log(LOG_ERROR, "Unable to subscribe to CEL events\n");
-		}
 		ast_log(LOG_ERROR, "Unable to lock column list.  Unload failed.\n");
 		return -1;
 	}
 
+	ast_cel_backend_unregister(ODBC_BACKEND_NAME);
 	free_config();
 	AST_RWLIST_UNLOCK(&odbc_tables);
 	AST_RWLIST_HEAD_DESTROY(&odbc_tables);
@@ -814,13 +809,13 @@
 
 	if (AST_RWLIST_WRLOCK(&odbc_tables)) {
 		ast_log(LOG_ERROR, "Unable to lock column list.  Load failed.\n");
-		return 0;
+		return AST_MODULE_LOAD_FAILURE;
 	}
 	load_config();
 	AST_RWLIST_UNLOCK(&odbc_tables);
-	event_sub = ast_event_subscribe(AST_EVENT_CEL, odbc_log, "ODBC CEL backend", NULL, AST_EVENT_IE_END);
-	if (!event_sub) {
+	if (ast_cel_backend_register(ODBC_BACKEND_NAME, odbc_log)) {
 		ast_log(LOG_ERROR, "Unable to subscribe to CEL events\n");
+		return AST_MODULE_LOAD_FAILURE;
 	}
 	return AST_MODULE_LOAD_SUCCESS;
 }
@@ -829,7 +824,7 @@
 {
 	if (AST_RWLIST_WRLOCK(&odbc_tables)) {
 		ast_log(LOG_ERROR, "Unable to lock column list.  Reload failed.\n");
-		return -1;
+		return AST_MODULE_LOAD_FAILURE;
 	}
 
 	free_config();
@@ -838,7 +833,7 @@
 	return AST_MODULE_LOAD_SUCCESS;
 }
 
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "ODBC CEL backend",
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, ODBC_BACKEND_NAME,
 	.load = load_module,
 	.unload = unload_module,
 	.reload = reload,

Modified: team/kmoore/parking_unload/cel/cel_pgsql.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/cel/cel_pgsql.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/cel/cel_pgsql.c (original)
+++ team/kmoore/parking_unload/cel/cel_pgsql.c Sat Aug 17 09:51:39 2013
@@ -58,6 +58,8 @@
 
 #define DATE_FORMAT "%Y-%m-%d %T.%6q"
 
+#define PGSQL_BACKEND_NAME "CEL PGSQL backend"
+
 static char *config = "cel_pgsql.conf";
 static char *pghostname = NULL, *pgdbname = NULL, *pgdbuser = NULL, *pgpassword = NULL, *pgdbport = NULL, *table = NULL;
 static int connected = 0;
@@ -73,7 +75,6 @@
 
 static PGconn	*conn = NULL;
 static PGresult	*result = NULL;
-static struct ast_event_sub *event_sub = NULL;
 
 struct columns {
 	char *name;
@@ -113,7 +114,7 @@
 		} \
 	} while (0)
 
-static void pgsql_log(const struct ast_event *event, void *userdata)
+static void pgsql_log(struct ast_event *event)
 {
 	struct ast_tm tm;
 	char timestr[128];
@@ -346,10 +347,7 @@
 {
 	struct columns *current;
 	AST_RWLIST_WRLOCK(&psql_columns);
-	if (event_sub) {
-		event_sub = ast_event_unsubscribe(event_sub);
-		event_sub = NULL;
-	}
+	ast_cel_backend_unregister(PGSQL_BACKEND_NAME);
 	if (conn) {
 		PQfinish(conn);
 		conn = NULL;
@@ -561,9 +559,7 @@
 	process_my_load_module(cfg);
 	ast_config_destroy(cfg);
 
-	event_sub = ast_event_subscribe(AST_EVENT_CEL, pgsql_log, "CEL PGSQL backend", NULL, AST_EVENT_IE_END);
-
-	if (!event_sub) {
+	if (ast_cel_backend_register(PGSQL_BACKEND_NAME, pgsql_log)) {
 		ast_log(LOG_WARNING, "Unable to subscribe to CEL events for pgsql\n");
 		return AST_MODULE_LOAD_DECLINE;
 	}

Modified: team/kmoore/parking_unload/cel/cel_radius.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/cel/cel_radius.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/cel/cel_radius.c (original)
+++ team/kmoore/parking_unload/cel/cel_radius.c Sat Aug 17 09:51:39 2013
@@ -84,7 +84,8 @@
 static struct ast_flags global_flags = { RADIUS_FLAG_USEGMTIME | RADIUS_FLAG_LOGUNIQUEID | RADIUS_FLAG_LOGUSERFIELD };
 
 static rc_handle *rh = NULL;
-static struct ast_event_sub *event_sub = NULL;
+
+#define RADIUS_BACKEND_NAME "CEL Radius Logging"
 
 #define ADD_VENDOR_CODE(x,y) (rc_avpair_add(rh, send, x, &y, strlen(y), VENDOR_CODE))
 
@@ -174,7 +175,7 @@
 	return 0;
 }
 
-static void radius_log(const struct ast_event *event, void *userdata)
+static void radius_log(struct ast_event *event)
 {
 	int result = ERROR_RC;
 	VALUE_PAIR *send = NULL;
@@ -204,9 +205,7 @@
 
 static int unload_module(void)
 {
-	if (event_sub) {
-		event_sub = ast_event_unsubscribe(event_sub);
-	}
+	ast_cel_backend_unregister(RADIUS_BACKEND_NAME);
 	if (rh) {
 		rc_destroy(rh);
 		rh = NULL;
@@ -256,8 +255,7 @@
 		return AST_MODULE_LOAD_DECLINE;
 	}
 
-	event_sub = ast_event_subscribe(AST_EVENT_CEL, radius_log, "CEL Radius Logging", NULL, AST_EVENT_IE_END);
-	if (!event_sub) {
+	if (ast_cel_backend_register(RADIUS_BACKEND_NAME, radius_log)) {
 		rc_destroy(rh);
 		rh = NULL;
 		return AST_MODULE_LOAD_DECLINE;

Modified: team/kmoore/parking_unload/cel/cel_sqlite3_custom.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/cel/cel_sqlite3_custom.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/cel/cel_sqlite3_custom.c (original)
+++ team/kmoore/parking_unload/cel/cel_sqlite3_custom.c Sat Aug 17 09:51:39 2013
@@ -57,6 +57,8 @@
 #include "asterisk/options.h"
 #include "asterisk/stringfields.h"
 
+#define SQLITE_BACKEND_NAME "CEL sqlite3 custom backend"
+
 AST_MUTEX_DEFINE_STATIC(lock);
 
 static const char config_file[] = "cel_sqlite3_custom.conf";
@@ -69,7 +71,6 @@
  * \bug Handling of this var is crash prone on reloads
  */
 static char *columns;
-static struct ast_event_sub *event_sub = NULL;
 
 struct values {
 	char *expression;
@@ -229,7 +230,7 @@
 	}
 }
 
-static void write_cel(const struct ast_event *event, void *userdata)
+static void write_cel(struct ast_event *event)
 {
 	char *error = NULL;
 	char *sql = NULL;
@@ -293,9 +294,7 @@
 
 static int unload_module(void)
 {
-	if (event_sub) {
-		event_sub = ast_event_unsubscribe(event_sub);
-	}
+	ast_cel_backend_unregister(SQLITE_BACKEND_NAME);
 
 	free_config();
 
@@ -339,8 +338,7 @@
 		}
 	}
 
-	event_sub = ast_event_subscribe(AST_EVENT_CEL, write_cel, "CEL sqlite3 custom backend", NULL, AST_EVENT_IE_END);
-	if (!event_sub) {
+	if (ast_cel_backend_register(SQLITE_BACKEND_NAME, write_cel)) {
 		ast_log(LOG_ERROR, "Unable to register custom SQLite3 CEL handling\n");
 		free_config();
 		return AST_MODULE_LOAD_DECLINE;

Modified: team/kmoore/parking_unload/cel/cel_tds.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/cel/cel_tds.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/cel/cel_tds.c (original)
+++ team/kmoore/parking_unload/cel/cel_tds.c Sat Aug 17 09:51:39 2013
@@ -81,9 +81,9 @@
 
 #define DATE_FORMAT "%Y/%m/%d %T"
 
+#define TDS_BACKEND_NAME "CEL TDS logging backend"
+
 static char *config = "cel_tds.conf";
-
-static struct ast_event_sub *event_sub = NULL;
 
 struct cel_tds_config {
 	AST_DECLARE_STRING_FIELDS(
@@ -112,7 +112,7 @@
 static int mssql_connect(void);
 static int mssql_disconnect(void);
 
-static void tds_log(const struct ast_event *event, void *userdata)
+static void tds_log(struct ast_event *event)
 {
 	char start[80];
 	char *accountcode_ai, *clidnum_ai, *exten_ai, *context_ai, *clid_ai, *channel_ai, *app_ai, *appdata_ai, *uniqueid_ai, *linkedid_ai, *cidani_ai, *cidrdnis_ai, *ciddnid_ai, *peer_ai, *userfield_ai;
@@ -397,9 +397,7 @@
 
 static int tds_unload_module(void)
 {
-	if (event_sub) {
-		event_sub = ast_event_unsubscribe(event_sub);
-	}
+	ast_cel_backend_unregister(TDS_BACKEND_NAME);
 
 	if (settings) {
 		ast_mutex_lock(&tds_lock);
@@ -561,8 +559,7 @@
 	}
 
 	/* Register MSSQL CEL handler */
-	event_sub = ast_event_subscribe(AST_EVENT_CEL, tds_log, "CEL TDS logging backend", NULL, AST_EVENT_IE_END);
-	if (!event_sub) {
+	if (ast_cel_backend_register(TDS_BACKEND_NAME, tds_log)) {
 		ast_log(LOG_ERROR, "Unable to register MSSQL CEL handling\n");
 		ast_string_field_free_memory(settings);
 		ast_free(settings);

Modified: team/kmoore/parking_unload/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/channels/chan_dahdi.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/channels/chan_dahdi.c (original)
+++ team/kmoore/parking_unload/channels/chan_dahdi.c Sat Aug 17 09:51:39 2013
@@ -119,7 +119,6 @@
 #include "asterisk/abstract_jb.h"
 #include "asterisk/smdi.h"
 #include "asterisk/astobj.h"
-#include "asterisk/event.h"
 #include "asterisk/devicestate.h"
 #include "asterisk/paths.h"
 #include "asterisk/ccss.h"

Modified: team/kmoore/parking_unload/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/channels/chan_iax2.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/channels/chan_iax2.c (original)
+++ team/kmoore/parking_unload/channels/chan_iax2.c Sat Aug 17 09:51:39 2013
@@ -105,7 +105,6 @@
 #include "asterisk/netsock.h"
 #include "asterisk/stringfields.h"
 #include "asterisk/linkedlists.h"
-#include "asterisk/event.h"
 #include "asterisk/astobj2.h"
 #include "asterisk/timing.h"
 #include "asterisk/taskprocessor.h"

Modified: team/kmoore/parking_unload/channels/chan_mgcp.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/channels/chan_mgcp.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/channels/chan_mgcp.c (original)
+++ team/kmoore/parking_unload/channels/chan_mgcp.c Sat Aug 17 09:51:39 2013
@@ -79,7 +79,6 @@
 #include "asterisk/devicestate.h"
 #include "asterisk/stringfields.h"
 #include "asterisk/abstract_jb.h"
-#include "asterisk/event.h"
 #include "asterisk/chanvars.h"
 #include "asterisk/pktccops.h"
 #include "asterisk/stasis.h"

Modified: team/kmoore/parking_unload/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/channels/chan_sip.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/channels/chan_sip.c (original)
+++ team/kmoore/parking_unload/channels/chan_sip.c Sat Aug 17 09:51:39 2013
@@ -276,7 +276,6 @@
 #include "asterisk/threadstorage.h"
 #include "asterisk/translate.h"
 #include "asterisk/ast_version.h"
-#include "asterisk/event.h"
 #include "asterisk/data.h"
 #include "asterisk/aoc.h"
 #include "asterisk/message.h"

Modified: team/kmoore/parking_unload/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/channels/chan_skinny.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/channels/chan_skinny.c (original)
+++ team/kmoore/parking_unload/channels/chan_skinny.c Sat Aug 17 09:51:39 2013
@@ -77,7 +77,6 @@
 #include "asterisk/abstract_jb.h"
 #include "asterisk/threadstorage.h"
 #include "asterisk/devicestate.h"
-#include "asterisk/event.h"
 #include "asterisk/indications.h"
 #include "asterisk/linkedlists.h"
 #include "asterisk/stasis_endpoints.h"

Modified: team/kmoore/parking_unload/channels/chan_unistim.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/channels/chan_unistim.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/channels/chan_unistim.c (original)
+++ team/kmoore/parking_unload/channels/chan_unistim.c Sat Aug 17 09:51:39 2013
@@ -63,7 +63,6 @@
 #include "asterisk/config.h"
 #include "asterisk/module.h"
 #include "asterisk/pbx.h"
-#include "asterisk/event.h"
 #include "asterisk/rtp_engine.h"
 #include "asterisk/netsock2.h"
 #include "asterisk/acl.h"

Modified: team/kmoore/parking_unload/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/channels/sig_pri.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/channels/sig_pri.c (original)
+++ team/kmoore/parking_unload/channels/sig_pri.c Sat Aug 17 09:51:39 2013
@@ -8884,8 +8884,10 @@
  * \brief MWI subscription event callback.
  * \since 1.8
  *
- * \param event the event being passed to the subscriber
- * \param userdata the data provider in the call to ast_event_subscribe()
+ * \param userdata the data provider in the call to stasis_subscribe()
+ * \param sub the subscription to which the message was delivered for this callback
+ * \param topic the topic on which the message was published
+ * \param msg the message being passed to the subscriber
  *
  * \return Nothing
  */

Modified: team/kmoore/parking_unload/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/channels/sig_pri.h?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/channels/sig_pri.h (original)
+++ team/kmoore/parking_unload/channels/sig_pri.h Sat Aug 17 09:51:39 2013
@@ -27,7 +27,6 @@
 
 #include "asterisk/channel.h"
 #include "asterisk/frame.h"
-#include "asterisk/event.h"
 #include "asterisk/ccss.h"
 #include <libpri.h>
 #include <dahdi/user.h>

Modified: team/kmoore/parking_unload/funcs/func_presencestate.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/funcs/func_presencestate.c?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/funcs/func_presencestate.c (original)
+++ team/kmoore/parking_unload/funcs/func_presencestate.c Sat Aug 17 09:51:39 2013
@@ -41,7 +41,6 @@
 #include "asterisk/app.h"
 #ifdef TEST_FRAMEWORK
 #include "asterisk/test.h"
-#include "asterisk/event.h"
 #include <semaphore.h>
 #endif
 

Modified: team/kmoore/parking_unload/include/asterisk/_private.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/include/asterisk/_private.h?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/include/asterisk/_private.h (original)
+++ team/kmoore/parking_unload/include/asterisk/_private.h Sat Aug 17 09:51:39 2013
@@ -29,7 +29,6 @@
 void dnsmgr_start_refresh(void);	/*!< Provided by dnsmgr.c */
 int dnsmgr_reload(void);		/*!< Provided by dnsmgr.c */
 void threadstorage_init(void);		/*!< Provided by threadstorage.c */
-int ast_event_init(void);		/*!< Provided by event.c */
 int ast_device_state_engine_init(void);	/*!< Provided by devicestate.c */
 int astobj2_init(void);			/*!< Provided by astobj2.c */
 int ast_file_init(void);		/*!< Provided by file.c */

Modified: team/kmoore/parking_unload/include/asterisk/bridge.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/include/asterisk/bridge.h?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/include/asterisk/bridge.h (original)
+++ team/kmoore/parking_unload/include/asterisk/bridge.h Sat Aug 17 09:51:39 2013
@@ -563,6 +563,37 @@
 int ast_bridge_remove(struct ast_bridge *bridge, struct ast_channel *chan);
 
 /*!
+ * \brief Kick a channel from a bridge
+ *
+ * \param bridge Bridge that the channel is to be kicked from
+ * \param chan Channel to kick
+ *
+ * \retval 0 on success
+ * \retval -1 on failure
+ *
+ * Example usage:
+ *
+ * \code
+ * ast_bridge_kick(bridge, chan);
+ * \endcode
+ *
+ * \details
+ * This kicks the channel pointed to by the chan pointer from
+ * the bridge pointed to by the bridge pointer and requests that
+ * it be hung up.  Control over the channel will NOT be given to
+ * the calling thread.
+ *
+ * \note The functional difference between ast_bridge_kick() and
+ * ast_bridge_remove() is that the bridge may dissolve as a
+ * result of the channel being kicked.
+ *
+ * \note This API call can be used on channels that were added
+ * to the bridge using both ast_bridge_join and
+ * ast_bridge_impart.
+ */
+int ast_bridge_kick(struct ast_bridge *bridge, struct ast_channel *chan);
+
+/*!
  * \brief Merge two bridges together
  *
  * \param dst_bridge Destination bridge of merge.

Modified: team/kmoore/parking_unload/include/asterisk/bridge_channel.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/include/asterisk/bridge_channel.h?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/include/asterisk/bridge_channel.h (original)
+++ team/kmoore/parking_unload/include/asterisk/bridge_channel.h Sat Aug 17 09:51:39 2013
@@ -583,6 +583,19 @@
 int ast_bridge_channel_write_park(struct ast_bridge_channel *bridge_channel, const char *parkee_uuid,
 	const char *parker_uuid, const char *app_data);
 
+/*!
+ * \brief Kick the channel out of the bridge.
+ * \since 12.0.0
+ *
+ * \param bridge_channel Which channel is being kicked or hungup.
+ *
+ * \note This is intended to be called by bridge hooks and the
+ * bridge channel thread.
+ *
+ * \return Nothing
+ */
+void ast_bridge_channel_kick(struct ast_bridge_channel *bridge_channel);
+
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif

Modified: team/kmoore/parking_unload/include/asterisk/cel.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/include/asterisk/cel.h?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/include/asterisk/cel.h (original)
+++ team/kmoore/parking_unload/include/asterisk/cel.h Sat Aug 17 09:51:39 2013
@@ -300,6 +300,35 @@
 		enum ast_cel_event_type event_type, const char *userdefevname,
 		struct ast_json *extra, const char *peer_name);
 
+/*!
+ * \brief CEL backend callback
+ */
+/*typedef int (*ast_cel_backend_cb)(struct ast_cel_event_record *cel);*/
+typedef void (*ast_cel_backend_cb)(struct ast_event *event);
+
+/*!
+ * \brief Register a CEL backend
+ *
+ * \param name Name of backend to register
+ * \param backend_callback Callback to register
+ *
+ * \retval zero on success
+ * \retval non-zero on failure
+ * \since 12
+ */
+int ast_cel_backend_register(const char *name, ast_cel_backend_cb backend_callback);
+
+/*!
+ * \brief Unregister a CEL backend
+ *
+ * \param name Name of backend to unregister
+ *
+ * \retval zero on success
+ * \retval non-zero on failure
+ * \since 12
+ */
+int ast_cel_backend_unregister(const char *name);
+
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif

Modified: team/kmoore/parking_unload/include/asterisk/devicestate.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/include/asterisk/devicestate.h?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/include/asterisk/devicestate.h (original)
+++ team/kmoore/parking_unload/include/asterisk/devicestate.h Sat Aug 17 09:51:39 2013
@@ -19,7 +19,7 @@
 /*! \file
  * \brief Device state management
  *
- * To subscribe to device state changes, use the generic ast_event_subscribe
+ * To subscribe to device state changes, use the stasis_subscribe
  * method.  For an example, see apps/app_queue.c.
  *
  * \todo Currently, when the state of a device changes, the device state provider

Modified: team/kmoore/parking_unload/include/asterisk/event.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/parking_unload/include/asterisk/event.h?view=diff&rev=396889&r1=396888&r2=396889
==============================================================================
--- team/kmoore/parking_unload/include/asterisk/event.h (original)
+++ team/kmoore/parking_unload/include/asterisk/event.h Sat Aug 17 09:51:39 2013
@@ -64,258 +64,6 @@
 #include "asterisk/event_defs.h"
 
 /*!
- * \brief Subscriber event callback type
- *
- * \param event the event being passed to the subscriber
- * \param userdata the data provider in the call to ast_event_subscribe()
- *
- * \return The event callbacks do not return anything.
- */
-typedef void (*ast_event_cb_t)(const struct ast_event *event, void *userdata);
-
-/*!
- * \brief Subscribe to events
- *
- * \param event_type The type of events to subscribe to
- * \param cb The function to be called with events
- * \param description Description of the subscription.
- * \param userdata data to be passed to the event callback
- *
- * The rest of the arguments to this function specify additional parameters for
- * the subscription to filter which events are passed to this subscriber.  The
- * arguments must be in sets of:
- * \code
- *    <enum ast_event_ie_type>, [enum ast_event_ie_pltype, [payload] ]
- * \endcode
- * and must end with AST_EVENT_IE_END.
- *
- * If the ie_type specified is *not* AST_EVENT_IE_END, then it must be followed
- * by a valid IE payload type.  If the payload type specified is
- * AST_EVENT_IE_PLTYPE_EXISTS, then the 3rd argument should not be provided.
- * Otherwise, a payload must also be specified.
- *
- * \return This returns a reference to the subscription for use with
- *         un-subscribing later.  If there is a failure in creating the
- *         subscription, NULL will be returned.
- *
- * Example usage:
- *
- * \code
- * peer->mwi_event_sub = ast_event_subscribe(AST_EVENT_MWI, mwi_event_cb, peer,
- *     AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_STR, peer->mailbox,
- *     AST_EVENT_IE_END);
- * \endcode
- *
- * This creates a subscription to AST_EVENT_MWI events that contain an
- * information element, AST_EVENT_IE_MAILBOX, with the same string value
- * contained in peer->mailbox.  Also, the event callback will be passed a
- * pointer to the peer.
- *
- * \note A NULL description will cause this function to crash, so watch out!
- */
-struct ast_event_sub *ast_event_subscribe(enum ast_event_type event_type,
-       ast_event_cb_t cb, const char *description, void *userdata, ...);
-
-/*!
- * \brief Allocate a subscription, but do not activate it
- *
- * \param type the event type to subscribe to
- * \param cb the function to call when an event matches this subscription
- * \param userdata data to pass to the provided callback
- *
- * This function should be used when you want to dynamically build a
- * subscription.
- *
- * \return the allocated subscription, or NULL on failure
- * \since 1.6.1
- */
-struct ast_event_sub *ast_event_subscribe_new(enum ast_event_type type,
-	ast_event_cb_t cb, void *userdata);
-
-/*!
- * \brief Destroy an allocated subscription
- *
- * \param sub the subscription to destroy
- *
- * This function should be used when a subscription is allocated with
- * ast_event_subscribe_new(), but for some reason, you want to destroy it
- * instead of activating it.  This could be because of an error when
- * reading in the configuration for the dynamically built subscription.
- * \since 1.6.1
- */
-void ast_event_sub_destroy(struct ast_event_sub *sub);
-
-/*!
- * \brief Append a uint parameter to a subscription
- *
- * \param sub the dynamic subscription allocated with ast_event_subscribe_new()
- * \param ie_type the information element type for the parameter
- * \param uint the value that must be present in the event to match this subscription
- *
- * \retval 0 success
- * \retval non-zero failure
- * \since 1.6.1
- */
-int ast_event_sub_append_ie_uint(struct ast_event_sub *sub,
-	enum ast_event_ie_type ie_type, uint32_t uint);
-
-/*!
- * \brief Append a bitflags parameter to a subscription
- *
- * \param sub the dynamic subscription allocated with ast_event_subscribe_new()
- * \param ie_type the information element type for the parameter
- * \param flags the flags that must be present in the event to match this subscription
- *
- * \retval 0 success
- * \retval non-zero failure
- * \since 1.8
- */
-int ast_event_sub_append_ie_bitflags(struct ast_event_sub *sub,
-	enum ast_event_ie_type ie_type, uint32_t flags);
-
-/*!
- * \brief Append a string parameter to a subscription
- *
- * \param sub the dynamic subscription allocated with ast_event_subscribe_new()
- * \param ie_type the information element type for the parameter
- * \param str the string that must be present in the event to match this subscription
- *
- * \retval 0 success
- * \retval non-zero failure
- * \since 1.6.1
- */
-int ast_event_sub_append_ie_str(struct ast_event_sub *sub,
-	enum ast_event_ie_type ie_type, const char *str);
-
-/*!
- * \brief Append a raw parameter to a subscription
- *
- * \param sub the dynamic subscription allocated with ast_event_subscribe_new()
- * \param ie_type the information element type for the parameter
- * \param data the data that must be present in the event to match this subscription
- * \param raw_datalen length of data
- *
- * \retval 0 success
- * \retval non-zero failure
- * \since 1.6.1
- */
-int ast_event_sub_append_ie_raw(struct ast_event_sub *sub,
-	enum ast_event_ie_type ie_type, void *data, size_t raw_datalen);
-
-/*!
- * \brief Append an 'exists' parameter to a subscription
- *
- * \param sub the dynamic subscription allocated with ast_event_subscribe_new()
- * \param ie_type the information element type that must be present in the event
- *      for it to match this subscription.
- *
- * \retval 0 success
- * \retval non-zero failure
- * \since 1.6.1
- */
-int ast_event_sub_append_ie_exists(struct ast_event_sub *sub,
-	enum ast_event_ie_type ie_type);
-
-/*!
- * \brief Activate a dynamically built subscription
- *
- * \param sub the subscription to activate that was allocated using
- *      ast_event_subscribe_new()
- *
- * Once a dynamically built subscription has had all of the parameters added
- * to it, it should be activated using this function.
- *
- * \retval 0 success
- * \retval non-zero failure
- * \since 1.6.1
- */
-int ast_event_sub_activate(struct ast_event_sub *sub);
-
-/*!
- * \brief Un-subscribe from events
- *
- * \param event_sub This is the reference to the subscription returned by
- *        ast_event_subscribe.
- *
- * This function will remove a subscription and free the associated data
- * structures.
- *
- * \return NULL for convenience.
- * \version 1.6.1 return changed to NULL
- */
-struct ast_event_sub *ast_event_unsubscribe(struct ast_event_sub *event_sub);
-
-/*!
- * \brief Get description for a subscription
- *
- * \param sub subscription
- *
- * \return string description of the subscription
- */
-const char *ast_event_subscriber_get_description(struct ast_event_sub *sub);
-
-/*!
- * \brief Check if subscribers exist
- *
- * \param event_type This is the type of event that the caller would like to
- *        check for subscribers to.
- *
- * The rest of the arguments to this function specify additional parameters for
- * checking for subscriptions to subsets of an event type. The arguments must
- * in sets of:
- * \code
- *    <enum ast_event_ie_type>, [enum ast_event_ie_pltype, [payload] ]
- * \endcode
- * and must end with AST_EVENT_IE_END.
- *
- * If the ie_type specified is *not* AST_EVENT_IE_END, then it must be followed
- * by a valid IE payload type.  If the payload type specified is
- * AST_EVENT_IE_PLTYPE_EXISTS, then the 3rd argument should not be provided.
- * Otherwise, a payload must also be specified.
- *
- * \return This returns one of the values defined in the ast_event_subscriber_res
- *         enum which will indicate if subscribers exist that match the given
- *         criteria.
- *
- * Example usage:
- *
- * \code
- * if (ast_event_check_subscriber(AST_EVENT_MWI,
- *     AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_STR, mailbox,
- *     AST_EVENT_IE_END) == AST_EVENT_SUB_NONE) {
- *       return;
- * }
- * \endcode
- *
- * This example will check if there are any subscribers to MWI events for the
- * mailbox defined in the "mailbox" variable.
- */
-enum ast_event_subscriber_res ast_event_check_subscriber(enum ast_event_type event_type, ...);
-
-/*!
- * \brief Report current subscriptions to a subscription subscriber
- *
- * \arg sub the subscription subscriber
- *
- * \return nothing
- *
- * This reports all of the current subscribers to a subscriber of
- * subscribers to a specific event type.  (Try saying that a few times fast).
- *
- * The idea here is that it is sometimes very useful for a module to know when
- * someone subscribes to events.  However, when they first subscribe, this
- * provides that module the ability to request the event core report to them
- * all of the subscriptions to that event type that already exist.
- */
-void ast_event_report_subs(const struct ast_event_sub *sub);
-
-/*!
- * \brief Dump the event cache for the subscriber
- * \since 1.6.1
- */
-void ast_event_dump_cache(const struct ast_event_sub *event_sub);
-
-/*!
  * \brief Create a new event
  *
  * \param event_type The type of event to create
@@ -328,8 +76,7 @@
  * and must end with AST_EVENT_IE_END.
  *
  * If the ie_type specified is *not* AST_EVENT_IE_END, then it must be followed
- * by a valid IE payload type.  The payload type, EXISTS, should not be used here
- * because it makes no sense to do so.  So, a payload must also be specified
+ * by a valid IE payload type.  A payload must also be specified
  * after the IE payload type.
  *
  * \note The EID IE will be appended automatically when this function is used
@@ -369,79 +116,6 @@
 void ast_event_destroy(struct ast_event *event);
 
 /*!
- * \brief Queue an event
- *
- * \param event the event to be queued
- *
- * \retval zero success
- * \retval non-zero failure.  Note that the caller of this function is
- *         responsible for destroying the event in the case of a failure.
- *
- * This function queues an event to be dispatched to all of the appropriate
- * subscribers.  This function will not block while the event is being
- * dispatched because the event is queued up for a dispatching thread 
- * to handle.
- */
-int ast_event_queue(struct ast_event *event);
-
-/*!
- * \brief Queue and cache an event
- *
- * \param event the event to be queued and cached
- *
- * \details
- * The purpose of caching events is so that the core can retain the last known
- * information for events that represent some sort of state.  That way, when
- * code needs to find out the current state, it can query the cache.
- *
- * The event API already knows which events can be cached and how to cache them.
- *
- * \retval 0 success
- * \retval non-zero failure.
- */
-int ast_event_queue_and_cache(struct ast_event *event);
-
-/*!
- * \brief Retrieve an event from the cache
- *
- * \param ast_event_type The type of event to retrieve from the cache
- *
- * The rest of the arguments to this function specify information elements to
- * match for retrieving events from the cache.  They are specified in the form:
- * \code
- *    <enum ast_event_ie_type>, [enum ast_event_ie_pltype, [payload] ]
- * \endcode
- * and must end with AST_EVENT_IE_END.
- *
- * If the ie_type specified is *not* AST_EVENT_IE_END, then it must be followed
- * by a valid IE payload type.  If the payload type specified is
- * AST_EVENT_IE_PLTYPE_EXISTS, then the 3rd argument should not be provided.
- * Otherwise, a payload must also be specified.

[... 4193 lines stripped ...]



More information about the svn-commits mailing list