[svn-commits] trunk - r7732 /trunk/manager.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Jan 3 05:31:57 CST 2006


Author: oej
Date: Tue Jan  3 05:31:56 2006
New Revision: 7732

URL: http://svn.digium.com/view/asterisk?rev=7732&view=rev
Log:
Bug #5228: Add caller ID and CallerIDname to OriginateSuccess/Failure manager events (outtolunc)

Modified:
    trunk/manager.c

Modified: trunk/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/manager.c?rev=7732&r1=7731&r2=7732&view=diff
==============================================================================
--- trunk/manager.c (original)
+++ trunk/manager.c Tue Jan  3 05:31:56 2006
@@ -947,26 +947,23 @@
 			!ast_strlen_zero(in->cid_name) ? in->cid_name : NULL,
 			in->vars, &chan);
 	}   
-	if (!res)
-		manager_event(EVENT_FLAG_CALL,
-			"OriginateSuccess",
-			"%s"
-			"Channel: %s/%s\r\n"
-			"Context: %s\r\n"
-			"Exten: %s\r\n"
-			"Reason: %d\r\n"
-			"Uniqueid: %s\r\n",
-			in->idtext, in->tech, in->data, in->context, in->exten, reason, chan ? chan->uniqueid : "<null>");
-	else
-		manager_event(EVENT_FLAG_CALL,
-			"OriginateFailure",
-			"%s"
-			"Channel: %s/%s\r\n"
-			"Context: %s\r\n"
-			"Exten: %s\r\n"
-			"Reason: %d\r\n"
-			"Uniqueid: %s\r\n",
-			in->idtext, in->tech, in->data, in->context, in->exten, reason, chan ? chan->uniqueid : "<null>");
+	
+	/* Tell the manager what happened with the channel */
+	manager_event(EVENT_FLAG_CALL,
+		res ? "OriginateSuccess" : "OriginateFailure",
+		"%s"
+		"Channel: %s/%s\r\n"
+		"Context: %s\r\n"
+		"Exten: %s\r\n"
+		"Reason: %d\r\n"
+		"Uniqueid: %s\r\n"
+		"CallerID: %s\r\n"
+		"CallerIDName: %s\r\n",
+		in->idtext, in->tech, in->data, in->context, in->exten, reason, 
+		chan ? chan->uniqueid : "<null>",
+		in->cid_num ? in->cid_num : "<unknown>",
+		in->cid_name ? in->cid_name : "<unknown>"
+		);
 
 	/* Locked by ast_pbx_outgoing_exten or ast_pbx_outgoing_app */
 	if (chan)



More information about the svn-commits mailing list