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 /etc/hosts, substituting appropriate IP addresses for each simulator if they run on a remote server.

In this example all simulators are running on the local host.

127.0.0.1 alice alice.opencloud.co.nz
127.0.0.1 bob bob.opencloud.co.nz
127.0.0.1 proxy1 proxy1.opencloud.co.nz
127.0.0.1 proxy2 proxy2.opencloud.co.nz
127.0.0.1 registrar registrar.opencloud.co.nz
127.0.0.1 subscriber subscriber.opencloud.co.nz
127.0.0.1 notifier notifier.opencloud.co.nz

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.

./scenario-simulator.sh -l simulator-alice.log -f sip-examples/config/setup-alice.commands
./scenario-simulator.sh -l simulator-bob.log -f sip-examples/config/setup-bob.commands
./scenario-simulator.sh -l simulator-proxy1.log -f sip-examples/config/setup-proxy1.commands
./scenario-simulator.sh -l simulator-proxy2.log -f sip-examples/config/setup-proxy2.commands
./scenario-simulator.sh -l simulator-registrar.log -f sip-examples/config/setup-registrar.commands
./scenario-simulator.sh -l simulator-subscriber.log -f sip-examples/config/setup-subscriber.commands
./scenario-simulator.sh -l simulator-notifier.log -f sip-examples/config/setup-notifier.commands

Examples

Example 1. register.scen
  • 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

Example 2. 401-unsuccessful-regiser.scen
  • 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

Example 3. 404-reason.scen
  • 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

Example 4. no-answer.scen
  • 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

Example 5. normal-session.scen
  • 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

Example 6. normal-session-bob-hangsup.scen
  • 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

Example 7. normal-session-prack.scen
  • 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

Example 8. instant-messaging.scen
  • 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

Example 9. refer.scen
  • 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

Example 10. subscription.scen
  • 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

Important

In this example, the localhost is 192.168.0.28

Depending on how your host resolves localhost, you may need to change all references to localhost in the rhino-sip-examples/config/normal-session/setup* files and in the scenario files to your external IP address{info}

1

Esnure the Rhino SDK server and Scenario Simulator are both installed locally

2

Add/edit the following entries to /etc/hosts on the local host, using external IP addresses

192.168.0.28	alice alice.opencloud.co.nz
192.168.0.28	bob bob.opencloud.co.nz
192.168.2.28	proxy2 proxy2.opencloud.co.nz

3

Remove the entry for the loopback address in /etc/hosts (if you have it configured)

4

Start Rhino

5

Deploy the SIP-connectivity pack examples

Configure and running the examples

1

Register endpoint Bob with Rhino

  • start one scenario-simulator session with the command:

./scenario-simulator.sh -l bob.log -f rhino-sip-examples/config/register/setup-bob.commands -e 'load-scenario rhino-sip-examples/scenarios/rhino-connectivity-register-bob.scen'

  • run-session rhino-connectivity-register-bob

2

Run the Instant-Messaging example scenario:

  • start two scenario-simulator sessions with the commands:

./scenario-simulator.sh -l bob.log -f rhino-sip-examples/config/instant-messaging/setup-bob.commands -e 'load-scenario rhino-sip-examples/scenarios/rhino-connectivity-instant-messaging.scen'

./scenario-simulator.sh -l alice.log -f rhino-sip-examples/config/instant-messaging/setup-alice.commands -e 'load-scenario rhino-sip-examples/scenarios/rhino-connectivity-instant-messaging.scen'

  • run-session rhino-connectivity-instant-messaging (from alice endpoint)

3

Run the Normal-Session example scenario:

  • start three scenario-simulator sessions with the commands:

./scenario-simulator.sh -l bob.log -f rhino-sip-examples/config/normal-session/setup-bob.commands -e 'load-scenario rhino-sip-examples/scenarios/rhino-connectivity-normal-session.scen'

./scenario-simulator.sh -l proxy2.log -f rhino-sip-examples/config/normal-session/setup-proxy2.commands -e 'load-scenario rhino-sip-examples/scenarios/rhino-connectivity-normal-session.scen'

./scenario-simulator.sh -l alice.log -f rhino-sip-examples/config/normal-session/setup-alice.commands -e 'load-scenario rhino-sip-examples/scenarios/rhino-connectivity-normal-session.scen'

  • run-session rhino-connectivity-normal-session (from alice endpoint)

Previous page
SIP Scenario Pack Version 1.0.3