The event-processing model is the algorithm Sentinel uses to process events.
Event sources
Sentinel receives events from several sources:
Event source | Received from | Examples |
---|---|---|
SIP |
an external SIP network element (such as an S-CSCF) |
|
HTTP |
an external HTTP-enabled network element |
an HTTP |
Diameter |
the Sentinel mediation layer (related to events from an external OCS) |
|
Extension |
external network elements for sessions initiated by features within Sentinel |
|
Timer |
timers that features raise using the |
|
Local |
raised internally by Sentinel, as a result of processing other events and instructions |
|
What is an event manager?
While processing events, Sentinel delegates to and receives instruction from event managers. These are event-driven components that help process sessions within Sentinel. The most important event managers, from a feature-developer perspective, are:
-
Charging Manager — manages charging instances during the session
-
Leg Manager — manages all the SIP legs during the session.
An event manager is responsible for:
-
providing some core Sentinel behaviour
For example: the Charging Manager manages all charging during the lifetime of the session; and the Leg Manager manages all the SIP legs during the lifetime of the session.
-
registering the set of events that the event manager should be triggered for
For example, the Charging Manager is interested in events such as
CreditControlAnswer
,ReAuthRequest
, andAbortSessionRequest
. -
determining the set of feature script execution points that are relevant for a particular event
For example, the Charging Manager determines that the
SipAccess_CreditAllocatedPostCC
should be triggered when Sentinel receives a successfulCreditControlAnswer
in response to an initial credit reservation. -
managing a set of pending instructions
An “instruction” is a task that the event manager considers should be performed once all relevant feature script execution points have been processed. For example, the Charging Manager supports instructions such as
CreditReservation
,CreditFinalisation
, andRefund
. Instructions are queued as features execute, so a feature can make changes to the set of pending instructions.
The Charging Manager and Leg Manager also provide an API for features to use. The actions features take may cause these managers to change their state (which includes adding, removing, and updating pending instructions). For example, a feature may create a new charging instance or create a new SIP leg. |
Sentinel SIP event-processing algorithm
The following diagram is an overview of how Sentinel SIP processes events:
As shown above:
1 |
Sentinel receives a real event, such as an Loop
Until the |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
2 |
Event managers process the received event. They:
|
||||||||||
3 |
If there are any |
||||||||||
4 |
Process each Features may set timers or create sessions to external network elements. Related
Once all |
||||||||||
5 |
Ask each event manager in turn to carry out any pending instructions that have accumulated while processing the event. Each event manager manages a set of instructions while features are executing. For example, if a feature calls Once all pending instructions have been processed, then see if there are any events in the |
||||||||||
6 |
Event processing ends once the session ends. |