[asterisk-commits] mnicholson: branch 1.4 r258670 - in /branches/1.4: main/ res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 22 16:49:12 CDT 2010
Author: mnicholson
Date: Thu Apr 22 16:49:07 2010
New Revision: 258670
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=258670
Log:
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
Modified:
branches/1.4/main/cdr.c
branches/1.4/main/channel.c
branches/1.4/res/res_features.c
Modified: branches/1.4/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/cdr.c?view=diff&rev=258670&r1=258669&r2=258670
==============================================================================
--- branches/1.4/main/cdr.c (original)
+++ branches/1.4/main/cdr.c Thu Apr 22 16:49:07 2010
@@ -720,8 +720,7 @@
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;
}
}
}
@@ -743,11 +742,9 @@
while (cdr) {
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);
+ check_post(cdr);
if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED)) {
- if (cdr->disposition < AST_CDR_NOANSWER)
- cdr->disposition = AST_CDR_NOANSWER;
+ cdr->disposition = AST_CDR_NOANSWER;
}
cdr = cdr->next;
}
Modified: branches/1.4/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/channel.c?view=diff&rev=258670&r1=258669&r2=258670
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Thu Apr 22 16:49:07 2010
@@ -3480,7 +3480,6 @@
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);
Modified: branches/1.4/res/res_features.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/res/res_features.c?view=diff&rev=258670&r1=258669&r2=258670
==============================================================================
--- branches/1.4/res/res_features.c (original)
+++ branches/1.4/res/res_features.c Thu Apr 22 16:49:07 2010
@@ -1847,6 +1847,11 @@
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 (;;) {
More information about the asterisk-commits
mailing list