diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-23 03:29:48 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-23 03:29:48 +0000 |
commit | 39f2779ece2564c4e7ff04a19f5a591deb45cf55 (patch) | |
tree | 115e3cf695330578e5775a7f7d29c743a33a94dc /res | |
parent | 5234dc87ec2219089925066b0ffc7e47a0360230 (diff) |
This patch is meant to fix 8433; where clid and src are lost via bridging.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@71230 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_features.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/res/res_features.c b/res/res_features.c index b672df72f..cd273a076 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -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 { |