[asterisk-commits] mmichelson: branch mmichelson/transfer_stasis r392725 - /team/mmichelson/tran...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 24 11:26:03 CDT 2013


Author: mmichelson
Date: Mon Jun 24 11:26:02 2013
New Revision: 392725

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392725
Log:
Remove debugging callbacks.


Modified:
    team/mmichelson/transfer_stasis/main/stasis_bridging.c

Modified: team/mmichelson/transfer_stasis/main/stasis_bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer_stasis/main/stasis_bridging.c?view=diff&rev=392725&r1=392724&r2=392725
==============================================================================
--- team/mmichelson/transfer_stasis/main/stasis_bridging.c (original)
+++ team/mmichelson/transfer_stasis/main/stasis_bridging.c Mon Jun 24 11:26:02 2013
@@ -1039,66 +1039,6 @@
 	return snapshot->uniqueid;
 }
 
-static void transfer_cb(void *userdata, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *msg)
-{
-	struct ast_bridge_blob *blob;
-
-	if (ast_blind_transfer_type() != stasis_message_type(msg)) {
-		/* Don't care about other types of messages for now */
-		return;
-	}
-
-	blob = stasis_message_data(msg);
-
-	ast_log(LOG_NOTICE, "Blind transfer to %s@%s by %s\n", ast_json_string_get(ast_json_object_get(blob->blob, "exten")),
-			ast_json_string_get(ast_json_object_get(blob->blob, "context")), blob->channel->name);
-	if (ast_json_integer_get(ast_json_object_get(blob->blob, "result")) == AST_TRANSFER_SUCCESS) {
-		ast_log(LOG_NOTICE, "Transfer from bridge %s was successful\n",
-				blob->bridge->uniqueid);
-	} else {
-		ast_log(LOG_NOTICE, "Transfer was unsuccessful\n");
-	}
-}
-
-static void atxfer_cb(void *userdata, struct stasis_subscription *sub,
-		struct stasis_topic *topic, struct stasis_message *msg)
-{
-	struct ast_attended_transfer_message *xfer_msg;
-
-	if (ast_attended_transfer_type() != stasis_message_type(msg)) {
-		return;
-	}
-
-	xfer_msg = stasis_message_data(msg);
-
-	ast_log(LOG_NOTICE, "Attended transfer!\n");
-	ast_log(LOG_NOTICE, "Original transferer: %s, and his bridge: %s\n",
-			xfer_msg->to_transferee.channel_snapshot->name,
-			xfer_msg->to_transferee.bridge_snapshot ? xfer_msg->to_transferee.bridge_snapshot->uniqueid : "None");
-
-	ast_log(LOG_NOTICE, "Second transferer: %s, and his bridge: %s\n",
-			xfer_msg->to_transfer_target.channel_snapshot->name,
-			xfer_msg->to_transfer_target.bridge_snapshot ? xfer_msg->to_transfer_target.bridge_snapshot->uniqueid : "None");
-
-	switch (xfer_msg->dest_type) {
-	case AST_ATTENDED_TRANSFER_DEST_FAIL:
-		ast_log(LOG_NOTICE, "Attended transfer attempt failed :(\n");
-		break;
-	case AST_ATTENDED_TRANSFER_DEST_BRIDGE_MERGE:
-		ast_log(LOG_NOTICE, "Transfer accomplished via bridge merge. Surviving bridge: %s\n",
-				xfer_msg->dest.bridge);
-		break;
-	case AST_ATTENDED_TRANSFER_DEST_APP:
-		ast_log(LOG_NOTICE, "Transfer to application %s\n", xfer_msg->dest.app);
-		break;
-	case AST_ATTENDED_TRANSFER_DEST_LINK:
-		ast_log(LOG_NOTICE, "Transfer linking two bridges.\n\t\tFirst chan: %s.\n\t\tSecond chan: %s\n",
-				xfer_msg->dest.links[0]->name, xfer_msg->dest.links[1]->name);
-		break;
-	}
-}
-
 int ast_stasis_bridging_init(void)
 {
 	ast_register_cleanup(stasis_bridging_cleanup);
@@ -1113,10 +1053,6 @@
 	bridge_topic_all_cached = stasis_caching_topic_create(bridge_topic_all, bridge_snapshot_get_id);
 	bridge_topic_pool = stasis_topic_pool_create(bridge_topic_all);
 
-	/* XXX Temporary stasis subscriptions for debugging/testing */
-	stasis_subscribe(ast_bridge_topic_all(), transfer_cb, NULL);
-	stasis_subscribe(ast_bridge_topic_all(), atxfer_cb, NULL);
-
 	return !bridge_topic_all
 		|| !bridge_topic_all_cached
 		|| !bridge_topic_pool ? -1 : 0;




More information about the asterisk-commits mailing list