Fixup min_callduration being used by max_callduration parsing

This commit is contained in:
DanB
2014-07-18 15:09:06 +02:00
parent fd532fb1c3
commit 71464ce65e
3 changed files with 3 additions and 3 deletions

View File

@@ -516,7 +516,7 @@ func loadConfig(c *conf.ConfigFile) (*CGRConfig, error) {
}
}
if hasOpt = c.HasOption("session_manager", "max_call_duration"); hasOpt {
maxCallDurStr, _ := c.GetString("session_manager", "min_call_duration")
maxCallDurStr, _ := c.GetString("session_manager", "max_call_duration")
if cfg.SMMaxCallDuration, err = utils.ParseDurationWithSecs(maxCallDurStr); err != nil {
return nil, err
}

View File

@@ -248,7 +248,7 @@ func TestConfigFromFile(t *testing.T) {
eCfg.SMRater = "test"
eCfg.SMRaterReconnects = 99
eCfg.SMDebitInterval = 99
eCfg.SMMinCallDuration = time.Duration(99) * time.Second
eCfg.SMMinCallDuration = time.Duration(98) * time.Second
eCfg.SMMaxCallDuration = time.Duration(99) * time.Second
eCfg.FreeswitchServer = "test"
eCfg.FreeswitchPass = "test"

View File

@@ -92,7 +92,7 @@ rater = test # Address where to reach the Rater.
rater_reconnects = 99 # Number of reconnects to rater before giving up.
debit_interval = 99 # Interval to perform debits on.
max_call_duration = 99 # Maximum call duration a prepaid call can last
min_call_duration = 99 # Only authorize calls with allowed duration bigger than this
min_call_duration = 98 # Only authorize calls with allowed duration bigger than this
[freeswitch]
server = test # Adress where to connect to FreeSWITCH socket.