From e056664fa7b9277b75b54aa8ef0797a7cb6ae24d Mon Sep 17 00:00:00 2001 From: DanB Date: Sun, 26 Aug 2018 20:22:17 +0200 Subject: [PATCH] CDRs only use ThresholdS if defined --- engine/cdrs.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/cdrs.go b/engine/cdrs.go index e2e09064e..f36a9ba7f 100644 --- a/engine/cdrs.go +++ b/engine/cdrs.go @@ -198,8 +198,10 @@ func (self *CdrServer) processCdr(cdr *CDR) (err error) { return err // Error is propagated back and we don't continue processing the CDR if we cannot store it } } - // process CDR with thresholdS - self.thdSProcessEvent(cdr.AsCGREvent()) + if self.thdS != nil { + // process CDR with thresholdS + self.thdSProcessEvent(cdr.AsCGREvent()) + } // Attach raw CDR to stats if self.cdrstats != nil { // Send raw CDR to stats var out int