]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 168517 via svnmerge from
authorJeff Peeler <jpeeler@digium.com>
Mon, 12 Jan 2009 21:52:32 +0000 (21:52 +0000)
committerJeff Peeler <jpeeler@digium.com>
Mon, 12 Jan 2009 21:52:32 +0000 (21:52 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r168517 | jpeeler | 2009-01-12 15:51:46 -0600 (Mon, 12 Jan 2009) | 12 lines

  Merged revisions 168516 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r168516 | jpeeler | 2009-01-12 15:42:34 -0600 (Mon, 12 Jan 2009) | 5 lines

    (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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@168518 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_agi.c

index cb0d7a91712cf1f27925e6d0464b4aed24b310a7..ece9c0bbeb000c022ea6af280332ab657d32b95f 100644 (file)
@@ -2589,6 +2589,11 @@ static int agi_handle_command(struct ast_channel *chan, AGI *agi, char *buf, int
                the module we are using */
                if (c->mod != ast_module_info->self)
                        ast_module_ref(c->mod);
+               /* 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);
                if (c->mod != ast_module_info->self)
                        ast_module_unref(c->mod);