mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-20 14:48:43 +05:00
Fixup min_callduration being used by max_callduration parsing
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user