Enhanced Feature Execution Model

Sentinel SIP has improved the feature execution model in three important areas:

  1. Added the concept of a System Feature. Other features are now considered User Features

  2. Added the runcritical statement to the feature execution script language

  3. Expanded the method for how a feature script execution point is processed. In the new model a point-in-session is processed in three steps with a pre script, user script and a post script.

Note

System features and pre/post feature execution scripts are only available in the Sentinel SIP frontend, but the concept eventually will be extended to the other cores.

The rest of this section will explain these new concepts in more detail.

User and System Features

There are two types of feature:

  1. User features are for customising the behaviour of a front-end sentinel service to the particular needs of sentinel installation. I.e features as we understand them in current front-ends

  2. System features are for customising/implementing substantive aspects of the the sentinel front-end service behaviour. For example, the B2BUA feature provides back-to-back user agent functionality to Sentinel

Tip

See Sentinel SIP User Features for a list of user features.

See Sentinel SIP System Features for a list of system features.

What is a Feature Execution Point

A Feature Execution Point is a step in the lifetime of a session that has some significance and where custom behaviour might be needed. Sentinel features are used to customise the behaviour of a front-end sentinel service to the particular needs of a sentinel installation. The method for executing features is:

  • feature run at a points-in-session called 'feature script execution points'. These points-in-session correspond to significant steps in the process of managing a session. For example, as the session is starting, or ending.

  • a set of features to run, the order the features run, and any conditions are described in a feature execution script (i.e a script that dictates and controls how features are executed).

  • Sentinel searches for an appropriate feature execution script at run time considering the point-in-session and the current value of the SentinelSelectionKey

  • feature execution scripts always run to completion. That is, if a feature fails, then Sentinell will continue with the next feature.

  • Sentinel only takes action only after the point-in-session has been processed

Tip

See section Sentinel Selection Key for more information about the sentinel selection key.

See Sentinel Feature Execution Scripts for more information on the feature script execution language.

How Does Sentinel Process an Execution Point

Sentinel processes a feature script execution point in three steps (as shown in the following diagram).

processing an ex point
Figure 1. Steps in processing a feature script execution point
  1. Sentinel searches for a pre script. A pre script defines how a number of system features should run and and will be processed before any user features are run. If a script is found, then Sentinel will execute it.

  2. If none of the critical features in the pre script failed, then Sentinel searches for a user script. A user script defines how a number of user features should run. If a script is found, then Sentinel will executes it. If any of the critical features in the pre script failed, then Sentinel does not search for a user script and skips to step 3.

  3. Sentinel searches for a post script. A post script defines how a number of system features should run and and will be processed after any user features have run. If a script is found, then Sentinel will execute it.

Tip

The pre, user and post scripts are resolved via a SentinelSelectionKey based lookup.

See: Managing Session Plans to learn how to associate a feature execution script to a point-in-session.

Responding to Features that Fail

Some system features are more important to the correct behaviour of Sentinel than others. For example, it is critical that a fundamental system feature such as the B2BUA feature feature runs successfully, otherwise the integrity of the active session is questionable.

Sentinel supports a variant of the run statement called runcritical. The runcritical statement works in exactly the same way as run except that Sentinel has additional behaviour if a runcritical feature fails. For example, the default pre script used at the Sentinel SIP session accept point-in-session is:

featurescript PreSessionAccept {
    runcritical B2BUA
}
Tip

A feature can fail in a number of way. If might issue featureCannotStart() or featureFailedToExecute() so Sentinel knows there was a problem. A feature may accidentally throw an unchecked exception, which Sentinel will manage by treating the feature as if it had featureFailedToExecute().

In particular, Sentinel monitors the execution of critical features in a pre script. If any critical feature in a pre script fails, then Sentinel will not try to find, and execute, a user scripts for the active point-in-session. It will still try to find and execute a post script.

Tip

See: The run Statement for more detail on the run statement and its syntax.

Previous page Next page