diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-04-22 22:24:09 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-04-22 22:24:09 +0000 |
commit | 00fdb5d32c6d2d5133a942c48b3b09b29506cf74 (patch) | |
tree | ceccc70dd6a91c92ccf21be2bc3b18588b63cec2 /main | |
parent | 5cdcf2f6b3e26a7c0dbcf11e1061c6131327c48d (diff) |
Merged revisions 258671,258675 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r258671 | mnicholson | 2010-04-22 16:57:59 -0500 (Thu, 22 Apr 2010) | 32 lines
Merged revisions 193391,258670 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r193391 | mnicholson | 2009-05-08 16:01:25 -0500 (Fri, 08 May 2009) | 8 lines
Set the proper disposition on originated calls.
(closes issue #14167)
Reported by: jpt
Patches:
call-file-missing-cdr2.diff uploaded by mnicholson (license 96)
Tested by: dlotina, rmartinez, mnicholson
........
r258670 | mnicholson | 2010-04-22 16:49:07 -0500 (Thu, 22 Apr 2010) | 11 lines
Fix broken CDR behavior.
This change allows a CDR record previously marked with disposition ANSWERED to be set as BUSY or NO ANSWER.
Additionally this change partially reverts r235635 and does not set the AST_CDR_FLAG_ORIGINATED flag on CDRs generated from ast_call(). To preserve proper CDR behavior, the AST_CDR_FLAG_DIALED flag is now cleared from all brige CDRs in ast_bridge_call().
(closes issue #16797)
Reported by: VarnishedOtter
Tested by: mnicholson
........
(closes issue #16222)
Reported by: telles
Tested by: mnicholson
................
r258675 | mnicholson | 2010-04-22 17:11:23 -0500 (Thu, 22 Apr 2010) | 2 lines
Fix previous commit.
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@258705 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/cdr.c | 9 | ||||
-rw-r--r-- | main/channel.c | 12 | ||||
-rw-r--r-- | main/features.c | 5 |
3 files changed, 19 insertions, 7 deletions
diff --git a/main/cdr.c b/main/cdr.c index 805a47672..ec9f01694 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -707,8 +707,7 @@ void ast_cdr_busy(struct ast_cdr *cdr) for (; cdr; cdr = cdr->next) { if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) { check_post(cdr); - if (cdr->disposition < AST_CDR_BUSY) - cdr->disposition = AST_CDR_BUSY; + cdr->disposition = AST_CDR_BUSY; } } } @@ -732,10 +731,8 @@ void ast_cdr_noanswer(struct ast_cdr *cdr) while (cdr) { if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) { chan = !ast_strlen_zero(cdr->channel) ? cdr->channel : "<unknown>"; - if (ast_test_flag(cdr, AST_CDR_FLAG_POSTED)) - ast_log(LOG_WARNING, "CDR on channel '%s' already posted\n", chan); - if (cdr->disposition < AST_CDR_NOANSWER) - cdr->disposition = AST_CDR_NOANSWER; + check_post(cdr); + cdr->disposition = AST_CDR_NOANSWER; } cdr = cdr->next; } diff --git a/main/channel.c b/main/channel.c index c3e75baae..c4d246b80 100644 --- a/main/channel.c +++ b/main/channel.c @@ -3892,8 +3892,19 @@ struct ast_channel *__ast_request_and_dial(const char *type, int format, void *d break; case AST_CONTROL_BUSY: + ast_cdr_busy(chan->cdr); + *outstate = f->subclass; + timeout = 0; + break; + case AST_CONTROL_CONGESTION: + ast_cdr_failed(chan->cdr); + *outstate = f->subclass; + timeout = 0; + break; + case AST_CONTROL_ANSWER: + ast_cdr_answer(chan->cdr); *outstate = f->subclass; timeout = 0; /* trick to force exit from the while() */ break; @@ -4024,7 +4035,6 @@ int ast_call(struct ast_channel *chan, char *addr, int timeout) if (!ast_test_flag(chan, AST_FLAG_ZOMBIE) && !ast_check_hangup(chan)) { if (chan->cdr) { ast_set_flag(chan->cdr, AST_CDR_FLAG_DIALED); - ast_set_flag(chan->cdr, AST_CDR_FLAG_ORIGINATED); } if (chan->tech->call) res = chan->tech->call(chan, addr, timeout); diff --git a/main/features.c b/main/features.c index 2794a8c31..1b7faa625 100644 --- a/main/features.c +++ b/main/features.c @@ -2553,6 +2553,11 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast ast_set_flag(peer_cdr, AST_CDR_FLAG_BRIDGED); } } + /* the DIALED flag may be set if a dialed channel is transfered + * and then bridged to another channel. In order for the + * bridge CDR to be written, the DIALED flag must not be + * present. */ + ast_clear_flag(bridge_cdr, AST_CDR_FLAG_DIALED); } for (;;) { struct ast_channel *other; /* used later */ |