mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 12:49:54 +05:00
SessionS MinCallDuration implementation, fixes #1016
This commit is contained in:
@@ -706,6 +706,10 @@ func (smg *SMGeneric) GetMaxUsage(gev SMGenericEvent) (maxUsage time.Duration, e
|
||||
return
|
||||
}
|
||||
maxUsage = time.Duration(maxDur)
|
||||
if maxUsage != time.Duration(-1*time.Second) &&
|
||||
maxUsage < smg.cgrCfg.SessionSCfg().MinCallDuration {
|
||||
return 0, errors.New("UNAUTHORIZED_MIN_DURATION")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user