aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-30 14:37:21 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-03-30 14:37:21 +0000
commit757bcc9075780a3163e790ae36bf159bc9d1cd3e (patch)
treeeb6820c177bd88edaea52637217e977e8d82fb96 /main/pbx.c
parent51b4ef51f0b50666df25f8b54388d4c466470415 (diff)
Merged revisions 59486 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59486 | murf | 2007-03-30 08:11:59 -0600 (Fri, 30 Mar 2007) | 1 line 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/trunk@59500 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 7d716b2ed..d8aef64df 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -4574,6 +4574,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 {
@@ -4936,7 +4939,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 */