[asterisk-commits] mmichelson: branch mmichelson/queue_bugbug r394466 - /team/mmichelson/queue_b...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 16 13:14:14 CDT 2013


Author: mmichelson
Date: Tue Jul 16 13:14:12 2013
New Revision: 394466

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394466
Log:
Send appropriate messages for an attended transfer.


Modified:
    team/mmichelson/queue_bugbug/apps/app_queue.c

Modified: team/mmichelson/queue_bugbug/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/queue_bugbug/apps/app_queue.c?view=diff&rev=394466&r1=394465&r2=394466
==============================================================================
--- team/mmichelson/queue_bugbug/apps/app_queue.c (original)
+++ team/mmichelson/queue_bugbug/apps/app_queue.c Tue Jul 16 13:14:12 2013
@@ -5262,6 +5262,8 @@
 		remove_stasis_subscriptions(queue_data);
 	} else if (ast_attended_transfer_type() == stasis_message_type(msg)) {
 		struct ast_attended_transfer_message *atxfer_msg = stasis_message_data(msg);
+		RAII_VAR(struct ast_channel_snapshot *, caller, NULL, ao2_cleanup);
+		RAII_VAR(struct ast_channel_snapshot *, agent, NULL, ao2_cleanup);
 
 		if (ast_strlen_zero(queue_data->bridge_uniqueid) ||
 				(strcmp(queue_data->bridge_uniqueid,
@@ -5271,7 +5273,17 @@
 			return;
 		}
 
+		if (atxfer_msg->result == AST_BRIDGE_TRANSFER_FAIL) {
+			return;
+		}
+
 		ast_log(LOG_NOTICE, "Detected attended transfer in queue %s\n", queue_data->queue);
+		/* XXX Need to send queue log something-or-other here. Problem is that it doesn't really make
+		 * sense to specify an exten and context on an attended transfer. Perhaps separate queue log message
+		 * type?
+		 */
+		send_agent_complete(queue_data->queue, caller, agent, queue_data->member,
+				queue_data->holdstart, queue_data->starttime, TRANSFER);
 		remove_stasis_subscriptions(queue_data);
 	}
 }




More information about the asterisk-commits mailing list