This patch is meant to fix 8433; where clid and src are lost via bridging.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@71230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Steve Murphy
2007-06-23 03:29:48 +00:00
parent d0bc56b953
commit 6f6ffbb5c5
2 changed files with 77 additions and 10 deletions

View File

@@ -1558,11 +1558,14 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
/* absorb the channel cdr */
ast_cdr_merge(bridge_cdr, chan->cdr);
ast_cdr_discard(chan->cdr); /* no posting these guys */
if (!ast_test_flag(chan->cdr, AST_CDR_FLAG_LOCKED))
ast_cdr_discard(chan->cdr); /* if locked cdrs are in chan, they are taken over in the merge */
/* absorb the peer cdr */
ast_cdr_merge(bridge_cdr, peer->cdr);
ast_cdr_discard(peer->cdr); /* no posting these guys */
if (ast_test_flag(peer->cdr, AST_CDR_FLAG_LOCKED))
ast_cdr_discard(peer->cdr); /* if locked cdrs are in peer, they are taken over in the merge */
peer->cdr = NULL;
chan->cdr = bridge_cdr; /* make this available to the rest of the world via the chan while the call is in progress */
} else if (chan->cdr) {
@@ -1570,14 +1573,16 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
ast_cdr_init(bridge_cdr,chan);
/* absorb this data */
ast_cdr_merge(bridge_cdr, chan->cdr);
ast_cdr_discard(chan->cdr); /* no posting these guys */
if (!ast_test_flag(chan->cdr, AST_CDR_FLAG_LOCKED))
ast_cdr_discard(chan->cdr); /* if locked cdrs are in chan, they are taken over in the merge */
chan->cdr = bridge_cdr; /* make this available to the rest of the world via the chan while the call is in progress */
} else if (peer->cdr) {
/* take the cdr from the peer - literally */
ast_cdr_init(bridge_cdr,peer);
/* absorb this data */
ast_cdr_merge(bridge_cdr, peer->cdr);
ast_cdr_discard(peer->cdr); /* no posting these guys */
if (!ast_test_flag(chan->cdr, AST_CDR_FLAG_LOCKED))
ast_cdr_discard(chan->cdr); /* if locked cdrs are in chan, they are taken over in the merge */
peer->cdr = NULL;
peer->cdr = bridge_cdr; /* make this available to the rest of the world via the chan while the call is in progress */
} else {