SIP Tasks - Introduction

SIP Tasks and Example Call Flows

Sip Tasks

The SIP tasks is used to simulate a User Agent Server (UAS) or User Agent Client (UAC). By combining the provided SIP Tasks into scenarios various call flows can be created. Note that some tasks may generate several SIP requests, but most tasks simply send a SIP request and waits for a SIP response. See detailed documentation for each task for details.

Example Call Flows

The following examples is used to give an introduction how scenarios are grouped to generate a few typical SIP call flows.

Register

To simulate a simple SIP client register call flow, a simple scenario is used:

Call Flow Scenario

The SipInitTask is used to init common properties used by all SIP tasks, SipRegisterTask is the task generating the actual SIP REGISTER calls. Finally SipCloseTask is used to release all resources used by the SIP tasks.

For more information see sip-register.plc example PLC file found in extensions/test/sip directory.

Basic Session Establishment

Simulation basic SIP session establishment ("Alice to Bob") is somewhat more complicated, since this require simulation of two users; Alice acting as User Agent Client and Bob acting as User Agent Server. This can be simulated within one scenario:

Call Flow Scenario

The scenario simulates both Alice and Bob within the same scenario. To separate the two sides a "Call" parameter is used in the tasks.

For more information/examples see the example PLC files found in extensions/test/sip directory.

Shared SIP Stack

By default an internal SIP stack is initiated using SipInitTask and the same incoming (server) connection (IP and port) is valid within a scenario and closed when the scenario has finished it's execution (or when SipCloseTask is executed). Typically the used port is allocated dynamically using a short-lived ephemeral port. This means that if scenarios are executed by multiple threads one connection will be used per thread and scenario executed.

If you want to simulate SIP server nodes (not an UA), you typically want to use a fixed port and share the connection. To allow this you can specify a port and select a "Shared Stack" in SipInitTask. When this is done one SIP stack will be shared by all threads within a PureLoad worker executing the Scenario. When using a shared SIP stack, SipCloseTask will only close outgoing connections created by the SIP tasks within the Scenario. The incoming server connection will be left open until a test has completed the execution.

SipInitTask have 2 task parameters controlling the usage of a "shared Stack":

Decode SIP messages from Clipboard

To specifying task parameters for most SIP tasks the GUI includes a feature to decode text based SIP messages and automatically fill in task parameters. Simply copy the SIP message to be decoded, create corresponding task and select the "Decode" button for the task parameters.

This also works from Wireshark. Select the SIP message in Wireshark, copy as text by choosing "Copy -> ... as Printable Text" and select the he "Decode" button for the task parameters.