Index: res/res_features.c =================================================================== --- res/res_features.c (revision 158135) +++ res/res_features.c (working copy) @@ -1458,8 +1458,8 @@ struct ast_bridge_config backup_config; struct ast_cdr *bridge_cdr = NULL; struct ast_cdr *orig_peer_cdr = NULL; - struct ast_cdr *chan_cdr = pick_unlocked_cdr(chan->cdr); /* the proper chan cdr, if there are forked cdrs */ - struct ast_cdr *peer_cdr = pick_unlocked_cdr(peer->cdr); /* the proper chan cdr, if there are forked cdrs */ + struct ast_cdr *chan_cdr = chan->cdr; /* the proper chan cdr, if there are forked cdrs */ + struct ast_cdr *peer_cdr = peer->cdr; /* the proper chan cdr, if there are forked cdrs */ struct ast_cdr *new_chan_cdr = NULL; /* the proper chan cdr, if there are forked cdrs */ struct ast_cdr *new_peer_cdr = NULL; /* the proper chan cdr, if there are forked cdrs */ @@ -1509,6 +1509,9 @@ bridge_cdr = ast_cdr_dup(chan_cdr); ast_copy_string(bridge_cdr->lastapp, chan->appl, sizeof(bridge_cdr->lastapp)); ast_copy_string(bridge_cdr->lastdata, chan->data, sizeof(bridge_cdr->lastdata)); + bridge_cdr->next = chan_cdr->next; /* rip any forked CDR's off the chan_cdr, and + attach them to the bridge_cdr instead */ + chan_cdr->next = NULL; } else { /* better yet, in a xfer situation, find out why the chan cdr got zapped (pun unintentional) */ bridge_cdr = ast_cdr_alloc(); /* this should be really, really rare/impossible? */ @@ -1542,6 +1545,8 @@ chan_cdr->answer = peer_cdr->answer; bridge_cdr->disposition = peer_cdr->disposition; chan_cdr->disposition = peer_cdr->disposition; + if (bridge_cdr->next) + ast_cdr_answer(bridge_cdr->next); /* set the answer times on any forked CDR's */ } else { ast_cdr_answer(bridge_cdr); ast_cdr_answer(chan_cdr); /* for the sake of cli status checks */