[asterisk-commits] file: branch 1.4 r107016 - in /branches/1.4: apps/ include/asterisk/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 10 09:33:02 CDT 2008
Author: file
Date: Mon Mar 10 09:33:02 2008
New Revision: 107016
URL: http://svn.digium.com/view/asterisk?view=rev&rev=107016
Log:
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:
branches/1.4/apps/app_dial.c
branches/1.4/include/asterisk/cdr.h
branches/1.4/main/cdr.c
Modified: branches/1.4/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_dial.c?view=diff&rev=107016&r1=107015&r2=107016
==============================================================================
--- branches/1.4/apps/app_dial.c (original)
+++ branches/1.4/apps/app_dial.c Mon Mar 10 09:33:02 2008
@@ -765,25 +765,6 @@
}
}
- if (peer && !ast_cdr_log_unanswered()) {
- /* suppress the CDR's that didn't win */
- struct dial_localuser *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 dial_localuser *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);
- }
- }
- }
return peer;
}
Modified: branches/1.4/include/asterisk/cdr.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/include/asterisk/cdr.h?view=diff&rev=107016&r1=107015&r2=107016
==============================================================================
--- branches/1.4/include/asterisk/cdr.h (original)
+++ branches/1.4/include/asterisk/cdr.h Mon Mar 10 09:33:02 2008
@@ -100,7 +100,6 @@
int ast_cdr_serialize_variables(struct ast_cdr *cdr, char *buf, size_t size, 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: branches/1.4/main/cdr.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/cdr.c?view=diff&rev=107016&r1=107015&r2=107016
==============================================================================
--- branches/1.4/main/cdr.c (original)
+++ branches/1.4/main/cdr.c Mon Mar 10 09:33:02 2008
@@ -102,11 +102,6 @@
AST_MUTEX_DEFINE_STATIC(cdr_pending_lock);
static ast_cond_t cdr_pending_cond;
-
-int ast_cdr_log_unanswered(void)
-{
- return unanswered;
-}
/*! Register a CDR driver. Each registered CDR driver generates a CDR
\return 0 on success, -1 on failure
@@ -986,6 +981,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