[asterisk-commits] mmichelson: trunk r139832 - /trunk/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 25 12:24:02 CDT 2008


Author: mmichelson
Date: Mon Aug 25 12:24:02 2008
New Revision: 139832

URL: http://svn.digium.com/view/asterisk?view=rev&rev=139832
Log:
Add output of variables to AgentRingNoAnswer manager
event if eventwhencalled is set to "vars" in 
queues.conf. Yay for consistency.

(closes issue #13369)
Reported by: srt
Patches:
      13369_agentringnoanswer_variables.diff uploaded by srt (license 378)


Modified:
    trunk/apps/app_queue.c

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=139832&r1=139831&r2=139832
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Mon Aug 25 12:24:02 2008
@@ -2449,20 +2449,25 @@
 static void rna(int rnatime, struct queue_ent *qe, char *interface, char *membername)
 {
 	ast_verb(3, "Nobody picked up in %d ms\n", rnatime);
-	if (qe->parent->eventwhencalled)
+	if (qe->parent->eventwhencalled) {
+		char vars[2048];
+
 		manager_event(EVENT_FLAG_AGENT, "AgentRingNoAnswer",
 						"Queue: %s\r\n"
 						"Uniqueid: %s\r\n"
 						"Channel: %s\r\n"
 						"Member: %s\r\n"
 						"MemberName: %s\r\n"
-						"Ringtime: %d\r\n",
+						"Ringtime: %d\r\n"
+						"%s",
 						qe->parent->name,
 						qe->chan->uniqueid,
 						qe->chan->name,
 						interface,
 						membername,
-						rnatime);
+						rnatime,
+						qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
+	}
 	ast_queue_log(qe->parent->name, qe->chan->uniqueid, membername, "RINGNOANSWER", "%d", rnatime);
 	if (qe->parent->autopause) {
 		if (!set_member_paused(qe->parent->name, interface, "Auto-Pause", 1)) {




More information about the asterisk-commits mailing list