summaryrefslogtreecommitdiff
path: root/cdr
diff options
context:
space:
mode:
Diffstat (limited to 'cdr')
-rw-r--r--cdr/cdr_adaptive_odbc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cdr/cdr_adaptive_odbc.c b/cdr/cdr_adaptive_odbc.c
index a590fb32a..0a9cfdbdd 100644
--- a/cdr/cdr_adaptive_odbc.c
+++ b/cdr/cdr_adaptive_odbc.c
@@ -720,6 +720,14 @@ static int odbc_log(struct ast_cdr *cdr)
continue;
}
first = 0;
+ } else if (entry->filtervalue
+ && ((!entry->negatefiltervalue && entry->filtervalue[0] != '\0')
+ || (entry->negatefiltervalue && entry->filtervalue[0] == '\0'))) {
+ ast_verb(4, "CDR column '%s' was not set and does not match filter of"
+ " %s'%s'. Cancelling this CDR.\n",
+ entry->cdrname, entry->negatefiltervalue ? "!" : "",
+ entry->filtervalue);
+ goto early_release;
}
}