Merged revisions 14234 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Wed, 22 Mar 2006 21:43:38 +0000 (21:43 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 22 Mar 2006 21:43:38 +0000 (21:43 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r14234 | file | 2006-03-22 17:38:32 -0400 (Wed, 22 Mar 2006) | 2 lines

Issue #5918 - Disposition showing FAILED even though call is answered successfully (Reported by tracinet)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14235 65c4cc65-6c06-0410-ace0-fbb531ad65f3

cdr.c
include/asterisk/cdr.h

diff --git a/cdr.c b/cdr.c
index 19c73dc..323c8ad 100644 (file)
--- a/cdr.c
+++ b/cdr.c
@@ -515,8 +515,10 @@ void ast_cdr_failed(struct ast_cdr *cdr)
                chan = !ast_strlen_zero(cdr->channel) ? cdr->channel : "<unknown>";
                if (ast_test_flag(cdr, AST_CDR_FLAG_POSTED))
                        ast_log(LOG_WARNING, "CDR on channel '%s' already posted\n", chan);
-               if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED))
-                       cdr->disposition = AST_CDR_FAILED;
+               if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) {
+                       if (cdr->disposition < AST_CDR_FAILED)
+                               cdr->disposition = AST_CDR_FAILED;
+               }
                cdr = cdr->next;
        }
 }
index e668550..b08f0fd 100644 (file)
@@ -32,8 +32,8 @@
 
 #define AST_CDR_NOANSWER                       (1 << 0)
 #define AST_CDR_BUSY                           (1 << 1)
-#define AST_CDR_ANSWERED                       (1 << 2)
-#define AST_CDR_FAILED                         (1 << 3)
+#define AST_CDR_FAILED                         (1 << 2)
+#define AST_CDR_ANSWERED                       (1 << 3)
 
 /*! AMA Flags */
 #define AST_CDR_OMIT                           (1)