aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_agi.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-12 21:42:34 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-12 21:42:34 +0000
commit84806582ece61aab11523a45fa3262c767501c13 (patch)
tree8409e5d903f4968140d980c99242dfa2bf88ef86 /res/res_agi.c
parentae5d77905b37c81b6744175b4d3afbe6af6736d5 (diff)
(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
Diffstat (limited to 'res/res_agi.c')
-rw-r--r--res/res_agi.c5
1 files changed, 5 insertions, 0 deletions
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: