[asterisk-commits] kmoore: branch kmoore/cel_transfers r393422 - in /team/kmoore/cel_transfers: ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 2 09:41:23 CDT 2013


Author: kmoore
Date: Tue Jul  2 09:41:21 2013
New Revision: 393422

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393422
Log:
Push blind transfer work and AST_CEL_TRANSFER removal

Modified:
    team/kmoore/cel_transfers/CHANGES
    team/kmoore/cel_transfers/include/asterisk/cel.h
    team/kmoore/cel_transfers/main/cel.c

Modified: team/kmoore/cel_transfers/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/cel_transfers/CHANGES?view=diff&rev=393422&r1=393421&r2=393422
==============================================================================
--- team/kmoore/cel_transfers/CHANGES (original)
+++ team/kmoore/cel_transfers/CHANGES Tue Jul  2 09:41:21 2013
@@ -274,6 +274,11 @@
  * When a CDR is dispatched, user defined CDR variables from both parties are
    included in the resulting CDR. If both parties have the same variable, only
    the Party A value is provided.
+
+CEL (Channel Event Logging)
+------------------
+ * AST_CEL_BLINDTRANSFER events now report the transferee bridge unique
+   identifier instead of the transferee channel name.
 
 Features
 -------------------

Modified: team/kmoore/cel_transfers/include/asterisk/cel.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/cel_transfers/include/asterisk/cel.h?view=diff&rev=393422&r1=393421&r2=393422
==============================================================================
--- team/kmoore/cel_transfers/include/asterisk/cel.h (original)
+++ team/kmoore/cel_transfers/include/asterisk/cel.h Tue Jul  2 09:41:21 2013
@@ -67,8 +67,6 @@
 	AST_CEL_BLINDTRANSFER = 13,
 	/*! \brief a transfer occurs */
 	AST_CEL_ATTENDEDTRANSFER = 14,
-	/*! \brief a transfer occurs */
-	AST_CEL_TRANSFER = 15,
 	/*! \brief a 3-way conference, usually part of a transfer */
 	AST_CEL_HOOKFLASH = 16,
 	/*! \brief a 3-way conference, usually part of a transfer */

Modified: team/kmoore/cel_transfers/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/cel_transfers/main/cel.c?view=diff&rev=393422&r1=393421&r2=393422
==============================================================================
--- team/kmoore/cel_transfers/main/cel.c (original)
+++ team/kmoore/cel_transfers/main/cel.c Tue Jul  2 09:41:21 2013
@@ -308,7 +308,6 @@
 	[AST_CEL_CONF_END]         = "CONF_END",
 	[AST_CEL_PARK_START]       = "PARK_START",
 	[AST_CEL_PARK_END]         = "PARK_END",
-	[AST_CEL_TRANSFER]         = "TRANSFER",
 	[AST_CEL_USER_DEFINED]     = "USER_DEFINED",
 	[AST_CEL_CONF_ENTER]       = "CONF_ENTER",
 	[AST_CEL_CONF_EXIT]        = "CONF_EXIT",
@@ -1404,6 +1403,37 @@
 	}
 }
 
+static void cel_blind_transfer_cb(
+	void *data, struct stasis_subscription *sub,
+	struct stasis_topic *topic,
+	struct stasis_message *message)
+{
+	struct ast_bridge_blob *obj = stasis_message_data(message);
+	struct ast_channel_snapshot *chan_snapshot = obj->channel;
+	struct ast_bridge_snapshot *bridge_snapshot = obj->bridge;
+	struct ast_json *blob = obj->blob;
+	struct ast_json *json_exten = ast_json_object_get(blob, "extension");
+	const char *exten;
+
+	if (!json_exten) {
+		return;
+	}
+
+	exten = ast_json_string_get(json_exten);
+	if (!exten) {
+		return;
+	}
+
+	report_event_snapshot(chan_snapshot, AST_CEL_BLINDTRANSFER, NULL, exten, bridge_snapshot->uniqueid);
+}
+
+static void cel_attended_transfer_cb(
+	void *data, struct stasis_subscription *sub,
+	struct stasis_topic *topic,
+	struct stasis_message *message)
+{
+}
+
 static void ast_cel_engine_term(void)
 {
 	aco_info_destroy(&cel_cfg_info);
@@ -1525,6 +1555,16 @@
 		cel_generic_cb,
 		NULL);
 
+	ret |= stasis_message_router_add(cel_state_router,
+		ast_blind_transfer_type(),
+		cel_blind_transfer_cb,
+		NULL);
+
+	ret |= stasis_message_router_add(cel_state_router,
+		ast_attended_transfer_type(),
+		cel_attended_transfer_cb,
+		NULL);
+
 	/* If somehow we failed to add any routes, just shut down the whole
 	 * thing and fail it.
 	 */




More information about the asterisk-commits mailing list