[asterisk-commits] jpeeler: branch 1.4 r168516 - /branches/1.4/res/res_agi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 12 15:42:35 CST 2009


Author: jpeeler
Date: Mon Jan 12 15:42:34 2009
New Revision: 168516

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168516
Log:
(closes issue #13881)
Reported by: hoowa

Update the app CDR field for AGI commands that are not executing an application via "exec".

Modified:
    branches/1.4/res/res_agi.c

Modified: branches/1.4/res/res_agi.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/res/res_agi.c?view=diff&rev=168516&r1=168515&r2=168516
==============================================================================
--- branches/1.4/res/res_agi.c (original)
+++ branches/1.4/res/res_agi.c Mon Jan 12 15:42:34 2009
@@ -1830,6 +1830,11 @@
 	parse_args(buf, &argc, argv);
 	c = find_command(argv, 0);
 	if (c) {
+		/* If the AGI command being executed is an actual application (using agi exec)
+		the app field will be updated in pbx_exec via handle_exec */
+		if (chan->cdr && !ast_check_hangup(chan) && strcasecmp(argv[0], "EXEC"))
+			ast_cdr_setapp(chan->cdr, "AGI", buf);
+
 		res = c->handler(chan, agi, argc, argv);
 		switch(res) {
 		case RESULT_SHOWUSAGE:




More information about the asterisk-commits mailing list