The Record Timestamps feature records the times at which Sentinel received a call’s initial request, and its associated final response.

Details

Name in feature scripts

RecordTimestamps

Applicable contexts

SIP service

SAS Support

No

Prerequisite features

N/A

Feature execution points

SipAccess_SessionStart, SipAccess_PartyResponse, SipThirdPartyAccess_SessionStart

Timer usage

N/A

Source Code

This feature’s source code is available in the Sentinel SDK in the sentinel-sip-service-information-modules module pack. It can be viewed by using the create-module command in the SDK with that module pack. This command will prompt you for information needed to create the new modules, once completed the original source for the feature can be found in the new modules.

The module-pack includes the following modules relevant to this feature:

Module Name Description

sentinel-sip-service-information-modules

Group module for all service information features, including the modules listed below.

sentinel-sip-service-information-session-state-library

Contains the session state interface for the feature.

sentinel-sip-record-timestamps-feature

Contains the feature itself.

Session state inputs and outputs

Inputs

None

Outputs

Name Type Format Description

PerLegInitialRequestTimeMillis

Map<String,Long>

A table mapping each leg to the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.

Time that the initial request was received on each leg

PerLegFinalResponseTimeMillis

Map<String,Long>

A table mapping each leg to the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.

Time that the final response to the initial request was received on each leg

Feature responses

Response Reason

featureHasFinished

feature has finished

Statistics

Name Description

RequestTimestampSet

Counter incremented when the timestamp for the initial request is set.

ResponseTimestampSet

Counter incremented when the timestamp for the final response is set.

Behaviour

The feature needs to be run in two separate modes at different phases of each execution point. The inbound mode should be invoked in the SIP system pre scripts to process the incoming trigger leg. In inbound mode, it verifies that it was triggered by an initial request, or the final response to such a request. If neither of these conditions is met, the feature will finish execution without modifying any state. In outbound mode, it checks outgoing messages on all SIP legs. If it detects an initial request, the feature will record the current system time into the PerLegInitialRequestTimeMillis session state field against the corresponding leg name, increment the associated statistic, and then finish execution. If it detects a final response, the feature will record the current system time into the FinalResponseTimeMillis session state field and increment the associated statistic.

Previous page Next page
Sentinel Express Version 3.0.0