]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Via complaints aired in asterisk-users, I submit these changes, which allow cdr updat...
authorSteve Murphy <murf@digium.com>
Thu, 21 Jun 2007 13:00:39 +0000 (13:00 +0000)
committerSteve Murphy <murf@digium.com>
Thu, 21 Jun 2007 13:00:39 +0000 (13:00 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@70656 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/cdr.c

index baa1165f825c14a3a0a2eeea61a36d99eb4830d8..f5693e6c682d629c5bd6d6edd0e8a48c55a86408 100644 (file)
@@ -772,8 +772,8 @@ int ast_cdr_init(struct ast_cdr *cdr, struct ast_channel *c)
                        cdr->amaflags = c->amaflags ? c->amaflags :  ast_default_amaflags;
                        ast_copy_string(cdr->accountcode, c->accountcode, sizeof(cdr->accountcode));
                        /* Destination information */
-                       ast_copy_string(cdr->dst, c->exten, sizeof(cdr->dst));
-                       ast_copy_string(cdr->dcontext, c->context, sizeof(cdr->dcontext));
+                       ast_copy_string(cdr->dst, S_OR(c->macroexten,c->exten), sizeof(cdr->dst));
+                       ast_copy_string(cdr->dcontext, S_OR(c->macrocontext,c->context), sizeof(cdr->dcontext));
                        /* Unique call identifier */
                        ast_copy_string(cdr->uniqueid, c->uniqueid, sizeof(cdr->uniqueid));
                }
@@ -888,11 +888,10 @@ int ast_cdr_update(struct ast_channel *c)
 
                        /* Copy account code et-al */   
                        ast_copy_string(cdr->accountcode, c->accountcode, sizeof(cdr->accountcode));
-                       if (!ast_check_hangup(c)) {
-                               /* Destination information */ /* XXX privilege macro* ? */
-                               ast_copy_string(cdr->dst, S_OR(c->macroexten, c->exten), sizeof(cdr->dst));
-                               ast_copy_string(cdr->dcontext, S_OR(c->macrocontext, c->context), sizeof(cdr->dcontext));
-                       }
+                       
+                       /* Destination information */ /* XXX privilege macro* ? */
+                       ast_copy_string(cdr->dst, S_OR(c->macroexten, c->exten), sizeof(cdr->dst));
+                       ast_copy_string(cdr->dcontext, S_OR(c->macrocontext, c->context), sizeof(cdr->dcontext));
                }
        }