Description
Feature name |
EndMidSession |
---|---|
Applicable contexts |
SIP Service |
Prerequisite Features |
None |
Sentinel mid session feature to notify the Sentinel core to end the call. When notifying the core the cause code is determined according to the following pseudo-code:
FUNCTION determineCauseCode() // an error set by another feature takes highest precedence cause = sessionState.getUserEndSessionCause() IF cause IS SET return cause // otherwise try to determine the release cause from the latest CCA cause = determineCauseFromCCA(sessionState.getLatestOcsAnswer()) IF cause IS SET return cause // otherwise use a default return SipResponse.SC_FORBIDDEN FUNCTION determineCauseFromCCA(cca) //if there was no CCA, we cannot determine a code from there; CALL_REJECTED will be set if cca IS UNSET return null SWITCH (cca.getResultCode()) CASE DiameterCcaResultCode.DIAMETER_USER_UNKNOWN return SipResponse.SC_NOT_FOUND CASE DiameterCcaResultCode.DIAMETER_CREDIT_LIMIT_REACHED return SipResponse.SC_PAYMENT_REQUIRED CASE DiameterResultCode.DIAMETER_SUCCESS return determineCauseFromMscc(cca) DEFAULT return SipResponse.SC_FORBIDDEN
Supports ‘sip_trigger’, ‘http_trigger’ and ‘sipcall’ session types.
Session state inputs and outputs
Inputs
Name | Type | Format | Description | Behaviour if null/invalid |
---|---|---|---|---|
SessionType |
com.opencloud.sentinel.common.SessionType |
One of: sip_trigger, http_trigger, sipcall |
Session type of this call for choosing how to determine cause code from LatestOcsAnswer |
Report featureFailedToExecute, featureHasFinished |
UserEndSessionCause |
Integer |
Any release code |
A pre-determined release cause |
Attempt to determine cause from LatestOcsAnswer |
LatestOcsAnswer |
org.jainslee.resources.diameter.ro.types.CreditControlAnswer |
For determining release cause code if the UserReleaseCause is not set |
Use default call release cause SC_FORBIDDEN |
Feature responses
Response | Reason |
---|---|
featureHasFinished |
feature has finished |
featureFailedToExecute |
Invalid session type — trigger should be one of sip_trigger, http_trigger, or sipcall |