mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
Some tweaks to satisfy CDR bug 8796, where being in 'h' extension louses up the dst field
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
10
cdr.c
10
cdr.c
@@ -775,16 +775,18 @@ 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));
|
||||||
/* Destination information */
|
if (!ast_check_hangup(c)) {
|
||||||
ast_copy_string(cdr->dst, (ast_strlen_zero(c->macroexten)) ? c->exten : c->macroexten, sizeof(cdr->dst));
|
/* Destination information */ /* XXX privilege macro* ? */
|
||||||
ast_copy_string(cdr->dcontext, (ast_strlen_zero(c->macrocontext)) ? c->context : c->macrocontext, sizeof(cdr->dcontext));
|
ast_copy_string(cdr->dst, (ast_strlen_zero(c->macroexten)) ? c->exten : c->macroexten, sizeof(cdr->dst));
|
||||||
|
ast_copy_string(cdr->dcontext, (ast_strlen_zero(c->macrocontext)) ? c->context : c->macrocontext, sizeof(cdr->dcontext));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cdr = cdr->next;
|
cdr = cdr->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ast_cdr_amaflags2int(const char *flag)
|
int ast_cdr_amaflags2int(const char *flag)
|
||||||
{
|
{
|
||||||
if (!strcasecmp(flag, "default"))
|
if (!strcasecmp(flag, "default"))
|
||||||
|
2
pbx.c
2
pbx.c
@@ -562,7 +562,7 @@ int pbx_exec(struct ast_channel *c, /*!< Channel */
|
|||||||
int (*execute)(struct ast_channel *chan, void *data) = app->execute;
|
int (*execute)(struct ast_channel *chan, void *data) = app->execute;
|
||||||
|
|
||||||
if (newstack) {
|
if (newstack) {
|
||||||
if (c->cdr)
|
if (c->cdr && !ast_check_hangup(c))
|
||||||
ast_cdr_setapp(c->cdr, app->name, data);
|
ast_cdr_setapp(c->cdr, app->name, data);
|
||||||
|
|
||||||
/* save channel values */
|
/* save channel values */
|
||||||
|
Reference in New Issue
Block a user