The SIP scenario pack is bundled with example configuration and scenario files.
The examples may be found in the <scenario_simulator>/sip-examples
directory.
The basic SIP examples are stand-alone scenarios using the Scenario Simulator only. The SIP Rhino examples show SIP integrating with the Rhino TAS.
Scenario Simulator Command Script File
Scenario Simulator command script files be can be found in <scenario_simulator>/sip-examples/config/*.commands
.
There are scripts for multiple SIP endpoints setup used for sip-examples. These files contain scenario simulator commands. Usage of a commands script file is recommended but not required as it is possible to run all the required commands manually from the simulator prompt.
Below is the content of the setup-alice.commands script file:
set-endpoint-address alice alice
create-local-endpoint alice sip -propsfile sip-examples/config/setup-alice.properties
bind-role alice alice
set-endpoint-address bob bob.opencloud.co.nz:5260
bind-role bob bob
set-endpoint-address proxy1 proxy1.opencloud.co.nz:5560
bind-role proxy1 proxy1
The first set-endpoint-address command sets the address of "alice" to alice host name. It is assumed that there exits "alice" entry in /etc/hosts
, substituting appropriate IP address.
The second set-endpoint-address commands sets the address of "bob" to bob.opencloud.co.nz:5260.
The last set-endpoint-address commands sets the address of "proxy1" to proxy1.opencloud.co.nz:5560.
Commands bind-role bind respectively the alice endpoint address to scenario role alice, bob endpoint address to scenario role bob, and proxy1 endpoint address to scenario role proxy1.
Basic Examples
Prerequisites
1 |
Add the following entries to In this example all simulators are running on the local host.
|
---|---|
2 |
Start separate scenario simulators for each endpoint as needed for the examples below. The examples assume the working directory is the simulator base directory --- the parent directory of the one containing this file.
|
Examples
-
Basic SIP registration (from s24.1 in RFC 3261)
-
Requires bob and registrar endpoints
-
Load scenario on both endpoints: load-scenario sip-examples/scenarios/register.scen
-
Run session from "bob" endpoint: run-session register
-
Basic SIP unsuccessful registration
-
Requires bob and registrar endpoints
-
Load scenario on both endpoints: load-scenario sip-examples/scenarios/401-unsuccessful-register.scen
-
Run session from "bob" endpoint: run-session 401-unsuccessful-register
-
SIP 404 Not Found error session
-
Requires alice and proxy1 endpoints
-
Load scenario on both endpoints: load-scenario sip-examples/scenarios/404-reason.scen
-
Run session from "alice" endpoint: run-session 404-reason
-
SIP call attempt ended with no answer from bob
-
Requires alice, bob, proxy1 and proxy2 endpoints
-
Load scenario on all endpoints: load-scenario sip-examples/scenarios/no-answer.scen
-
Run session from "alice" endpoint: run-session no-answer
-
Basic SIP call via two proxies (from s24.2 in RFC 3261)
-
Requires alice, bob, proxy1 and proxy2 endpoints
-
Load scenario on all endpoints: load-scenario sip-examples/scenarios/normal-session.scen
-
Run command from "alice" endpoint: run-session normal-session
-
Similar to normal-session.scen but bob hangs up
-
Requires alice, bob, proxy1 and proxy2 endpoints
-
Load scenario on all endpoints: load-scenario sip-examples/scenarios/normal-session-bob-hangsup.scen
-
Run command from "alice" endpoint: run-session normal-session-bob-hangsup
-
Call flow via two proxies with provisional ack
-
Requires alice, bob, proxy1 and proxy2 endpoints
-
Load scenario on all endpoints: load-scenario sip-examples/scenarios/normal-session-prack.scen
-
Run command from "alice" endpoint: run-session normal-session-prack
-
Basic SIP instant messaging flow
-
Requires alice, bob, proxy1 endpoints
-
Load scenario on all endpoints: load-scenario sip-examples/scenarios/instant-messaging.scen
-
Run command from "alice" endpoint: run-session instant-messaging
-
basic SIP refer flow
-
requires alice and bob endpoints
-
load scenario on all endpoints: load-scenario sip-examples/scenarios/refer.scen
-
run command from "alice" endpoint: run-session refer
-
basic subscriber-notify SIP flow
-
requires subscriber and notifier endpoints
-
load scenario on both endpoints: load-scenario sip-examples/scenarios/subscription.scen
-
run session from "subscriber" endpoint: run-session subscription
SIP Rhino examples
The Scenario Pack contains some examples of SIP scenarios integrating with Rhino. The examples include:
-
Registering a SIP endpoint with a Rhino proxy server
-
An Instant-Messaging scenario that uses a Rhino SDK as the proxy server
-
A Normal-Call scenario that uses a Rhino SDK as the proxy server (proxy1).
Prerequisites
In this example, the localhost is Depending on how your host resolves localhost, you may need to change all references to |
1 |
Esnure the Rhino SDK server and Scenario Simulator are both installed locally |
---|---|
2 |
Add/edit the following entries to
|
3 |
Remove the entry for the loopback address in |
4 |
Start Rhino |
5 |
Deploy the SIP-connectivity pack examples |
Configure and running the examples
1 |
Register endpoint Bob with Rhino
|
---|---|
2 |
Run the Instant-Messaging example scenario:
|
3 |
Run the Normal-Session example scenario:
|