The Max Call Duration Feature monitors the call duration and terminates the call if the maximum call time has been exceeded.
On an incoming initial ACK or when the callEstablished
session state field is true
, a timer is set.
The timer length is controlled by the MaxTimerInterval
and MaxCallDuration
parameters in the feature’s configuration.
MaxCallDuration
can be overridden with a session state value to enable unlimited call duration or a session specific max call duration.
A feature should override the MaxCallDuration
in the initial call setup phase not during mid-call.
On the expiry of the timer, the feature checks the call time against the maximum call duration.
If the maximum call time has been exceeded, LegManager.endSession
is instructed.
If not, then the timer is reset to the minimum of MaxTimerInterval
and the remaining MaxCallDuration
.
Details
Feature script name |
MaxCallDuration |
---|---|
Applicable contexts |
SIP service |
SAS Support |
No |
Prerequisite features |
N/A |
Feature execution points |
|
Timer usage |
Feature-targeted timer triggers feature directly on expiry. Does not need to be registered against SipAccess_ServiceTimer execution point. |
Session state inputs and outputs
Inputs
Name | Type | Format | Description | Behaviour if null/invalid |
---|---|---|---|---|
SentinelSelectionKey |
com.opencloud.sentinel.common.SentinelSelectionKey |
selection key |
For selecting configuration data |
Increment InputParameterErrors, |
CallEstablished |
Boolean |
|
|
Initially set to |
MaxCallDuration |
Long |
|
|
Initially set to |
Call Duration configuration
Parameter | Type | Description |
---|---|---|
MaxTimerInterval |
long |
Interval of periodic timer (ms) |
MaxCallDuration |
long |
Maximum call duration (ms) |
Statistics
Name | Description |
---|---|
CallLimitReached |
Counter incremented when the call has been ended due to reaching the maximum call duration. |