From: Steve Murphy Date: Tue, 11 Sep 2007 20:36:15 +0000 (+0000) Subject: this change should fix issue # 10659 -- what I worry about is how many other bug... X-Git-Tag: 1.4.12~104 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e84f98ea4fa52453177ed5e12f7b84047f8b899e;p=thirdparty%2Fasterisk.git this change should fix issue # 10659 -- what I worry about is how many other bug reports it may generate. Hopefully, we can please the/a majority. Hopefully. We shall see. Calls not marked ANSWERED and with only one channel name will not be posted. This should eliminate the double CDR's. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82261 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/cdr.c b/main/cdr.c index d7ed538697..b588968601 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -978,6 +978,8 @@ static void post_cdr(struct ast_cdr *cdr) struct ast_cdr_beitem *i; for ( ; cdr ; cdr = cdr->next) { + if (cdr->disposition < AST_CDR_ANSWERED && (ast_strlen_zero(cdr->channel) || ast_strlen_zero(cdr->dstchannel))) + continue; /* people don't want to see unanswered single-channel events */ chan = S_OR(cdr->channel, ""); check_post(cdr); if (ast_tvzero(cdr->end))