summaryrefslogtreecommitdiff
path: root/main/channel.c
diff options
context:
space:
mode:
authorMatthew Nicholson <mnicholson@digium.com>2010-04-22 21:57:59 +0000
committerMatthew Nicholson <mnicholson@digium.com>2010-04-22 21:57:59 +0000
commit8c41f2db8290ffc31d1bb35d00098a97288fe869 (patch)
tree3f49bb608f642f065ff7ce5c2c0be64486c7acb8 /main/channel.c
parent52a8ddba515d5ea2bce69c8ba1d15b926f680f93 (diff)
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/channel.c')
-rw-r--r--main/channel.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index dfa61b23b..712da3d2b 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -4660,7 +4660,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);
@@ -6142,6 +6141,24 @@ enum ast_bridge_result ast_channel_bridge(struct ast_channel *c0, struct ast_cha
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;