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: https://origsvn.digium.com/svn/asterisk/trunk@70676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Steve Murphy 19 years ago
parent cf5666ca7a
commit a1e9cb4aca

@ -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; cdr->amaflags = c->amaflags ? c->amaflags : ast_default_amaflags;
ast_copy_string(cdr->accountcode, c->accountcode, sizeof(cdr->accountcode)); ast_copy_string(cdr->accountcode, c->accountcode, sizeof(cdr->accountcode));
/* Destination information */ /* Destination information */
ast_copy_string(cdr->dst, c->exten, sizeof(cdr->dst)); ast_copy_string(cdr->dst, S_OR(c->macroexten,c->exten), sizeof(cdr->dst));
ast_copy_string(cdr->dcontext, c->context, sizeof(cdr->dcontext)); ast_copy_string(cdr->dcontext, S_OR(c->macrocontext,c->context), sizeof(cdr->dcontext));
/* Unique call identifier */ /* Unique call identifier */
ast_copy_string(cdr->uniqueid, c->uniqueid, sizeof(cdr->uniqueid)); ast_copy_string(cdr->uniqueid, c->uniqueid, sizeof(cdr->uniqueid));
} }
@ -891,13 +891,12 @@ int ast_cdr_update(struct ast_channel *c)
/* Copy account code et-al */ /* Copy account code et-al */
ast_copy_string(cdr->accountcode, c->accountcode, sizeof(cdr->accountcode)); ast_copy_string(cdr->accountcode, c->accountcode, sizeof(cdr->accountcode));
if (!ast_check_hangup(c)) {
/* Destination information */ /* XXX privilege macro* ? */ /* Destination information */ /* XXX privilege macro* ? */
ast_copy_string(cdr->dst, S_OR(c->macroexten, c->exten), sizeof(cdr->dst)); 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)); ast_copy_string(cdr->dcontext, S_OR(c->macrocontext, c->context), sizeof(cdr->dcontext));
} }
} }
}
return 0; return 0;
} }

Loading…
Cancel
Save