From 84806582ece61aab11523a45fa3262c767501c13 Mon Sep 17 00:00:00 2001 From: jpeeler Date: Mon, 12 Jan 2009 21:42:34 +0000 Subject: (closes issue #13881) Reported by: hoowa Update the app CDR field for AGI commands that are not executing an application via "exec". git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@168516 f38db490-d61c-443f-a65b-d21fe96a405b --- res/res_agi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'res/res_agi.c') diff --git a/res/res_agi.c b/res/res_agi.c index ae19c4bf4..a80198bf3 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -1830,6 +1830,11 @@ static int agi_handle_command(struct ast_channel *chan, AGI *agi, char *buf) 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: -- cgit v1.2.3