[asterisk-commits] qwell: branch qwell/queue_events r390852 - /team/qwell/queue_events/apps/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 7 11:18:06 CDT 2013


Author: qwell
Date: Fri Jun  7 11:18:05 2013
New Revision: 390852

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390852
Log:
Address review feedback.

Modified:
    team/qwell/queue_events/apps/app_queue.c

Modified: team/qwell/queue_events/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/qwell/queue_events/apps/app_queue.c?view=diff&rev=390852&r1=390851&r2=390852
==============================================================================
--- team/qwell/queue_events/apps/app_queue.c (original)
+++ team/qwell/queue_events/apps/app_queue.c Fri Jun  7 11:18:05 2013
@@ -1019,6 +1019,7 @@
 		<managerEventInstance class="EVENT_FLAG_AGENT">
 			<synopsis>Raised when a caller joins a Queue.</synopsis>
 			<syntax>
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" />
 				<parameter name="Position">
 					<para>This channel's current position in the queue.</para>
@@ -1037,6 +1038,7 @@
 		<managerEventInstance class="EVENT_FLAG_AGENT">
 			<synopsis>Raised when a caller leaves a Queue.</synopsis>
 			<syntax>
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueCallerJoin']/managerEventInstance/syntax/parameter[@name='Count'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueCallerJoin']/managerEventInstance/syntax/parameter[@name='Position'])" />
@@ -1050,6 +1052,7 @@
 		<managerEventInstance class="EVENT_FLAG_AGENT">
 			<synopsis>Raised when a caller abandons the queue.</synopsis>
 			<syntax>
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueCallerJoin']/managerEventInstance/syntax/parameter[@name='Position'])" />
 				<parameter name="OriginalPosition">
@@ -1065,6 +1068,8 @@
 		<managerEventInstance class="EVENT_FLAG_AGENT">
 			<synopsis>Raised when an queue member is notified of a caller in the queue.</synopsis>
 			<syntax>
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='DialBegin']/managerEventInstance/syntax/parameter[contains(@name, 'Dest')])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Interface'])" />
@@ -1080,6 +1085,8 @@
 		<managerEventInstance class="EVENT_FLAG_AGENT">
 			<synopsis>Raised when a queue member is notified of a caller in the queue and fails to answer.</synopsis>
 			<syntax>
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='DialBegin']/managerEventInstance/syntax/parameter[contains(@name, 'Dest')])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Interface'])" />
@@ -1096,6 +1103,8 @@
 		<managerEventInstance class="EVENT_FLAG_AGENT">
 			<synopsis>Raised when a queue member has finished servicing a caller in the queue.</synopsis>
 			<syntax>
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='DialBegin']/managerEventInstance/syntax/parameter[contains(@name, 'Dest')])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Interface'])" />
@@ -1121,6 +1130,8 @@
 		<managerEventInstance class="EVENT_FLAG_AGENT">
 			<synopsis>Raised when a queue member hangs up on a caller in the queue.</synopsis>
 			<syntax>
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='DialBegin']/managerEventInstance/syntax/parameter[contains(@name, 'Dest')])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Interface'])" />
@@ -1135,6 +1146,8 @@
 		<managerEventInstance class="EVENT_FLAG_AGENT">
 			<synopsis>Raised when a queue member answers and is bridged to a caller in the queue.</synopsis>
 			<syntax>
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+				<xi:include xpointer="xpointer(/docs/managerEvent[@name='DialBegin']/managerEventInstance/syntax/parameter[contains(@name, 'Dest')])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Queue'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='MemberName'])" />
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='QueueMemberStatus']/managerEventInstance/syntax/parameter[@name='Interface'])" />
@@ -1911,19 +1924,6 @@
 		"%s", ast_str_buffer(event_string));
 }
 
-static void queue_publish_channel_blob(struct ast_channel *chan, struct stasis_message_type *type, struct ast_json *blob)
-{
-	RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup);
-
-	msg = ast_channel_blob_create(chan, type, blob);
-
-	if (!msg) {
-		return;
-	}
-
-	stasis_publish(ast_channel_topic(chan), msg);
-}
-
 static void queue_publish_multi_channel_blob(struct ast_channel *caller, struct ast_channel *agent, struct stasis_message_type *type, struct ast_json *blob)
 {
 	RAII_VAR(struct ast_multi_channel_blob *, payload, NULL, ao2_cleanup);
@@ -3320,7 +3320,7 @@
 				     "Queue", q->name,
 				     "Position", qe->pos,
 				     "Count", q->count);
-		queue_publish_channel_blob(qe->chan, queue_caller_join_type(), blob);
+		ast_channel_publish_blob(qe->chan, queue_caller_join_type(), blob);
 		ast_debug(1, "Queue '%s' Join, Channel '%s', Position '%d'\n", q->name, ast_channel_name(qe->chan), qe->pos );
 	}
 	ao2_unlock(q);
@@ -3599,7 +3599,7 @@
 					     "Queue", q->name,
 					     "Position", qe->pos,
 					     "Count", q->count);
-			queue_publish_channel_blob(qe->chan, queue_caller_leave_type(), blob);
+			ast_channel_publish_blob(qe->chan, queue_caller_leave_type(), blob);
 			ast_debug(1, "Queue '%s' Leave, Channel '%s'\n", q->name, ast_channel_name(qe->chan));
 			/* Take us out of the queue */
 			if (prev) {
@@ -4214,7 +4214,7 @@
 			     "Position", qe->pos,
 			     "OriginalPosition", qe->opos,
 			     "HoldTime", (int)(time(NULL) - qe->start));
-	queue_publish_channel_blob(qe->chan, queue_caller_abandon_type(), blob);
+	ast_channel_publish_blob(qe->chan, queue_caller_abandon_type(), blob);
 
 	qe->parent->callsabandoned++;
 	ao2_unlock(qe->parent);




More information about the asterisk-commits mailing list