[asterisk-commits] mnicholson: trunk r258671 - in /trunk: ./ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 22 16:58:09 CDT 2010
Author: mnicholson
Date: Thu Apr 22 16:57:59 2010
New Revision: 258671
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=258671
Log:
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
Modified:
trunk/ (props changed)
trunk/main/cdr.c
trunk/main/channel.c
trunk/main/features.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/cdr.c?view=diff&rev=258671&r1=258670&r2=258671
==============================================================================
--- trunk/main/cdr.c (original)
+++ trunk/main/cdr.c Thu Apr 22 16:57:59 2010
@@ -740,8 +740,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;
}
}
}
@@ -765,10 +764,8 @@
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;
}
Modified: trunk/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/channel.c?view=diff&rev=258671&r1=258670&r2=258671
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Thu Apr 22 16:57:59 2010
@@ -4660,7 +4660,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);
@@ -6141,6 +6140,24 @@
ast_clear_flag(c0, AST_FLAG_NBRIDGE);
ast_clear_flag(c1, AST_FLAG_NBRIDGE);
+
+ 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;
if (c0->_softhangup == AST_SOFTHANGUP_UNBRIDGE || c1->_softhangup == AST_SOFTHANGUP_UNBRIDGE)
continue;
Modified: trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features.c?view=diff&rev=258671&r1=258670&r2=258671
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Thu Apr 22 16:57:59 2010
@@ -3098,6 +3098,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);
}
ast_cel_report_event(chan, AST_CEL_BRIDGE_START, NULL, NULL, NULL);
for (;;) {
More information about the asterisk-commits
mailing list