diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-30 14:11:59 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-30 14:11:59 +0000 |
commit | 3bbd029dc1830cd9c95e80d40b94b497e8eb03ce (patch) | |
tree | 371ceb6ca44bb4823cf9edd0950c46a27e43b866 /main/pbx.c | |
parent | 9b58ce234b81070f69a8b7b5eb46630fb5643f89 (diff) |
These mods fix CDR issues from 8221, 8593, 8680, 8743, and perhaps others. Mainly with CDRs generated from transfer situations.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@59486 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c index a6e5f2d7d..e8dbb491e 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -4559,6 +4559,9 @@ int ast_async_goto(struct ast_channel *chan, const char *context, const char *ex the PBX, we have to make a new channel, masquerade, and start the PBX at the new location */ struct ast_channel *tmpchan = ast_channel_alloc(0, chan->_state, 0, 0, "AsyncGoto/%s", chan->name); + if (chan->cdr) { + tmpchan->cdr = ast_cdr_dup(chan->cdr); + } if (!tmpchan) res = -1; else { @@ -4921,7 +4924,10 @@ static int ast_pbx_outgoing_cdr_failed(void) if (!chan) return -1; /* failure */ - chan->cdr = ast_cdr_alloc(); /* allocate a cdr for the channel */ + if (!chan->cdr) { + chan->cdr = ast_cdr_alloc(); /* allocate a cdr for the channel */ + ast_log(LOG_NOTICE, "=====PBX_OUTGOING_CDR_FAILED ALLOCS CHANNEL CDR for %s\n", chan->name); + } if (!chan->cdr) { /* allocation of the cdr failed */ |