diff --git a/cdr/cdr_adaptive_odbc.c b/cdr/cdr_adaptive_odbc.c
index 3f4c78654f1dcf9ca53fc80119a1aba705b3d7bf..67dde10ff18577f5614654f5381359f66bef1f02 100644
--- a/cdr/cdr_adaptive_odbc.c
+++ b/cdr/cdr_adaptive_odbc.c
@@ -711,6 +711,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;
 			}
 		}