This section describes the call flow scenarios provided with the REST API Framework demonstration, and provides instructions for running the scenarios and analysing the results.
Rest Demo Test Suite
The REST Demonstration includes a test-suite at: test-suite
.
Test suite structure
The most important files and directories in the test suite are:
test-suite/build.xml test-suite/config test-suite/log4j.properties test-suite/scenarios test-suite/target
-
apache ant
build file for running integration tests -
directory containing configuration files for interfaces and scenario simulators used in the test suite
-
log4j properties files that dictates the logging generated by the test suite and scenario simulators. This does not have any impact on the tracing levels of Rhino (i.e the system under test)
-
directory containing a sub-directory per test scenario
-
directory that contains sub-directories such as
results
, which the output from each scenario is collated
Anatomy of a call flow scenario
The scenarios in the test suite are all contained in sub-directories of scenarios
.
scenarios/call-notification/cn01001-successful-call-no-cn scenarios/call-notification/cn01003-successful-call-direction-continue scenarios/call-notification/cn01004-successful-call-direction-endcall ...
Each scenario directory contains up to three files:
-
scscf.scen — A scenario simulator script that defines the expected signalling between all the roles in the scenario. In the case of the REST demo, the roles include the SCSCF, Sentinel/Rhino TAS and the Call Notification server.
-
sas.yaml — the expected Service Assurance Server (SAS) event messages during the scenario
-
usage.yaml — the expected statistics that will be raised during the call flow
Learn more about the Scenario Simulator and Scenario Editor. |
How to execute scenarios
There three methods you may follow to run scenarios:
-
Run all tests by using the run-tests script from the root of the rest-demo installation:
rest-demo$ ./run-tests
-
Run all tests by using
apache ant
in the testsuite directory:rest-demo/test-suite $ ../build/bin/ant auto run-integration-tests
-
Run a single test by using
apache ant
in the testsuite directory:rest-demo/test-suite $ ../build/bin/ant auto choose
A file-chooser will open, which allows you to select one of the tests in the test suite to execute.
Reviewing the test logs
The outcome of each scenario appears in complementary directories in targets/results
. Each scenario results directory contains up to three files:
-
stu.log — records the output from the test runner, including the messages sent/to from protocol simulators, statistics collected and sas events analysed.
-
localhost-101-rhino.log — records the output from the Rhino TAS as the scenario executes. The log will include output from the SIP SIS, Rhino, the call notification resource adaptor and the Sentinel-SIP service.
-
sas-sim.log — records output from the SAS simulator, which includes details of all marker and event messages received from Rhino whilst the scenario executes.
Scenarios
Each scenario may include the following roles:
-
SCSCF — SIP signalling between the SCSCF and a SIP AS, which in this case is Sentinel SIP on the Rhino TAS
-
MRF — SIP signalling between the Rhino TAS and a MRF (for announcements)
-
Sentinel — Sentinel SIP running on the Rhino TAS, including the REST Demo features and the REST Demo call notification resource adaptor.
-
CN-Server — HTTP signalling between Sentinel and an external Call Notification server. The CN server responds to call notification direction and event REST requests and answers with call notification direction and event REST responses.
Some SIP signalling, such as reliable provisional responses, have been omitted from the following call flow diagrams for the sake of brevity. |
Action during call setup
The focus of these scenarios is the call notification direction request generated on the initial SIP INVITE. In each scenario, the Call Notification server responds with instructions to influence subsequent processing of the call.
cn01003-successful-call-direction-continue
Point in session | Sentinel … |
---|---|
On the initial INVITE |
… sends a The CN server responds with an |
Called party answers |
… sends a |
Calling party ends the call |
… sends a The CN server responds with an |
On the CN server response |
… sends a |
cn01004-successful-call-direction-endcall
Point in session | Sentinel … |
---|---|
On the initial INVITE |
… sends a The CN server responds with an |
On the CN server response |
… rejects the call by sending a |
cn01005-successful-call-direction-route
Point in session | Sentinel … |
---|---|
On the initial INVITE |
… sends a The CN server responds with an |
Called party answers |
… sends a |
Calling party ends the call |
… sends a The CN server responds with an |
On the CN server response |
… sends a |
cn01009-successful-call-direction-number-translation
Point in session | Sentinel … |
---|---|
On the initial INVITE |
… sends a The CN server responds with an |
Called party answers |
… sends a |
Calling party ends the call |
… sends a The CN server responds with an |
On the CN server response |
… sends a |
cn01010-successful-call-direction-endcall-with-announcement
Point in session | Sentinel … |
---|---|
On the initial INVITE |
… sends a The CN server responds with an |
On the CN server response |
… plays announcement ( |
The announcement ends |
… rejects the call by sending a |
Action based on response of the called party
The focus of these scenarios is the call notification direction request generated when the called party fails to respond.
In each scenario, the Call Notification server responds with instructions to ROUTE
the call to an alternate destination.
cn01006-successful-call-forward-on-busy
Point in session | Sentinel … |
---|---|
On the initial INVITE |
… sends a The CN server responds with an |
Called party is busy |
… sends a The CN server responds with an |
On the CN server response |
… directs the call to the alternate destination ( |
Called party answers |
… sends a |
Calling party ends the call |
… sends a The CN server responds with an |
On the CN server response |
… sends a |
cn01007-successful-call-forward-on-no-answer
Point in session | Sentinel … |
---|---|
On the initial INVITE |
… sends a The CN server responds with an |
Called party does not answer |
… sends a The CN server responds with an |
On the CN server response |
… directs the call to the alternate destination ( |
Called party answers |
… sends a |
Calling party ends the call |
… sends a The CN server responds with an |
Called party is notified the call is ended |
… sends a |
cn01008-successful-call-forward-on-rsf
Point in session | Sentinel … |
---|---|
On the initial INVITE |
… sends a The CN server responds with an |
Called party cannot be reached |
… sends a The CN server responds with an |
On the CN server response |
… directs the call to the alternate destination ( |
Called party answers |
… sends a |
Calling party ends the call |
… sends a The CN server responds with an |
Called party is notified the call is ended |
… sends a |