diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-21 13:18:12 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-21 13:18:12 +0000 |
commit | bcf9c108a2928819d2cdd51ec2742daee51c0977 (patch) | |
tree | 20f0ef658b05627003b44e69ec0d4ce7ef9fb8de /main/cdr.c | |
parent | b46a50d87a963a3f0ea78c7b3ddbd04ca57764a0 (diff) |
Merged revisions 70656 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r70656 | murf | 2007-06-21 07:00:39 -0600 (Thu, 21 Jun 2007) | 1 line
Via complaints aired in asterisk-users, I submit these changes, which allow cdr updates to see macro context/exten, whether hung up or not
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70676 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/cdr.c')
-rw-r--r-- | main/cdr.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/main/cdr.c b/main/cdr.c index 5d447e0df..d19f6a8ad 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -775,8 +775,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)); } @@ -891,11 +891,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)); } } |