mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
The CDRfix4/5/6 omnibus cdr fixes.
(closes issue #10927) Reported by: murf Tested by: murf, deeperror (closes issue #12907) Reported by: falves11 Tested by: murf, falves11 (closes issue #11849) Reported by: greyvoip As to 11849, I think these changes fix the core problems brought up in that bug, but perhaps not the more global problems created by the limitations of CDR's themselves not being oriented around transfers. Reopen if necc, but bug reports are not the best medium for enhancement discussions. We need to start a second-generation CDR standardization effort to cover transfers. (closes issue #11093) Reported by: rossbeer Tested by: greyvoip, murf git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@127663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3513,18 +3513,6 @@ static int attempt_transfer(struct dahdi_pvt *p)
|
||||
}
|
||||
if (p->subs[SUB_THREEWAY].owner->_state == AST_STATE_RING) {
|
||||
tone_zone_play_tone(p->subs[SUB_THREEWAY].dfd, DAHDI_TONE_RINGTONE);
|
||||
}
|
||||
if (p->subs[SUB_REAL].owner->cdr) {
|
||||
/* Move CDR from second channel to current one */
|
||||
p->subs[SUB_THREEWAY].owner->cdr =
|
||||
ast_cdr_append(p->subs[SUB_THREEWAY].owner->cdr, p->subs[SUB_REAL].owner->cdr);
|
||||
p->subs[SUB_REAL].owner->cdr = NULL;
|
||||
}
|
||||
if (ast_bridged_channel(p->subs[SUB_REAL].owner)->cdr) {
|
||||
/* Move CDR from second channel's bridge to current one */
|
||||
p->subs[SUB_THREEWAY].owner->cdr =
|
||||
ast_cdr_append(p->subs[SUB_THREEWAY].owner->cdr, ast_bridged_channel(p->subs[SUB_REAL].owner)->cdr);
|
||||
ast_bridged_channel(p->subs[SUB_REAL].owner)->cdr = NULL;
|
||||
}
|
||||
if (ast_channel_masquerade(p->subs[SUB_THREEWAY].owner, ast_bridged_channel(p->subs[SUB_REAL].owner))) {
|
||||
ast_log(LOG_WARNING, "Unable to masquerade %s as %s\n",
|
||||
@@ -3542,18 +3530,6 @@ static int attempt_transfer(struct dahdi_pvt *p)
|
||||
if (p->subs[SUB_REAL].owner->_state == AST_STATE_RING) {
|
||||
tone_zone_play_tone(p->subs[SUB_REAL].dfd, DAHDI_TONE_RINGTONE);
|
||||
}
|
||||
if (p->subs[SUB_THREEWAY].owner->cdr) {
|
||||
/* Move CDR from second channel to current one */
|
||||
p->subs[SUB_REAL].owner->cdr =
|
||||
ast_cdr_append(p->subs[SUB_REAL].owner->cdr, p->subs[SUB_THREEWAY].owner->cdr);
|
||||
p->subs[SUB_THREEWAY].owner->cdr = NULL;
|
||||
}
|
||||
if (ast_bridged_channel(p->subs[SUB_THREEWAY].owner)->cdr) {
|
||||
/* Move CDR from second channel's bridge to current one */
|
||||
p->subs[SUB_REAL].owner->cdr =
|
||||
ast_cdr_append(p->subs[SUB_REAL].owner->cdr, ast_bridged_channel(p->subs[SUB_THREEWAY].owner)->cdr);
|
||||
ast_bridged_channel(p->subs[SUB_THREEWAY].owner)->cdr = NULL;
|
||||
}
|
||||
if (ast_channel_masquerade(p->subs[SUB_REAL].owner, ast_bridged_channel(p->subs[SUB_THREEWAY].owner))) {
|
||||
ast_log(LOG_WARNING, "Unable to masquerade %s as %s\n",
|
||||
ast_bridged_channel(p->subs[SUB_THREEWAY].owner)->name, p->subs[SUB_REAL].owner->name);
|
||||
@@ -4305,6 +4281,17 @@ static struct ast_frame *dahdi_handle_event(struct ast_channel *ast)
|
||||
dahdi_enable_ec(p);
|
||||
ast_hangup(chan);
|
||||
} else {
|
||||
struct ast_channel *other = ast_bridged_channel(p->subs[SUB_THREEWAY].owner);
|
||||
int way3bridge = 0, cdr3way = 0;
|
||||
|
||||
if (!other) {
|
||||
other = ast_bridged_channel(p->subs[SUB_REAL].owner);
|
||||
} else
|
||||
way3bridge = 1;
|
||||
|
||||
if (p->subs[SUB_THREEWAY].owner->cdr)
|
||||
cdr3way = 1;
|
||||
|
||||
if (option_verbose > 2)
|
||||
ast_verbose(VERBOSE_PREFIX_3 "Started three way call on channel %d\n", p->channel);
|
||||
/* Start music on hold if appropriate */
|
||||
@@ -4340,6 +4327,16 @@ static struct ast_frame *dahdi_handle_event(struct ast_channel *ast)
|
||||
if (((ast->pbx) || (ast->_state == AST_STATE_UP)) &&
|
||||
(p->transfertobusy || (ast->_state != AST_STATE_BUSY))) {
|
||||
int otherindex = SUB_THREEWAY;
|
||||
struct ast_channel *other = ast_bridged_channel(p->subs[SUB_THREEWAY].owner);
|
||||
int way3bridge = 0, cdr3way = 0;
|
||||
|
||||
if (!other) {
|
||||
other = ast_bridged_channel(p->subs[SUB_REAL].owner);
|
||||
} else
|
||||
way3bridge = 1;
|
||||
|
||||
if (p->subs[SUB_THREEWAY].owner->cdr)
|
||||
cdr3way = 1;
|
||||
|
||||
if (option_verbose > 2)
|
||||
ast_verbose(VERBOSE_PREFIX_3 "Building conference on call on %s and %s\n", p->subs[SUB_THREEWAY].owner->name, p->subs[SUB_REAL].owner->name);
|
||||
|
Reference in New Issue
Block a user