[asterisk-commits] file: trunk r107017 - in /trunk: ./ apps/ include/asterisk/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 10 09:36:17 CDT 2008
Author: file
Date: Mon Mar 10 09:36:16 2008
New Revision: 107017
URL: http://svn.digium.com/view/asterisk?view=rev&rev=107017
Log:
Merged revisions 107016 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r107016 | file | 2008-03-10 11:33:02 -0300 (Mon, 10 Mar 2008) | 7 lines
Move where unanswered CDRs are dropped to the CDR core, not everything uses app_dial.
(closes issue #11516)
Reported by: ys
Patches:
branch_1.4_cdr.diff uploaded by ys (license 281)
Tested by: anest, jcapp, dartvader
........
Modified:
trunk/ (props changed)
trunk/apps/app_dial.c
trunk/include/asterisk/cdr.h
trunk/main/cdr.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?view=diff&rev=107017&r1=107016&r2=107017
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Mon Mar 10 09:36:16 2008
@@ -836,23 +836,6 @@
if (!*to || ast_check_hangup(in))
ast_cdr_noanswer(in->cdr);
}
- if (peer && !ast_cdr_log_unanswered()) {
- /* suppress the CDR's that didn't win */
- struct chanlist *o;
- for (o = outgoing; o; o = o->next) {
- struct ast_channel *c = o->chan;
- if (c && c != peer && c->cdr)
- ast_set_flag(c->cdr, AST_CDR_FLAG_POST_DISABLED);
- }
- } else if (!peer && !ast_cdr_log_unanswered()) {
- /* suppress the CDR's that didn't win */
- struct chanlist *o;
- for (o = outgoing; o; o = o->next) {
- struct ast_channel *c = o->chan;
- if (c && c->cdr)
- ast_set_flag(c->cdr, AST_CDR_FLAG_POST_DISABLED);
- }
- }
#ifdef HAVE_EPOLL
for (epollo = outgoing; epollo; epollo = epollo->next) {
Modified: trunk/include/asterisk/cdr.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/cdr.h?view=diff&rev=107017&r1=107016&r2=107017
==============================================================================
--- trunk/include/asterisk/cdr.h (original)
+++ trunk/include/asterisk/cdr.h Mon Mar 10 09:36:16 2008
@@ -106,7 +106,6 @@
int ast_cdr_serialize_variables(struct ast_cdr *cdr, struct ast_str **buf, char delim, char sep, int recur);
void ast_cdr_free_vars(struct ast_cdr *cdr, int recur);
int ast_cdr_copy_vars(struct ast_cdr *to_cdr, struct ast_cdr *from_cdr);
-int ast_cdr_log_unanswered(void);
typedef int (*ast_cdrbe)(struct ast_cdr *cdr);
Modified: trunk/main/cdr.c
URL: http://svn.digium.com/view/asterisk/trunk/main/cdr.c?view=diff&rev=107017&r1=107016&r2=107017
==============================================================================
--- trunk/main/cdr.c (original)
+++ trunk/main/cdr.c Mon Mar 10 09:36:16 2008
@@ -100,11 +100,6 @@
int check_cdr_enabled()
{
return enabled;
-}
-
-int ast_cdr_log_unanswered(void)
-{
- return unanswered;
}
/*! Register a CDR driver. Each registered CDR driver generates a CDR
@@ -985,6 +980,12 @@
struct ast_cdr_beitem *i;
for ( ; cdr ; cdr = cdr->next) {
+ if (!unanswered && cdr->disposition < AST_CDR_ANSWERED && (ast_strlen_zero(cdr->channel) || ast_strlen_zero(cdr->dstchannel))) {
+ /* For people, who don't want to see unanswered single-channel events */
+ ast_set_flag(cdr, AST_CDR_FLAG_POST_DISABLED);
+ continue;
+ }
+
chan = S_OR(cdr->channel, "<unknown>");
check_post(cdr);
if (ast_tvzero(cdr->end))
More information about the asterisk-commits
mailing list