From 2d457efc48bebdb13a6226b28956a88d5c7df93d Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Tue, 14 Aug 2012 18:28:19 +0300 Subject: [PATCH] set config's debit period to timespans and added the new values to sm configuration --- cmd/cgr-rater/cgr-rater.go | 4 ++++ conf/session_manager.config | 2 ++ 2 files changed, 6 insertions(+) diff --git a/cmd/cgr-rater/cgr-rater.go b/cmd/cgr-rater/cgr-rater.go index 47ee52770..3f2e71a0a 100644 --- a/cmd/cgr-rater/cgr-rater.go +++ b/cmd/cgr-rater/cgr-rater.go @@ -258,6 +258,10 @@ func main() { defer getter.Close() timespans.SetStorageGetter(getter) + if sm_debit_period > 0 { + timespans.SetDebitPeriod(time.Duration(sm_debit_period)) + } + var loggerDb timespans.StorageGetter if logging_db_type != DISABLED { switch logging_db_type { diff --git a/conf/session_manager.config b/conf/session_manager.config index b36e76704..516d996ab 100644 --- a/conf/session_manager.config +++ b/conf/session_manager.config @@ -23,6 +23,8 @@ logdb_name = cgrates # The name of the database to connect to. [session_manager] enabled = true +type = freeswitch +debit_period = 10 rater = internal #address where to access rater. Can be internal, direct rater address or the address of a balancer freeswitch_server = localhost:8021 freeswitch_pass = ClueCon