<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "document-v13.dtd">
<document> 
  <header> 
    <title>IMS Bench SIPp</title>
    <subtitle>Reference Documentation</subtitle>
    <authors>
        <person name="Richard GAYRAUD [initial SIPp code]" email="richard_gayraud@users.sourceforge.net"/>
        <person name="Olivier JACQUES [SIPp code/documentation]" email="ojacques@users.sourceforge.net"/>
        <person name="David Verbeiren (Intel) [IMS Bench]" email="dverbeir@users.sourceforge.net"/>
        <person name="Philippe Lecluse (Intel) [IMS Bench]" email="plecluse@users.sourceforge.net"/>
        <person name="Xavier Simonart (Intel) [IMS Bench]" email="xsimonar@users.sourceforge.net"/>
        <person name="Many SIPp contributors [code]" email="none@email.com"/>
    </authors>
  </header> 
  <body> 
    <section><title>Foreword</title>
      <p>IMS Bench SIPp is a performance testing and benchmarking toolset designed
      to provide an implementation of a test system conforming to the
      <b>IMS Performance Benchmark specification</b>, <b><i>ETSI TS 186 008</i></b>.
      Please see the <link href="intro.html">Introduction</link> for more on what it can
      and cannot do and what this ETSI specification is all about.</p>

      <p>IMS Bench SIPp is based on a modified SIPp and still supports the original SIPp
      scenario commands as well as a series of extra commands and parameters. This makes
      it suitable not only to test IMS core networks, as targeted by the IMS/NGN Performance
      Benchmark specification, but also standalone SIP proxies, SIP application servers,
      B2BUAs, etc., whether they are IMS compliant or not.
      And this can be done while still benefiting from the large-scale benchmarking
      capabilities, the deep automation, and the report generation functionality of IMS
      Bench SIPp.</p>

      <p>In order to avoid duplication and to reduce the size of this documentation, the
      reader is asked to refer to the standard SIPp documentation for the general principles
      governing the scenario files. This reference documentation does however contain (or at
      least tries to) an exhaustive list of scenario commands, arguments and actions.</p>

    </section> <!-- Foreword -->

    <section><title>Installation</title>

      <section><title>Obtaining the source code</title>
         <p>IMS Bench SIPp is released under the
         <link href="http://www.gnu.org/copyleft/gpl.html">GNU GPL license</link>.
         All the terms of the license apply.</p>

         <p>The complete source tree containing all the components of IMS
         Bench SIPp can be obtained from the Subversion repository at
         sipp.svn.sourceforge.net/svnroot/sipp/sipp/branches/ims_bench. For example, the
         following command creates the <code>ims_bench</code> directory and populates it with the
         latest version of the sources:</p>
         <source xml:space="preserve"><![CDATA[
 svn co https://sipp.svn.sourceforge.net/svnroot/sipp/sipp/branches/ims_bench ims_bench
         ]]></source>
      </section> <!-- Obtaining source code -->
<!-- ********************************************* -->
<!-- ********************************************* -->
      <anchor id="installing"/><section><title>Pre-requisites</title>
        <ul>
         <li>
          <p>In order to achieve around millisecond precision in scenario attempt
          scheduling and in timing measurements, the underlying operating system
          must provide sufficiently fined grained scheduling. On most Linux distributions,
          this requires that the kernel be rebuilt with the kernel "Timer frequency" changed
          to 1000 HZ. For example, on FC6:</p>
          <source xml:space="preserve"><![CDATA[
 rpm -i kernel-2.6.18-1.2798.fc6.src.rpm
 cd /usr/src/redhat/SPECS
 rpmbuild -bp --target=i686 kernel-2.6.spec
 cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686
 make menuconfig
  Change:
     Processor type and features  --->
       Timer frequency (1000 HZ)  --->
     General setup  --->
       () Local version - append to kernel release  <- set your own kernel prefix

 make dep bzImage modules modules_install install

 (modify /etc/grub.conf to point to this new kernel)]]></source></li>
         <li>
          <p>In order for the timing precision to remain when measuring a time difference
          between two different physical systems, all systems that constitute the Test
          System should be synchronized with a better precision than what the standard NTP
          protocol achieves. A simple way of doing this is to use the Precision Time
          Protocol (IEEE 1588) deamon , ptpd
          (<link href="http://ptpd.sourceforge.net">ptpd.sourceforge.net</link>)</p>
          <source xml:space="preserve"><![CDATA[
 svn co https://ptpd.svn.sourceforge.net/svnroot/ptpd ptpd
 cd ptpd/trunk/src
 make
 ./ptpd -g (client side)]]></source>
         </li>
         <li>
          <p>Random number generation for the statistical distributions (scenario
          arrival, pauses in scenarios) require the GSL library. It can be obtained
          from <link href="http://www.gnu.org/software/gsl">http://www.gnu.org/software/gsl</link>
          and compiled from sources:</p>
          <source xml:space="preserve"><![CDATA[
 tar xvfz gsl-1.9.tar.gz
 cd gsl-1.9/
 ./configure
 make 
 make install]]></source>
          <p>You may need to add the path to the library (/usr/local/lib by default)
          to the LD_LIBRARY_PATH environment variable or to the /etc/ld.so.conf file:</p>
          <source xml:space="preserve"><![CDATA[
 echo /usr/local/lib/ >>/etc/ld.so.conf
 ldconfig]]></source>
         </li>
         <li>
          <p>In order to be able to use the menu-driven benchmark configuration tool
          and the report generation tool, the following components must be installed.</p>
          <ul>
           <li>Perl XML::Simple module - <link href="http://search.cpan.org/dist/XML-Simple/">http://search.cpan.org/dist/XML-Simple/</link>
            <source xml:space="preserve"><![CDATA[
 perl -MCPAN -e shell
 {reply with default answers... just select the local ftp server}
 cpan> install XML::Simple
 cpan> quit]]></source>
           </li>
           <li>Gnuplot 4.2 - <link href="http://gnuplot.sourceforge.net/">http://gnuplot.sourceforge.net/</link>
            <source xml:space="preserve"><![CDATA[
 tar xvfz gnuplot-4.2.0.tar.gz
 cd gnuplot-4.2.0
 ./configure --without-x
 make
 make install]]></source>
           </li>
          </ul>
         </li>
         <li>Configure Virtual IPs
          <p>In case you want your test systems to support large numbers of users, you'll probably
          want to configure multiple virtual IP addresses on your network adapters.
          The actual number of IP addresses to configure will depend on the transport
          option you select: a single IP address per SIPp instance, in which case you need
          many IP addresses as you'll run SIPp instances on a same physical system, or multiple
          IP addresses per SIPp instance in which case you will want plenty of IP addresses.</p>

          <p>There are at least two ways to configure virtual IP addresses:</p>
          <ol>
           <li>Through ifconfig command execution (probably from within a script)
            <source xml:space="preserve"><![CDATA[ ifconfig eth0:0 192.168.1.76/24 up]]></source>
           </li>
           <li>or through the network adapter configuration files
            (/etc/sysconfig/network-scripts/ifcfg-eth0:x), and applying the changes with
            "service network restart"
            <source xml:space="preserve"><![CDATA[
 DEVICE=eth0:0
 BOOTPROTO=static
 TYPE=Ethernet
 IPV6INIT=no
 HWADDR=00:15:17:01:E2:E2
 IPADDR=192.168.1.76
 NETMASK=255.255.255.0
 NETWORK=192.168.1.0
 ONBOOT=yes]]></source>
           </li>
          </ol>
         </li>
         <li> Modify System Limits (/etc/security/limits.conf) to allow SIPp process to open a large number of sockets, and add:
          <source xml:space="preserve"><![CDATA[
 * soft nofile  102400
 * hard nofile  409600]]></source>
         </li>
        </ul>
      </section> <!-- Pre-requisites -->
      <section><title>Building IMS Bench SIPp components</title>
        <p>To build SIPp and the manager in the way appropriate for the benchmark,
        perform the following make invocations:</p>
        <source xml:space="preserve"><![CDATA[ cd ims_bench
 make rmtl
 make ossl
 make mgr
]]></source>
        <p>Alternatively, the default make invocation (no argument) will build all
        these components as well as cpum, the system resource monitoring component.
        This might however not be what you need as the latter must be built on the
        system where it needs to run, i.e. the SUT, which might not be compatible
        with binaries built on your test systems.</p>

        <p>To build <strong>cpum</strong> on the SUT, you will need the GNU development toolchain
        on your SUT or on compatible development environment. You can then copy the
        IMS Bench SIPp source tree and simply build cpum and its required dependencies:</p>
        <source xml:space="preserve"><![CDATA[ make rmtl           (on the SUT)
 make cpumem         (")]]></source>
      </section>  <!-- Building -->
    </section> <!-- Installation -->

    <section><title>Using IMS Bench SIPp</title>
      <section><title>Configuration</title>
        <p>When configuring the test system for a benchmark run, there are two possible
        approaches:</p>
        <ol>
         <li>Use the <i>ims_bench.pl</i> perl script to enter the benchmark parameters using a
         menu driven user interface and automatically generate all the necessary configuration
         files and execution scripts</li>
         <li>Configure all elements manually</li>
        </ol>
        <p>Obviously the first approach is the easiest but is somewhat limited to configuring
        benchmark runs in close accordance to the TS 186 008 specification. As IMS Bench SIPp
        is based on SIPp which was already very flexible and as the new features and new
        components (Manager, CpuMem...) were designed in the same spirit, one may
        configure quite a large variety of benchmark runs. When configuring manually however,
        the benchmark parameters as specified in TS 186 008 do not appear as clearly anymore
        since many of them are implemented using SIPp features that were not directly
        implemented based on that specification. For this reason, the names don't match and
        some parameters of the specification may be linked to multiple configuration bits in
        the IMS Bench SIPp configuration.</p>

        <anchor id="manager_config"/><section><title>Manager Configuration</title>
         <p>The configuration file for the manager, manager.xml, is an XML file with one
         global configuration section and one or more "run" sections.</p>

         <p>If you used the <i>ims_bench</i> tool to configure your benchmark run, it
         will have generated this file for you in a target directory. Otherwise, you can
         start from the example manager.xml file provided in the source tree.</p>

         <ul>
          <li><strong><code>&lt;configuration&gt;</code> section</strong>
           <p>This section of the manager configuration contains the global configuration
           (independent of the individual "runs" defined in subsequent sections).</p>
           <ul>
            <li><strong>global parameters</strong>
             <p>Each parameter entry is specified using the following syntax:
             <code>&lt;param name="<i>name</i>" value="<i>value</i>"/&gt;</code></p>
             <p>Possible parameters are described in the table below:</p>
             <table>
              <tr><td colspan="1" rowspan="1"><b>number_test_systems</b></td>
               <td colspan="1" rowspan="1">Number of Test Systems that the manager will wait for before starting
                the load generation. A value of 0 indicates that the manager should start
                immediately with the number of SIPp instances connected at the time the
                user presses the 'e' key. When the manager is used in full automatic mode
                (<code>-e</code> command line flag), a non-0 value must be specified.</td></tr>
              <tr><td colspan="1" rowspan="1"><b>prep_offset</b></td>
               <td colspan="1" rowspan="1">Time (in milliseconds) allocated for the preparation portion (usually
                dedicated to the user reservation procedure) of a client-side scenario
                before its real SIP scenario portion is expected to start (according to
                the scenario initiation distribution). This is the scenario portion between
                the start and the <code>&lt;sync&gt;</code> command of the scenario.
                Once the scenario reaches its <code>&lt;sync&gt;</code> command, SIPp
                will put it to sleep until the time the SIP scenario was scheduled to
                start.<br/>
                This parameter should be set to a value high enough to guarantee that
                all scenarios can reach their <code>&lt;sync&gt;</code> command in
                advance of their actual scheduled start time, but not too large in order
                not to have too many <i>users</i> "consumed" by scenarios in
                their preparation phases (risk of running out of users).</td></tr>
              <tr><td colspan="1" rowspan="1"><b>rand_seed</b></td>
               <td colspan="1" rowspan="1">Initial seed value that will be distributed to all random number
                generators in the complete test system to compute their own individual
                seed value (this seed value is derived from the global
                <code>rand_seed</code> value, the SIPp instance ID and the specific
                random generator it is used for). This scheme guarantees that each
                SIPp instance starts at a different place in the pseudo-random
                sequences it uses and still allows re-generating almost exactly the
                same load as for a previous run by assigning the same
                <code>rand_seed</code> value.<br/>
                A value of 0 tells the manager to generate the seed at random.
                The actual rand_seed value used is always logged into the
                report.xml file generated by the manager so that one can then later
                force the rand_seed to this value to re-generate almost the exact
                same load.</td></tr>
              <tr><td colspan="1" rowspan="1"><b>report</b></td>
               <td colspan="1" rowspan="1">Report generation (1 = generate report; 0 = don't generate).
                Must be set to 1 in order to be able to use the report generation
                tool.</td></tr>
              <tr><td colspan="1" rowspan="1"><b>log</b></td>
               <td colspan="1" rowspan="1">Manager logging (0 = disabled; 1 = enabled). The manager can
                log details of its activities in a manager.log file. This includes
                the same data as the manager screen output with the highest
                verbosity.</td></tr>
              <tr><td colspan="1" rowspan="1"><b>transient_time</b></td>
               <td colspan="1" rowspan="1">Transient time (in seconds) at the begining of each step
                (change in the load applied to the SUT) during which scenario outcomes
                are ignored when computing the IHS percentage (percentage of
                Inadequately Handled Scenarios).</td></tr>
              <tr><td colspan="1" rowspan="1"><b>scenario_path</b></td>
               <td colspan="1" rowspan="1">Path prefix where the scenario xml files are located.</td></tr>
              <tr><td colspan="1" rowspan="1"><b>max_time_offset</b></td>
               <td colspan="1" rowspan="1">Maximum offest (in microseconds) allowed between each TS
                and the manager (0 = not checked)</td></tr>
             </table><br/>
            </li>
            <li><anchor id="scen_params"/><strong>Scenario Parameters</strong>
             <p>This provides an extension of SIPp's <code>-key</code> command line
             mechanism. It allows the manager to define the value of global generic
             parameters that scenarios can refer to.</p>
             <p>Example:
             <code>&lt;scen_param name="RingTime" value="5000"/&gt;</code></p>
             <p>Scenarios can then use this value, for example in a pause command:
             <code>&lt;pause poisson="true" mean="%RingTime"/&gt;</code></p>
             <p>The name can be any name that does not conflict with pre-defined scenario
             keywords.</p>
            </li>
            <li><strong>Scenario List</strong>
             <p>Each scenario that must be loaded is specified using the following syntax:
             <code>&lt;scenario name="<i>name</i>" max_ihs="<i>value</i>"/&gt;</code></p>
             <p>The <i>name</i> must represent an existing xml scenario file. <i>max_ihs</i> is
             an optional attribute defining the maximum percentage of inadequately handled
             scenario attempts allowed for this scenario (to be specified only for client side -
             "UAC-like" - scenarios).</p>
            </li>
           </ul>
           <p>Example of (partial) <code>&lt;configuration&gt;</code> section:</p>
           <source xml:space="preserve"><![CDATA[
 <configuration>
   <param name="rand_seed" value="0"/>
   <scen_param name="RingTime" value="5000"/>
   <scenario name="ims_uac" max_ihs="0.1"/>
 </configuration>]]></source>
          </li>
          <anchor id="manager_config_run"/>
          <li><strong><code>&lt;run&gt;</code> sections</strong>
           <p>A <code>run</code> section defines a series of steps in the traffic time profile
           (evolution of the traffic over time) as well as which traffic set to use
           (percentage of each scenario). All steps of a run use the same traffic
           parameters except the scenario attempt rate which increases from step to
           step within a same run.</p>
           <p>A configuration can have as many runs as
           desired to make the scenario mix change over time, or to change other
           parameters that are specific to a run. Runs are executed in sequence
           in the same order as they appear in the manager config file.</p>
           <p>The following arguments can be specified for any run:</p>
           <table>
            <tr><td colspan="1" rowspan="1"><b>cps</b></td>
             <td colspan="1" rowspan="1">Initial rate of scenario attempts (CPS) for this step
             (Use 0 to define a "pause" step)</td></tr>
            <tr><td colspan="1" rowspan="1"><b>max_calls</b></td>
             <td colspan="1" rowspan="1">Number of calls to generate for this step.
              Generaly used only for a pre-registration phase where only SIP registration
              scenarios are executed.</td></tr>
            <tr><td colspan="1" rowspan="1"><b>distribution</b></td>
             <td colspan="1" rowspan="1">Distribution used for scenario initiation over time.
              Possible values: "constant", "poisson"</td></tr>
            <tr><td colspan="1" rowspan="1"><b>duration</b></td>
             <td colspan="1" rowspan="1">Duration (in seconds) of a single step of the run.</td></tr>
            <tr><td colspan="1" rowspan="1"><b>step_increase</b></td>
             <td colspan="1" rowspan="1">Load (scenario attempt rate) increase when moving to a next step
              within the run.</td></tr>
            <tr><td colspan="1" rowspan="1"><b>num_steps</b></td>
             <td colspan="1" rowspan="1">Number of steps in the runs.
              <br/>0 = no increase (a single flat load)
              <br/><i>n</i> = load is increased <i>n</i> times during the run.</td></tr>
            <tr><td colspan="1" rowspan="1"><b>report</b></td>
             <td colspan="1" rowspan="1">This attribute has no impact on the run-time behavior of the test
              system but is passed on to the report generation tool.
              If set to "no", the steps of the run will not appear as
              distinct steps in the generated report and will not be listed in
              summary tables, etc. This is typically the case for a run used to
              warm up the SUT before the actual benchamrking phase starts.</td></tr>
            <tr><td colspan="1" rowspan="1"><b>sync_mode</b></td>
             <td colspan="1" rowspan="1">If set to "off", the SIPp instances will bypasses the
              "sync" state of the scenarios. In this case, SIPp makes no
              attempt to avoid that preparation part of the scenarios delays the
              actual start of its SIP portion.
              This is generaly used for a pre-registration phase only.
              See also the <code>prep_offset</code> global parameter.</td></tr>
            <tr><td colspan="1" rowspan="1"><b>use_scen_max_ihs</b></td>
             <td colspan="1" rowspan="1">If set to "yes" or not set (default), the <code>max_ihs</code>
              value defined for each scenario is used as threshold value against which
              the IHS percentage of the step is compared (on a per scenario basis) to
              decide whether to stop the benchmark or to move on to a next step or run.<br/>
              If set to "no", the value specified under <code>max_global_ihs</code>
              run parameter (see below) is used as threshold value for all scenarios and
              the per scenario <code>max_ihs</code> threshold is ignored for this run.
              This can be useful for example in warm-up runs done as part of the overall
              benchmark execution (so it is always done the same way) and where a higher
              number of failures can be accepted. These warm-up runs would then use a higher
              IHS threshold than the subsequent "real" runs.</td></tr>
            <tr><td colspan="1" rowspan="1"><b>max_global_ihs</b></td>
             <td colspan="1" rowspan="1">Maximum allowed percentage of IHS for the run, evaluated over all
              scenarios executed regardless of their specific <code>max_ihs</code> value.
              See also the <code>use_scen_max_ohs</code> parameter.</td></tr>
            <tr><td colspan="1" rowspan="1"><b>stats</b></td>
             <td colspan="1" rowspan="1">Interval (in milliseconds) at which the manager requests counters from the
              SIPp instances to evaluate the progress of the test and display it.</td></tr>
           </table>
           <p>The scenario mix is also part of the configuration of a run. The first run
           must specify the ratio of each scenario. Subsequent run sections only need to
           specify this if the scenario mix must be changed. Otherwise, the same ratios
           as in the previous run are used.</p>
           <p>Scenario ratios are specified using the following syntax:
           <code>&lt;scenario name="<i>name</i>" ratio="<i>value</i>"/&gt;</code></p>
           <p>Only the <i>client</i> scenarios (intiating side) should be specified.
           The sum of the ratios of all scenarios must be equal to 100, including the
           ratios that have been configured in earlier runs. This means that if a
           specific scenario was executed in the previous run and should not be executed
           anymore, one must explicitly set its ratio to 0 in the new run.</p>
           <p>Example run section:</p>
<source xml:space="preserve"><![CDATA[
<!-- Stir phase to warm up the SUT -->
<run cps="40" duration="75" step_increase="20" num_steps="3" distribution="poisson" \
     use_scen_max_ihs="no" max_global_ihs="1" stats="2000" report="no">
  <scenario name="ims_reg"   ratio="2.5"/>
  <scenario name="ims_uac"   ratio="50"/>
  <scenario name="ims_dereg" ratio="2.5"/>
  <scenario name="ims_msgc"  ratio="30"/>
  <scenario name="ims_rereg" ratio="15"/>
</run>

]]></source>
          </li>
         </ul>
        </section> <!-- Manager Configuration -->

      </section> <!-- Configuration -->

      <section><title>Benchmark Execution</title>

        <section><title>Running</title>
        <p>In case you configured your test system using the <i>ims_bench</i> Perl
        script, you will have received detailed instructions at time of exiting
        the configuration tool. Please follow those instructions which will guide you
        through the deployment of the components (using the <code>prepare.sh</code> script)
        on the systems used for the test and the starting of all components (manager and
        SIPp instances).</p>
 
        <p>In all cases, the first step is to start the manager on the system that you
        intend to use as central controller for the benchmark.
        <source xml:space="preserve"><![CDATA[./manager [-f manager.xml]]]></source></p>

        <p>It will then read its configuration file and wait for SIPp agents and
        resource monitoring agents (cpum) to connect.</p>

        <p>The next step consists in starting the SIPp instances. Each instance must be
        started with the necessary options to make it use the IP address(es) you configured
        for it, to connect back to the manager as remote control and to load the user
        information for the users it will represent. The file containing the user data must
        be present on the system where the SIPp instance runs. The scenario files however
        are not needed locally since they will be sent over the network by the manager.<br/>
        Each instance should also have its test system ID specified by means of the -i
        option (although this is optional, it simplifies things a bit because SIPp will then
        be able to use, in csv file names for example, this TS ID which is guaranteed to be
        unique even across multiple systems, instead of the local process id).
        The -trace_scen and -trace_retrans options are also required if you want to generate
        a report for the run (usually the case).</p>

        <p>Here is an example of the command to issue on one of the test systems to start one
        of the SIPp instances, assuming that the manager is at 192.168.1.1, that the instance
        will use 192.168.1.20 and that the SUT is at 192.168.1.100 and listens for SIP traffic
        on port 5060:
        <source xml:space="preserve"><![CDATA[./sipp -id 1 -i 192.168.1.20 -user_inf ./ims_users_1.inf
       -rmctrl 192.168.1.1:5000 192.168.1.100:5060
       -trace_err -trace_cpumem -trace_scen -trace_retrans]]></source></p>

        <p>If you used the <i>ims_bench</i> tool to prepare the benchmark configuration,
        it will have created the necessary scripts for you (<code>run_x.sh</code>) and you
        can simply start those on the test systems as you'll have been instructed by the
        tool.</p>

        <p>If you have built the resource monitoring tool - cpum - for your system under test,
        you should start it on the SUT now (unless it's already running from a previous run).
        It will connect to the manager and report the SUT CPU and memory utilization data.
        <source xml:space="preserve"><![CDATA[./cpum 192.168.1.1:5000  (on the SUT)]]></source></p>

        <p>You can watch on the console of the manager, the various systems connecting to it.
        Once all components are started, you can start the actual execution by pressing the
        'e' key in the manager console.</p>

        <p>While the test system manager executes the runs according to its configuration,
        it also monitors the percentage of inadequately handled scenarios (IHS) during
        each step, and decides, based on the configured maximum value allowed for the
        IHS percentage, whether to perform the next step, increasing the load on the SUT,
        or not.</p>

        <p>As the manager moves from step to step within a configured run and from one
        run to the next, it writes these transitions to a report file it generates.
        This report file, report.xml, also contains information about the test systems
        used, the overall benchmark configuration, etc.</p>

        <p>Once the IHS threshold has been exceeded, the manager instructs the SIPp
        instances to stop applying load to the SUT and reports that the test is
        finished. You can then press the 'q' key in the manager console. This
        will stop all connected SIPp instances and the manager itself.</p>
        </section> <!-- Running -->

        <section><title>Gathering Results</title>

        <p>As each SIPp instance dumps most of its statistics on the local system it
        runs on (that's because sending it in real time to the manager could make the
        manager a bottleneck in the system), if you used multiple physical systems to
        execute the benchmark, you will need to gather together the csv files from
        each SIPp instance. In addition, prior to running the report generation tool,
        it is required to merge together the data from all the SIPp instances.<br/>
        A simple script is provided that reads the manager report file to learn the
        IP addresses of the test systems and the PID or TS ID of their SIPp instances,
        then grabs the corresponding files using <i>scp</i> and merges them together
        (assuming you are in a subdirectory as created by <i>ims_bench</i> script or
        that you created yourself for the execution):</p>

        <source xml:space="preserve"><![CDATA[../scripts/getResults.pl]]></source>

        <p>In case you copied the files manually from the test systems, you can use
        the same script to only perform the merging operation:</p>

        <source xml:space="preserve"><![CDATA[../scripts/getResults.pl -merge]]></source>

        <p>This merging operation can take some time if the amount of data collected
        was very large. It produces the following files:</p>
        <ul>
         <li>sipp.csv resulting from the merge of all sipp_TS&lt;ts_id&gt;_scen.csv
          files</li>
         <li>sipp_retrans.csv resulting from the merge of all
         sipp_TS&lt;ts_id&gt;_retrans.csv files</li>
        </ul>

        <p><b>Note:</b> After the merge completes, you can delete the partial files by running
        <source xml:space="preserve"><![CDATA[../scripts/getResults.pl -clean]]></source>
        But be sure the merge operation completed successfully (e.g. did not run out of
        disk space!) as the original files will be deleted (but only on the local system,
        not on the remote location where the SIPp instances actually executed - unless
        it is the same machine and location).</p>

        </section> <!-- Gathering results -->

        <section><title>Screens and Keys</title>

          <section><title>Manager</title>
            <ul>
              <li>Main keyboard keys:
              <p><table>
                <tr><th colspan="1" rowspan="1">Key</th><th colspan="1" rowspan="1">Description</th></tr>
                <tr><td colspan="1" rowspan="1">#</td><td colspan="1" rowspan="1">Change the display verbosity level </td></tr>
                <tr><td colspan="1" rowspan="1">e</td><td colspan="1" rowspan="1">Execute the benchmark</td></tr>
                <tr><td colspan="1" rowspan="1">0-9,&lt;,&gt;,D,q</td><td colspan="1" rowspan="1">Keys are directly sent to all SIPp clients </td></tr>
                <tr><td colspan="1" rowspan="1">T</td><td colspan="1" rowspan="1">Measure the time difference in micro seconds (Manual/Debug)</td></tr>
                <tr><td colspan="1" rowspan="1">t</td><td colspan="1" rowspan="1">Request the Date Time Stamp in text format (Manual/Debug)</td></tr>
                <tr><td colspan="1" rowspan="1">g</td><td colspan="1" rowspan="1">Request Counters (Manual/Debug)</td></tr>
                <tr><td colspan="1" rowspan="1">r</td><td colspan="1" rowspan="1">Reset Clients (Manual/Debug)</td></tr>
                <tr><td colspan="1" rowspan="1">l</td><td colspan="1" rowspan="1">Load Scenarios (Manual/Debug)</td></tr>
                <tr><td colspan="1" rowspan="1">W/w</td><td colspan="1" rowspan="1">Request CPU (Manual/Debug)</td></tr>
              </table></p>
              </li>
              <li>When starting, the manager displays a summary of the configuration and
                the requested runs.
                <p><img src="images/sipp_manager.jpg" alt="Manager Screen - Initial"/></p>
              </li>
              <li>After launching the benchmark execution (pressing 'e' key), the manager starts
                executing the runs. The first run could for example consist in a pre-registration
                phase where a certain percentage of the user population is registered with the SUT
                before the actual benchmark run really starts. In this example, only the 
                <i>ims_reg</i> scenario is active.
                <p><img src="images/sipp_manager_prereg.jpg" alt="Manager Screen - Pre Registration"/></p>
              </li>
              <li>At run time, the manager displays global summary and the current percentage
                of Inadequately Handled Scenarios for the step. If cpumem is connected, the cpu
                utilization of the SUT(s) will be reported too.<br/>
                <p><img src="images/sipp_manager_runtime.jpg" alt="Manager Screen - Runtime"/></p>
              </li>
            </ul>
          </section> <!-- Screens/Manager -->

          <section><title>CpuMem</title>
            <ul>
              <li>The following screen represents the CpuMem utility output.
                <p><img src="images/sipp_cpumem.jpg" alt="CpuMem Screen"/></p>
                <p>There is no runtime key. Press ctrl-c to exit the utility.</p>
              </li>
            </ul>
          </section>

          <section><title>SIPp</title>
            <ul>
              <li><strong>Main keyboard keys:</strong>
              <p><table>
                <tr><th colspan="1" rowspan="1">Key</th><th colspan="1" rowspan="1">Description</th></tr>
                <tr><td colspan="1" rowspan="1">&lt;,&gt;</td><td colspan="1" rowspan="1">Select a particular scenario. Most data displayed on
                 the screen is related to the currently selected scenario.</td></tr>
                <tr><td colspan="1" rowspan="1">1</td><td colspan="1" rowspan="1">Switch to the 'Scenario' screen</td></tr>
                <tr><td colspan="1" rowspan="1">2</td><td colspan="1" rowspan="1">Switch to the 'Statistics' screen</td></tr>
                <tr><td colspan="1" rowspan="1">3</td><td colspan="1" rowspan="1">Switch to the 'Repartition' screen</td></tr>
                <tr><td colspan="1" rowspan="1">4</td><td colspan="1" rowspan="1">Switch to the 'Variables' screen</td></tr>
                <tr><td colspan="1" rowspan="1">5</td><td colspan="1" rowspan="1">Switch to the 'TDM map' screen</td></tr>
                <tr><td colspan="1" rowspan="1">6,7,8,9,0</td><td colspan="1" rowspan="1">Switch to the corresponding 'Secondary repartition'
                 screen ('6' for RTD 1, '7' for RTD 2, etc.)</td></tr>
                <tr><td colspan="1" rowspan="1">D</td><td colspan="1" rowspan="1">Debug screen (dump internal variables)</td></tr>
              </table></p>
              </li>
              <li><strong>Key '1'</strong>: Scenario screen.
                It displays a call flow of the scenario as well as some important informations.
                <ul>
                  <li> Screen Layout
<source xml:space="preserve"><![CDATA[
]]><i><b>&lt;TS_id&gt;</b></i><![CDATA[- ]]><i><b>&lt;scenario_name&gt;</b></i><![CDATA[-]]><i><b>&lt;scen_slot&gt;</b></i><![CDATA[-   Scenario Screen    - [1-9]: Change Screen - ]]><i><b>&lt;PID&gt;</b></i><![CDATA[
]]></source>
Client:
<source xml:space="preserve"><![CDATA[
  Call-rate(length)     Port   Total-time  Total-calls  Remote-host
   ]]><i>[Desactivated]</i><![CDATA[(0 ms)/1.000s   5060      10.00 s            0  ]]><i><b>&lt;sut_address&gt;</b></i><![CDATA[(UDP)
  0 new calls during 1.000 s period      1 ms scheduler resolution
  0 calls (limit 0)                      Peak was 0 calls, after 0 s
  0 Running, 0 Paused, 0 Woken up, 0 Sync
  0 out-of-call msg (discarded)
  0 open sockets
]]></source>
Server:
<source xml:space="preserve"><![CDATA[
  Port   Total-time  Total-calls  Transport
  5060     695.00 s            0  UDP

  0 new calls during 1.000 s period      1 ms scheduler resolution
  0 calls                                Peak was 0 calls, after 0 s
  0 Running, 0 Paused, 0 Woken up, 0 Sync
  0 open sockets
]]></source>
                    <p>The following screenshots give examples with some of the scenarios
                    included with IMS Bench SIPp.</p>
                  </li>
                  <li>IMS Registration Scenario<p>
                   <img src="images/sipp_reg.jpg" alt="Registration scenario screen"/></p></li>
                  <li>IMS UAC Scenario<p>
                   <img src="images/sipp_uac.jpg" alt="UAC scenario screen"/></p></li>
                  <li>IMS Messaging (Client) Scenario<p>
                   <img src="images/sipp_msgc.jpg" alt="Messaging (Client) Scenario"/></p></li>
                  <li>IMS UAS Scenario<p>
                   <img src="images/sipp_uas.jpg" alt="UAS scenario screen"/></p></li>
                </ul>
              </li>
              <li><anchor id="stat_screen"/><strong>Key '2'</strong>: Statistics screen.
               It displays the main statistics counters. The "Cumulative" column gathers
               all statistics, since SIPp has been launched. The "Periodic" column gives the
               statistic value for the period considered (specified by
               <code>-f frequency</code> command line parameter).
               <p><img src="images/sipp-04.jpg" alt="Statistics screen"/></p>
              </li>
              <li><strong>Key '3'</strong>: Repartition screen.
               It displays the distribution of response time and call length, as
               specified in the scenario.
               <p><img src="images/sipp-05.jpg" alt="Repartition screen"/></p></li>
              <li><strong>Key '4'</strong>: Variables screen.
               It displays information on actions in scenario as well as scenario
               variable information.<br/>
                <ul>
                  <li>IMS Registration scenario<br/>
                   <p><img src="images/sipp_action_rereg.jpg" alt="Variables screen "/></p></li>
                  <li>IMS UAC scenario<br/>
                   <p><img src="images/sipp_action_uac.jpg" alt="Variables screen "/></p></li>
                </ul>
              </li>
            </ul>
          </section>  <!-- Screens/SIPp -->
        </section>  <!-- Screens -->

      </section> <!-- Benchmark Execution -->

      <section><title>Generating Reports</title>

      <p>A perl script, <i>doReport.pl</i>, can be used to generate a report in MHT format
      (Multipurpose Internet Mail Extension HTML - RFC 2557), containing graphs and statistics
      about the test.</p>

      <p>Note: As of this writing, the Mozilla Firefox browser did not support this format
      out of the box. Microsoft Internet Explorer 6 supports it natively. Although the MHT
      format is very convenient to group the HTML and picture files, one can also view
      the HTML directly as long as the picture files remain at the same relative paths.</p>

      <p>This tool takes as input data from the following sources:</p>
      <ul>
       <li>SIPp metrics data contained in the merged csv files (resulting from the
       usage of the getResults.pl script (scenario attempts, outcome, timings).</li>
       <li>CPU and memory utilization data gathered from the cpum resource monitoring
       tool running on the System Under Test and on the test systems</li>
       <li>general information about the run (step start times, scenario attempt rate,...)
       from the file generated by the manager during the benchmark run (report.xml)</li>
       <li>metric related information (name, mapping with csv file...) from the XML
       scenario files.</li>
      </ul>

      <p>The report is made up of multiple sections. The first section, the summary, is only
      configurable as far as the static text included is concerned and is otherwise built
      automatically by the tool. The subsequent sections contain graphs and statistics
      tables representing measurements like Scenario Attempts per Second (SAPS), response
      times, CPU utilization, etc. Those are configurable. See below for details on the
      report configuration.</p>

        <section><title>Configuring the Report Content</title>

       <p>The configuration for the report generation tool is located in the reportConfig.xml
       file (default - can be overwritten on the command line). It tells the tool which
       graphs must be plotted, gives descriptions and titles for these graphs and also contains
       some general parameters.</p>

       <p>The reportConfig.xml file included in the source tree allows you to generate
       a report matching the requirements of the ETSI TS 186 008 specification (within
       the existing limitations of the current IMS Bench SIPp implementation).
       You only need to modify this file if you intend to change what data is reported
       (for example you added new scenarios for a new use case) or the way the data
       is presented (type of graph, legend, description...).</p>

          <section><title>General parameters</title>
        <table>
         <tr><td colspan="1" rowspan="1"><b>DisplayFailureStep</b></td>
          <td colspan="1" rowspan="1">Set to 0 to prevent the failure step from appearing in time based graphs.
          This is usually set to 1.</td></tr>
         <tr><td colspan="1" rowspan="1"><b>DisplayFailureStepHistograms</b></td>
          <td colspan="1" rowspan="1">Set to 1 to show the Failure Step in the Histograms. This is usually set
          to 0, as failure steps usually contain very few data and tend to render the
          other histograms unreadable.</td></tr>
         <tr><td colspan="1" rowspan="1"><b>DisplayConstantHistograms</b></td>
          <td colspan="1" rowspan="1">Set to 1 to display constant steps in histograms. This is usually 0, as
          otherwise histograms for other steps often become unreadable.</td></tr>
         <tr><td colspan="1" rowspan="1"><b>size &#8594; x</b> and <b>size &#8594; y</b></td>
          <td colspan="1" rowspan="1">Horizontal and vertical size of the graphs</td></tr>
        </table>
          </section>

          <section><title>Graphs</title>
        <p>All measurements can be represented as time based graphs and/or as
        histograms.</p>

        <p>Time based graphs usually have the time as X-coordinate, the measure
        as Y1-coordinate and SAPS as Y2-coordinate. The SAPS (scenario attempts per
        second) in such graphs can be calculated for the whole system (default),
        per use case (use case attempts per seconds, for example grouping together
        REGISTER, DE-REGISTER and RE-REGISTER scenarios) or per scenario
        (only REGISTER scenarios per second for example).</p>

        <p>Each graph is configured within a &lt;measure&gt; section in the report
        configuration. As already mentioned, a measure can be evaluated for the
        whole system (default), in which case the &lt;measure&gt; section should
        appear at the top-level (within &lt;config&gt; section). But the measure
        can also be done per use case, in which case the &lt;measure&gt; section
        should appear within the corresponding &lt;use_case&gt; section.<br/>
        Finally, the measure can also be done per scenario, in which case the
        &lt;measure&gt; section must appear within a &lt;scenario&gt; section.<br/>
        Use case names and scenario names are the names referenced in the scenario
        XML files. Check out the provided default reportConfig.xml file for
        examples.</p>

        <p>The following parameters describing the way to present the measurement
        may appear within a &lt;measure&gt; section: (parameters in <i>italic</i>
        are optional):</p>

        <table>
         <tr><td colspan="1" rowspan="1"><b>Title</b></td><td colspan="1" rowspan="1">Title of the Graph, as it will appear in the report</td></tr>
         <tr><td colspan="1" rowspan="1"><b>Description</b></td><td colspan="1" rowspan="1">Description of the data being measured to be displayed
          in the report</td></tr>
         <tr><td colspan="1" rowspan="1"><b>Source</b></td><td colspan="1" rowspan="1">The Source can be either one of the following keyword :
          <ul>
           <li>SAPS - Session attemps per seconds</li>
           <li>ALL-SIPP-CPU - CPU of all SIPp (one graph per system where SIPp
            instances are running)</li>
           <li>ALL-SIPP-MEM - Memory of all SIPp (one graph per system where SIPp
            instances are running)</li>
           <li>Ratio - Not a graph but just a way to measure the actual ratio of
            appearance of the various scenarios and have it displayed in the
            summary table.</li>
           <li>IHS - Inadequately handled scenarios per seconds</li>
           <li>DELAY-SAPS - Delay between two scenario attempts</li>
           <li>RETRANSMIT - Number of Retransmits per seconds</li>
           <li><i>&lt;metric_name&gt;</i> - PX_TRT-REG1 or any of the metric defined in
            the XML scenario files</li>
          </ul></td></tr>
         <tr><td colspan="1" rowspan="1"><b>AxeX</b></td><td colspan="1" rowspan="1">Description of X axis</td></tr>
         <tr><td colspan="1" rowspan="1"><b>AxeY</b></td><td colspan="1" rowspan="1">Description of Y axis</td></tr>
         <tr><td colspan="1" rowspan="1"><b>Ignore</b></td><td colspan="1" rowspan="1">If set, no graph is generated for the measurement
          (easy way to add/remove graphs without actually removing them from the
          reportConfig.xml file)</td></tr>
         <tr><td colspan="1" rowspan="1"><b>UnitX</b></td><td colspan="1" rowspan="1">Scaling factor along the X axis. For instance, time is
          reported in the csv files as milliseconds, while it makes more sense to display it
          as seconds in the report; hence, UnitX would be 1000.</td></tr>
         <tr><td colspan="1" rowspan="1"><b>UnitY</b></td>
          <td colspan="1" rowspan="1">Scaling factor along the Y axis (same as UnitX, but for Y-coordinate).
          For instance, response times in csv files are in micro-seconds, while
          milliseconds would be more appropriate for most graphs; UnitY would then
          be 1000.</td></tr>
         <tr><td colspan="1" rowspan="1"><b>LegendY</b></td>
          <td colspan="1" rowspan="1">The legend to associate with the plot of the measurement.</td></tr>
         <tr><td colspan="1" rowspan="1"><b>InSummary</b></td><td colspan="1" rowspan="1">If present, the data (mean value over each step)
          is also included in the summary table at the beginning of the report. The
          parameter value is used as heading in the summary table.</td></tr>
         <tr><td colspan="1" rowspan="1"><b>Logscale</b></td><td colspan="1" rowspan="1">If set, the graph is logarithmic and the value of this
          parameter is used as minimum value to display.</td></tr>
         <tr><td colspan="1" rowspan="1"><b>DistAndHistoUnit</b></td>
          <td colspan="1" rowspan="1">Grouping Unit for DistrBasedGraph and ProbaBasedGraph graphs. Metrics
          related data from csv files (timestamps) are in microseconds, but when making
          histograms, it is probably desired to group data as otherwise there would be
          too few measurements at the exact same value to build a meaningful histogram.
          If set to 100 for instance, it means that histogram unit will be 100
          micro-seconds and all data will be rounded up to 100 micro-seconds.
          If, at the same, time UnitY is set to 1000 (milli-seconds), the
          resulting histogram will have 10 points (1000/100) for each milliseconds.</td></tr>
        </table>

        <p>Measurements can be plotted in different forms. All forms can be used for
        all measurements, but some forms are more appropriate than others for some
        measurements. The type of graph for measurement is specified by including
        one of the following parameters within the &lt;measure&gt; section.</p>

        <table>
         <caption>Types of graphs</caption>
         <tr><td colspan="1" rowspan="1"><b>MeanBasedGraph</b></td><td colspan="1" rowspan="1">In the 'MeanBasedGraph' format, the
          measurements are presented as mean per second. This is useful for metrics for
          instance.</td></tr>
         <tr><td colspan="1" rowspan="1"><b>TimeBasedGraph</b></td><td colspan="1" rowspan="1">In the 'TimeBasedGraph' graph format, the raw
          measurement data is plotted. Obviously, this graph can be used for any
          measurements like CPU, memory, retransmit per second (which, by definition,
          are already per second, and for which calculating a mean per second would not
          bring anything).<br/>
          It can also be used for plotting delay between two scenarios for instance
          (because the mean per second does not have that much sense in this case).</td></tr>
         <tr><td colspan="1" rowspan="1"><b>DistrBasedGraph</b></td><td colspan="1" rowspan="1">In the 'DistrBasedGraph' graph format, data
          are shown in the form of an histogram. This graph can be used for instance for
          plotting SAPS (allowing to verify that the generated load follows the expected
          random distribution), or other metrics for which it is interesting to see the
          way the values are distributed.</td></tr>
         <tr><td colspan="1" rowspan="1"><b>ProbaBasedGraph</b></td><td colspan="1" rowspan="1">This type of graph shows the probability of a
          measure to be higher than a certain value. Mathematically speaking, it is
          1 - integral (histogram). It is very helpful as it can be used to deduce
          various percentile values.</td></tr>
        </table>

        <p>Each of the four graph types can have sub-parameters:</p>

        <table>
         <tr><th colSpan="2" colspan="1" rowspan="1">For all graph types</th></tr>
         <tr><td colspan="1" rowspan="1"><b>Description</b></td>
          <td colspan="1" rowspan="1">Specific description for the graph</td></tr>
         <tr><td colspan="1" rowspan="1"><b>bezier</b></td>
          <td colspan="1" rowspan="1">If set to 1, a bezier curve is included on the graph.
          This is usually useful for Time- and Mean- based graphs.</td></tr>
         <tr><td colspan="1" rowspan="1"><b>Theoretical</b></td>
          <td colspan="1" rowspan="1">If set, a theoretical curve is plotted in addition
          to the actual measurement. Supported values are 'Poisson' and 'Expo'.<br/>
          This is helpful in comparing Poisson or Exponential distributions to their
          expected theoretical curve.</td></tr>
         <tr><th colSpan="2" colspan="1" rowspan="1">For Mean- and Time- based graph types</th></tr>
         <tr><td colspan="1" rowspan="1"><b>Source</b></td>
          <td colspan="1" rowspan="1">If specified within a Mean- or Time- based graph section,
          this indicates the source of a second data set to be plotted on the same
          graph as the primary one (multi-plot graphs). The parameter can take the
          same values as described above when used for the primary graph
          (at the &lt;measure&gt; level).</td></tr>
         <tr><td colspan="1" rowspan="1"><b>AxeY</b></td>
          <td colspan="1" rowspan="1">For a multi-plot graph, specifies the text to show along the second
          Y axis (for the data coming from the second source).</td></tr>
         <tr><td colspan="1" rowspan="1"><b>LegendY</b></td>
          <td colspan="1" rowspan="1">For a multi-plot graph, specifies the text to use as legend associated
          with the second plot.</td></tr>
        </table>

          </section> <!-- Graphs -->
        </section> <!-- Configuring the Report -->

        <section><title>Executing doReport.pl</title>
        <p>The help screen of doReport.pl shows the command line options it supports:</p>
        <source xml:space="preserve"><![CDATA[
 Syntax: doReport.pl [-r <report_file>] [-c <report_config_file>]
                     [-i <ims_bench_file>] [-F<0|1>]

 -r specifies the raw benchmark report file (default: report.xml) resulting
    from the run you want to generate a graphical report for.
 -c specifies the configuration file for this script (default: reportConfig.xml)
 -b specifies an optional benchmark info HTML fragment file to include as
    introduction in the report (a default generic sentence is otherwise provided)
 -i specifies the ims_bench config file (in case the benchmark run was
    configured using the ims_bench script), containing IMS benchmark parameters.
 -F specifies whether gnuplot should be forked (to benefit from multiple CPU
    cores). -F0 disables the forking (default: enabled)
 -? to get this help.
        ]]></source>

        <p>doReport.pl expects to find the csv data files, the report.xml file
        and the scenario files in the current directory.
        You can however execute it from anywhere where you have these files
        present as it will look for its own files
        (reportConfig.xml unless specified through -c command line option, some
        small picture files, etc.) at the path present in the command line.<br/>
        It is therefore common to execute it from the same location where you
        ran the manager during the benchmark run (the ims_bench_xyz
        directory in case the benchmark run was prepared by the ims_bench tool).
        <br/>For example:</p>
        <source xml:space="preserve"><![CDATA[../scripts/doReport.pl -i ims_bench.xml]]></source>

        <p>You can however overwrite the reportConfig.xml file as well as
        the logo file (logo.png - displayed in the top left corner of reports)
        by putting your own versions of these files in the current directory.
        doReport.pl first looks for them in the current directory and then
        at the same location where the script itself resides.</p>

        </section>

      </section> <!-- Generating Report -->
    </section> <!-- Using IMS Bench SIPp -->

    <section><title>Concepts and Features</title>

<!-- ********************************************* -->
<!-- ********************************************* -->
      <anchor id="multi_scenario"/><section><title>Multi-scenario mode</title>
        <p><comment>NEW!</comment>A key feature in IMS Bench SIPp is its support for
        multiple scenarios within a single SIPp instance. Multiple scenarios
        are uploaded by the manager to the SIPp instance(s) and each call is
        executing one of the scenarios.</p>

        <p>Scenarios can be classified as either client-side or server-side.
        A client-side scenario is a scenario that starts by initiating
        a SIP transaction or a non-SIP message exchange with a partner
        SIPp instance (usually in a preparation phase of the scenario where
        scenario and user reservation is performed).<br/>
        A server-side scenario is one that starts by the reception of
        the first message of a SIP transaction or the reception of a 
        message from a partner SIPp instance.</p>

        <p>Client-side scenarios are initiated by the SIPp instances
        according to the scenario initiation scheduling (e.g. Poisson
        distribution of the delays between two consecutive scenarios)
        and start executing their sequence immediately. The exact
        scenario to execute from the list of client-side scenarios loaded
        is selected at random according to the configured relative
        occurrences of the scenarios in the scenario mix.
        <br/>In the benchmark configuration, client-side scenarios are
        identified by the fact that they have a <code>ratio</code>
        attribute that specifies their relative occurrence in a specific
        run section of the benchmark configuration (See also
        <link href="#manager_config_run">Manager Configuration - &lt;run&gt; sections</link>).</p>

        <p>In IMS Bench SIPp, server-side scenarios are only instantiated
        when receiving, from a partner SIPp instance executing a client-side
        scenario, a request for preparing execution of a specific
        server-side scenario. The client-side scenario is therefore the
        controlling side and a server-side scenario always has at least
        one associated client-side scenario that will trigger
        its invocation. If a server-side scenario has no client-side
        counterpart in the benchmark configuration, it will never be 
        executed.</p>

        <p>A client-side scenario <i>Si</i> running on SIPp instance <i>X</i> requests
        a partner SIPp instance <i>Y</i> (association made at random for
        the duration of the call) to instantiate the server-side
        scenario <i>Si'</i> by sending a non-SIP <code>req_user</code> message
        to <i>Y</i>, telling it the ID of the server-side scenario to
        instantiate as well as the SIP URI of the emulated user at <i>X</i>
        from whom the first SIP message of the actual SIP scenario
        portion will come (SIP From header). SIPp instance <i>Y</i> will then
        be ready to receive this first SIP message and will match it,
        based on the received From header, with the call instantiated
        for the server-side scenario <i>Si'</i>. SIPp instance <i>Y</i> will then
        update its internal SIP CallId map so that it can, from then
        on, directly dispatch subsequent messages for the same call
        to the corresponding call running the <i>Si'</i> scenarion.</p>

        <p><strong>Note:</strong> This fairly complex mechanism was
        designed to allow multiple SIPp instances to place calls between
        them through a System Under Test that could potentially modify
        the SIP CallId between both call legs. This is typically the
        case with SUTs behaving as a B2BUAs. IMS Bench SIPp should
        work in the situation just the same way as it works with 
        SUTs that simply proxy the calls leaving the CallId
        unmodified. It also provides for a very realistic
        test system where a specific test system agent (SIPp instance)
        from the setup not only places calls towards itself but also
        to all other test system agents. Otherwise, users represented
        by a SIPp instance <i>X</i> would only call (or interact with) other
        users also represented by SIPp instance <i>X</i>.</p>

        <warning>
         <p>This user and scenario reservation procedure requires that the
         user at the server-side be only reserved for one single inbound scenario
         at a time because otherwise, there would be a risk that another call from
         the same originating user at the client-side arrives at approximately the
         same time and that they get matched against the incorrect reserved scenario.</p>
         <p>For example, user A executing a messaging scenario <i>Si</i> and a calling scenario
         <i>Sj</i> towards the same user B at almost the exact same time could end up in
         server-side scenario <i>Si'</i> (counterpart of <i>Si</i>) being associated with the
         CallId of the calling scenario and vice-versa. This would obvisouly lead to
         failures because the expected messages at the server-side are different
         for both scenarios. And this failure would be due to the test system only.
         One must therefore carefully design the scenarios so the user is locked between
         the time it is reserved and the time the association with the SIP CallId
         is made (i.e. when the first SIP message is received at the server-side).</p>
        </warning>
 

      </section>

<!-- ********************************************* -->
<!-- ********************************************* -->
      <anchor id="user_centric"/><section><title>User oriented mode</title>
        <p>Also quite central to IMS Bench SIPp for its implementation of
        the IMS Performance Benchmark is its user oriented mode.
        It is triggered by the usage of the <code>-user_inf</code> command
        line parameter which specifies a file containing data for the SIP
        users that the SIPp instance will represent in its interactions with
        the SUT.</p>

        <p>The way this is implemented is very simple and relies on the
        following basic elements:</p>
        <ol>
         <li>SIPp maintains user entities that contain static data fields,
          and variables</li>
         <li>SIPp also maintains a set of user pools into which users
          are placed. The actual meaning of these pools is really
          defined by the way the scenarios use them but they are
          meant to loosely represent user state.</li>
         <li>New actions allow XML scenarios to assign a user from a
          specific pool to a call (scenario instance) and to move the
          currently assigned user to a different pool.
          <br/>This effectively gives a meaning
          to each pool. For example, a registration scenario will always
          pick users from a pool that represents the not-registered
          users, and upon successfull registration will move them
          to the pool of registered users. A successful calling
          scenario would then pick users from the pool of registered
          users, etc.</li>
         <li>Similarly to call variables, values resulting for example
          from regular expression matching can be assigned to user
          variables of the user currently assigned to the call. The
          interest of user variables vs call variables is that they
          preserve their value between multiple scenario invocations.
          For example, the Service-Route header returned during a
          registration can be stored in a user variable in then
          later injected as Route header in the INVITE a calling
          scenario creates.</li>
        </ol>

        <p>In addition, IMS Bench SIPp will assign a different combination
        of IP address and UDP port number to each user that it represents.
        This makes the traffic more realistic. Depending on the transport
        mode used, it will distribute the users on the configured IP addresses
        and then on the available ports on that address
        (see also <link href="#transports">SIPp Transport Modes</link>).</p>
      </section>

<!-- ********************************************* -->
<!-- ********************************************* -->
      <anchor id="Time Metrics"/><section><title>Time Metrics</title>

        <p>SIPp supports starting timers and stopping timers. It also supports
        specifying timeouts on &lt;recv&gt; commands. However, the
        original SIPp did not provide a way to verify that a
        measured time (called Response Time Duration, RTD) is within
        an allowed range for the scenario to be considered as correctly
        handled unless it exactly matched a receive timeout.
        IMS Bench SIPp provides such a mechanism by which a call can be
        marked as inadequately handled if one of the measured RTD exceeds
        a predefined maximum value, even though the scenario executed
        correctly from the sequence and SIP protocol point of view.</p>

        <p>This is then reflected in statistics as well as in the percentage
        of inadequately handled scenarios that the IMS Bench manager
        determines at run-time when deciding whether to move to a next
        step in the load profile or not.</p>

        <p>In IMS Bench SIPp, the timing measurements that must be collected
        in the scenario CSV result file (when using the <code>-trace_scen</code>
        option) and that can be checked against a specified maximum value are
        called "metrics".</p>

        <p>These metrics are defined within the scenario file in a <comment>new</comment>
        &lt;info&gt; section, as in the following example:</p>
<source xml:space="preserve"><![CDATA[
  <info>
   <metric ref="PX_TRT-REG1" rtd="1" max="2000"/>
   <metric ref="PX_TRT-REG2" rtd="2" max="4000"/>
  </info>
]]></source>

        <p>The above example defines two time metrics to be checked against
        corresponding maximum values. For each metric, the RTD (SIPp timer) into
        which it will be computed by the scenario is specified as well as the
        maximum accepted value.</p>

        <p>The checks are done at the end of the scenario execution (if successful
        from a message sequence and protocol timeouts point of view), and in case
        a maximum value is exceeded, the call is marked as failed.</p>

        <p>The metric name specified in the <code>ref</code> attribute is not used
        by SIPp itself but by the report generation tool. It makes the link between
        the time metric name (for example as defined in a benchmark specification)
        and the RTD used to measure it within the SIPp scenario.</p>

        <p>In the example above, the first metric is declared to be computed in
        RTD 1 and is not allowed to exceed 2000 milliseconds. The second one is
        computed in RTD 2 and may not exceed 4000 ms. The RTD values result from the
        usage of the <link href="#start_rtd">start_rtd</link> and <link href="#rtd">rtd</link>
        attributes on &lt;send&gt; or &lt;recv&gt; commands, or from computations
        performed on RTD values by <link href="#action_rtd">RTD related Actions</link>.</p>

        <p>The &lt;metric&gt; elements also tell SIPp which rtd values to dump into
        the scenario CSV result file when the <code>-trace_scen</code> command 
        line option is used. Also note that the <code>max</code> attribute is
        actually optional so that it's possible to dump an RTD to the scenario
        CSV file even when it does not need to be checked against a maximum
        value.</p>

      </section>

<!-- ********************************************* -->
<!-- ********************************************* -->
      <anchor id="traffic_control"/><section><title>Traffic control</title>
        <p>In IMS Bench SIPp, the traffic is controlled by the benchmark manager
        according to its configuration. The SIPp instances generate SIP traffic
        (scenario mix, average number of new scenario attempts per second)
        according to the instructions they receive from the manager.
        The traditional keys used in the original SIPp to control the number of
        calls started per second are disabled in IMS Bench SIPp mode.</p>

        <p>You can still <strong>pause</strong> the traffic by pressing the 'p' key
        and resume it by pressing 'p' again, 
        but this will of course disturb your benchmark run.
        SIPp will stop placing new calls and will continue executing the scenario of
        already running calls.</p>

        <p>In IMS Bench mode, SIPp normally quits when you press 'q' in the console
        of the manager or when the manager exits.</p>
        <p>The 'q' key is however still handled in the SIPp instance as well. If you press it,
        SIPp will stop placing new calls and will wait until all current calls go to their end.
        During this phase, <comment>(NEW!)</comment> SIPp will regularly look at all calls that are
        executing a pause command and will shorten the duration of this pause so as to 
        speed up the exit while still trying to complete all calls in their normal flow.
        SIPp will then exit.</p>
        <p>You can also force SIPp to <strong>quit</strong> immediatly by pressing the 'Q' key,
        or by pressing the 'q' key again several times. 
        Current calls will be terminated by sending a BYE or CANCEL message (depending if 
        the calls have been established or not).</p>
      </section>

    </section> <!-- Concepts and Features -->


<!-- ********************************************* -->
<!-- ********************************************* -->
    <anchor id="xmlsyntax"/><section><title>Writing XML Scenarios</title>
            <p>IMS Bench SIPp comes with a set of scenarios to execute the IMS/NGN Performance
            Benchmark and some additional scenarios to use the IMS Bench SIPp test system
            against simpler SIP servers. You might however need to adapt those to your needs or
            write new scenarios for your particular testing or benchmarking needs.</p>

            <p>A SIPp scenario is written in XML
            (a DTD that may help you write SIPp
            scenarios does exist and has been tested with jEdit - this is described in a later section).
            A scenario will always start with:</p>
            <source xml:space="preserve"><![CDATA[<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="Some name">]]></source>
            <p>And end with:</p>
            <source xml:space="preserve"><![CDATA[</scenario>]]></source>
            <p>Easy, huh? Ok, now let's see what can be put inside. You are not
            obliged to read the whole table now! Just go in the next section for
            an example.</p>
            <table>
                <caption>List of commands with their attributes</caption>
                <tr>
                    <th colspan="1" rowspan="1">Command</th>
                    <th colspan="1" rowspan="1">Attribute(s)</th>
                    <th colspan="1" rowspan="1">Description</th>
                    <th colspan="1" rowspan="1">Example</th>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><anchor id="send"/><strong>&lt;send&gt;</strong></td>
                    <td colspan="1" rowspan="1">retrans</td>
                    <td colspan="1" rowspan="1">Used for UDP transport only: it specifies the T1 timer value,
                    as described in SIP RFC 3261, section 17.1.1.2.</td>
                    <td colspan="1" rowspan="1"><code>&lt;send retrans="500"&gt;</code>: will initiate T1 timer to 500 milliseconds (RFC3261 default).</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"><anchor id="start_rtd"/></td>
                    <td colspan="1" rowspan="1">start_rtd</td>
                    <td colspan="1" rowspan="1">Starts one or more of the 5 "<strong>R</strong>esponse <strong>T</strong>ime <strong>D</strong>uration" timer.
                    (see <link href="#Response+times">statistics section</link>).</td>
                    <td colspan="1" rowspan="1"><code>&lt;send start_rtd="2,3"&gt;</code>: the timers number 2 and 3 will start when the message is sent.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"><anchor id="rtd"/></td>
                    <td colspan="1" rowspan="1">rtd</td>
                    <td colspan="1" rowspan="1">Stops the listed "<strong>R</strong>esponse <strong>T</strong>ime <strong>D</strong>uration" timer.</td>
                    <td colspan="1" rowspan="1"><code>&lt;send rtd="2, 4"&gt;</code>: the timers number 2 and 4 will stop when the message is sent.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">crlf</td>
                    <td colspan="1" rowspan="1">Displays an empty line <strong>after</strong> the arrow for the message in main SIPp screen.</td>
                    <td colspan="1" rowspan="1"><code>&lt;send crlf="true"&gt;</code></td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">lost</td>
                    <td colspan="1" rowspan="1">Emulate packet lost. The value is specified as a percentage.</td>
                    <td colspan="1" rowspan="1"><code>&lt;send lost="10"&gt;</code>: 10% of the message sent are actually not sent :).</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">next</td>
                    <td colspan="1" rowspan="1">You can put a "next" in a send to go to another part of the script when you are done with sending the message. 
                    See <link href="#branching">conditional branching</link> section for more info.</td>
                    <td colspan="1" rowspan="1">Example to jump to label "12" after sending an ACK:<source xml:space="preserve"><![CDATA[  <send next="12">
    <![CDATA[

      ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
      Via: ...
      From: ...
      To: ...
      Call-ID: ...
      Cseq: ...
      Contact: ...
      Max-Forwards: ...
      Subject: ...
      Content-Length: 0

    ]]]]><![CDATA[>
  </send>
]]></source></td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">test</td>
                    <td colspan="1" rowspan="1">You can put a "test" next to a "next" attribute to indicate
                    that you only want to branch to the label specified with "next"
                    if the variable specified in "test" is set (through <link href="#action_regexp">regexp</link>
                    for example).
                    See <link href="#branching">conditional branching</link> section for more info.</td>
                    <td colspan="1" rowspan="1">Example to jump to label "6" after sending an ACK only if
                    variable 4 is set:<source xml:space="preserve"><![CDATA[  <send next="6" test="4">
    <![CDATA[

      ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
      Via: ...
      From: ...
      To: ...
      Call-ID: ...
      Cseq: ...
      Contact: ...
      Max-Forwards: ...
      Subject: ...
      Content-Length: 0

    ]]]]><![CDATA[>
  </send>
]]></source></td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">counter</td>
                    <td colspan="1" rowspan="1">Increments the counter given as parameter when the message is sent. A total of 5 counter can be used.
                    The counter are saved in the <link href="#Available+counters">statistic file</link>.</td>
                    <td colspan="1" rowspan="1"><code>&lt;send counter="1"&gt;</code>: Increments counter #1 when the message is sent.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"><anchor id="recv"/><strong>&lt;recv&gt;</strong></td>
                    <td colspan="1" rowspan="1">response</td>
                    <td colspan="1" rowspan="1">Indicates what SIP message code is expected.</td>
                    <td colspan="1" rowspan="1"><code>&lt;recv response="200"&gt;</code>: SIPp will expect a SIP message with code "200".</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">request</td>
                    <td colspan="1" rowspan="1">Indicates what SIP message request is expected.</td>
                    <td colspan="1" rowspan="1"><code>&lt;recv request="ACK"&gt;</code>: SIPp will expect an "ACK" SIP message.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">optional</td>
                    <td colspan="1" rowspan="1">Indicates if the message to receive is optional. In case of an optional
                    message and if the message is actually received, it is not seen as a unexpected message.</td>
                    <td colspan="1" rowspan="1"><code>&lt;recv response="100" optional="true"&gt;</code>: The 100 SIP message can be received without 
                    being considered as "unexpected".</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">crlf</td>
                    <td colspan="1" rowspan="1">Displays an empty line <strong>after</strong> the arrow for the message in main SIPp screen.</td>
                    <td colspan="1" rowspan="1"><code>&lt;recv crlf="true"&gt;</code></td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">rrs</td>
                    <td colspan="1" rowspan="1"><strong>R</strong>ecord <strong>R</strong>oute <strong>S</strong>et. if this attribute is set to "true",
                    then the "Record-Route:" header of the message received is stored and can be recalled using the <strong>[routes]</strong> keyword.</td>
                    <td colspan="1" rowspan="1"><code>&lt;recv response="100" rrs="true"&gt;</code>.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">auth</td>
                    <td colspan="1" rowspan="1"><link href="#authentication">Authentication</link>. if this attribute is set to "true",
                    then the "Proxy-Authenticate:" header of the message received is stored and is used to build
                    the <strong>[authentication]</strong> keyword.</td>
                    <td colspan="1" rowspan="1"><code>&lt;recv response="407" auth="true"&gt;</code>.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">start_rtd</td>
                    <td colspan="1" rowspan="1">Starts one of the 5 "<strong>R</strong>esponse <strong>T</strong>ime <strong>D</strong>uration" timer.
                    (see <link href="#Response+times">statistics section</link>).</td>
                    <td colspan="1" rowspan="1"><code>&lt;recv start_rtd="4"&gt;</code>: the timer number 4 will start when the message is received.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">rtd</td>
                    <td colspan="1" rowspan="1">Stops one of the 5 "<strong>R</strong>esponse <strong>T</strong>ime <strong>D</strong>uration" timer.</td>
                    <td colspan="1" rowspan="1"><code>&lt;recv rtd="4"&gt;</code>: the timer number 4 will stop when the message is received.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">lost</td>
                    <td colspan="1" rowspan="1">Emulate packet lost. The value is specified as a percentage.</td>
                    <td colspan="1" rowspan="1"><code>&lt;recv lost="10"&gt;</code>: 10% of the message received are thrown away.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">action</td>
                    <td colspan="1" rowspan="1">Specify an action when receiving the message. See  <link href="#actions">Actions section</link> for possible actions.</td>
                    <td colspan="1" rowspan="1">Example of a "regular expression" action:<source xml:space="preserve"><![CDATA[<recv response="200">
 <action>
  <ereg regexp="([0-9]{1,3}\.){3}[0-9]{1,3}:[0-9]*"
    search_in="msg"
    check_it="true"
    assign_to="1,2"/>
  </action>
 </recv>]]></source></td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">next</td>
                    <td colspan="1" rowspan="1">You can put a "next" in an optional receive to go to another part of the script if you receive that message. 
                    See <link href="#branching">conditional branching</link> section for more info.</td>
                    <td colspan="1" rowspan="1">Example to jump to label "5" when receiving a 403 message:<source xml:space="preserve"><![CDATA[  <recv response="100"
        optional="true">
  </recv>
  <recv response="180" optional="true">
  </recv>
  <recv response="403" optional="true" next="5">
  </recv>
  <recv response="200">
  </recv>
]]></source></td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">test</td>
                    <td colspan="1" rowspan="1">You can put a "test" in an optional receive to go to another part of the script if you receive that message
                    only if the variable specified by "test" is set. 
                    See <link href="#branching">conditional branching</link> section for more info.</td>
                    <td colspan="1" rowspan="1">Example to jump to label "5" when receiving a 403 message only if
                    variable 3 is set:<source xml:space="preserve"><![CDATA[  <recv response="100"
        optional="true">
  </recv>
  <recv response="180" optional="true">
  </recv>
  <recv response="403" optional="true" next="5" test="3">
  </recv>
  <recv response="200">
  </recv>
]]></source></td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">chance</td>
                    <td colspan="1" rowspan="1">In combination with "test", probability to actually branch to another part
		    of the scenario. Chance can have a value between 0 (never) and 1 (always). 
		    See <link href="#branching">conditional branching</link> section for more info.</td>
                    <td colspan="1" rowspan="1"><source xml:space="preserve"><![CDATA[  <recv response="403" optional="true" next="5" test="3" chance="0.90">
  </recv>]]></source>90% chance to go to label "5" if variable "3" is set.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">counter</td>
                    <td colspan="1" rowspan="1">Increments the counter given as parameter when the message is received. A total of 5 counter can be used.
                    The counter are saved in the <link href="#Available+counters">statistic file</link>.</td>
                    <td colspan="1" rowspan="1"><code>&lt;recv counter="1"&gt;</code>: Increments counter #1 when the message is received.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">regexp_match</td>
                    <td colspan="1" rowspan="1">Boolean. Indicates if 'request' ('response' is not available) is given as a regular expression. If so, the recv
		    command will match against the regular expression. This allows to catch several cases
		    in the same receive command.
		    </td>
                    <td colspan="1" rowspan="1">Example of a recv command that matches MESSAGE or PUBLISH or SUBSCRIBE requests:<br/>
		    <source xml:space="preserve"><![CDATA[<recv request="MESSAGE|PUBLISH|SUBSCRIBE" crlf="true" regexp_match="true">
</recv>]]></source></td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"><strong>&lt;pause&gt;</strong></td>
                    <td colspan="1" rowspan="1">milliseconds</td>
                    <td colspan="1" rowspan="1">Specify the pause delay, in milliseconds. When this delay is not set, the value of the <code>-d</code> command
                    line parameter is used.</td>
                    <td colspan="1" rowspan="1"><code>&lt;pause milliseconds="5000"/&gt;</code>: pause the scenario for 5 seconds.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">variable</td>
                    <td colspan="1" rowspan="1">Indicates which call variable to use to determine the length of the pause.</td>
                    <td colspan="1" rowspan="1"><code>&lt;pause variable="1" /&gt;</code> pauses for the number of milliseconds specified by call variable 1.</td>
                </tr>
                <tr>
                  <td colspan="1" rowspan="1"/>
                  <td colspan="1" rowspan="1">distribution</td>
                  <td colspan="1" rowspan="1">Indicates which statistical distribution to use to determine the length of the pause.  Without GSL, you may use <code>uniform</code> or <code>fixed</code>.  With GSL, normal, exponential, gamma, lambda, lognormal, negbin, (negative binomial), pareto, and weibull are available.  Depending on the distribution you select, you must also supply distribution specific parameters.</td>
                  <td colspan="1" rowspan="1">
                    The following examples show the various types of distributed pauses:
                    <ul>
                    <li><code>&lt;pause distribution="fixed" value="1000" /&gt;</code> pauses for 1 second.</li>
                    <li><code>&lt;pause distribution="uniform" min="2000" max="5000"/&gt;</code> pauses between 2 and 5 seconds.</li>
                    </ul>
                    The remaining distributions require GSL.  In general The
                    parameter names were chosen to be as consistent with
                    Wikipedia's distribution description pages.
                    <ul>
                      <li><code>&lt;pause distribution="normal" mean="60000" stdev="15000"/&gt;</code> provides a normal pause with a mean of 60 seconds (i.e. 60,000 ms) and a standard deviation of 15 seconds.  The mean and standard deviation are specified as integer milliseconds.  The distribution will look like:<br/>
                        <img alt="Normal pause distribution" src="images/dist_normal.gif"/></li>
                      <li><code>&lt;pause distribution="lognormal" mean="12.28" stdev="1" /&gt;</code> creates a distribution's whose natural logarithm has a mean of 12.28 and a
                        standard deviation of 1.  The mean and standard deviation are specified as
                        double values (in milliseconds).  The distribution will look like:<br/>
                        <img alt="Log normal pause distribution" src="images/dist_lognormal.gif"/></li>
                      <li><code>&lt;pause distribution="exponential" mean="900000"/&gt;</code> creates an exponentially distributed pause with a mean of 15 minutes.  The distribution will look like:<br/>
                      <img alt="Normal pause distribution" src="images/dist_exponential.gif"/></li>
                      <li><code>&lt;pause distribution="weibull" lambda="3" k ="4"/&gt;</code> creates a Weibull distribution with a scale of 3 and a shape of 4 (see <link href="http://en.wikipedia.org/wiki/Weibull_distribution">Weibull on Wikipedia</link> for a description of the distribution).</li>
                      <li><code>&lt;pause distribution="pareto" k="1" x_m="2"/&gt;</code> creates a Pareto distribution with k and x<sub>m</sub> of 1 and 2, respectively (see <link href="http://en.wikipedia.org/wiki/Pareto_distribution">Pareto on Wikipedia</link> for a description of the distribution).</li>
                      <li><code>&lt;pause distribution="gamma" k="3" theta="2"/&gt;</code> creates a Gamma distribution with k and theta of 9 and 2, respectively (see <link href="http://en.wikipedia.org/wiki/Gamma_distribution">Gamma on Wikipedia</link> for a description of the distribution).</li>
                      <li><code>&lt;pause distribution="negbin" p="0.1" n="2"/&gt;</code> creates a Negative binomial distribution with p and n of 0.1 and 2, respectively (see <link href="http://en.wikipedia.org/wiki/Negative_binomial_distribution">Negative Binomial on Wikipedia</link> for a description of the distribution).</li>
                      <li><code>&lt;pause distribution="poisson" mean="60000"/&gt;</code> creates a Poisson distribution with a mean of 60s (see <link href="http://en.wikipedia.org/wiki/Poisson_distribution">Poisson distribution on Wikipedia</link> for a description of the distribution).</li>
                    </ul>
                  </td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">crlf</td>
                    <td colspan="1" rowspan="1">Displays an empty line <strong>after</strong> the arrow for the message in main SIPp screen.</td>
                    <td colspan="1" rowspan="1"><code>&lt;pause crlf="true"&gt;</code></td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">next</td>
                    <td colspan="1" rowspan="1">You can put a "next" in a pause to go to another part of the script when you are done with the pause. 
                    See <link href="#branching">conditional branching</link> section for more info.</td>
                    <td colspan="1" rowspan="1">Example to jump to label "7" after pausing 4 seconds:<source xml:space="preserve"><![CDATA[<pause milliseconds="4000" next="7"/>]]></source></td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><anchor id="nop"/><strong>&lt;nop&gt;</strong></td>
                    <td colspan="1" rowspan="1">action</td>
                    <td colspan="1" rowspan="1">The nop command doesn't do anything at SIP level. It is 
                    only there to specify an action to execute. See  <link href="#actions">Actions section</link> for possible actions.</td>
                    <td colspan="1" rowspan="1">Execute the play_pcap_audio/video action:<source xml:space="preserve"><![CDATA[<nop>
  <action>
    <exec play_pcap_audio="pcap/g711a.pcap"/>
  </action>
</nop>
]]></source></td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">start_rtd</td>
                    <td colspan="1" rowspan="1">Starts one of the 5 "<strong>R</strong>esponse <strong>T</strong>ime <strong>D</strong>uration" timer.
                     (see <link href="#Response+times">statistics section</link>).</td>
                    <td colspan="1" rowspan="1"><code>&lt;nop start_rtd="1"&gt;</code>: the timer number 1 starts when nop is executed.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">rtd</td>
                    <td colspan="1" rowspan="1">Stops one of the 5 "<strong>R</strong>esponse <strong>T</strong>ime <strong>D</strong>uration" timer.</td>
                    <td colspan="1" rowspan="1"><code>&lt;nop rtd="1"&gt;</code>: the timer number 1 will stops when nop is executed.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"><anchor id="sendCmd"/><strong>&lt;sendCmd&gt;</strong></td>
                    <td colspan="1" rowspan="1">&lt;![CDATA[]]&gt;</td>
                    <td colspan="1" rowspan="1">Content to be sent to the twin <link href="#ThreePCC">3PCC</link> SIPp instance. The Call-ID must be included in the CDATA. In 3pcc extended mode, the From must be included to. </td>
                    <td colspan="1" rowspan="1"><source xml:space="preserve"><![CDATA[<sendCmd>
  <![CDATA[
    Call-ID: [call_id]
    [$1]

   ]]]]><![CDATA[>
</sendCmd>]]></source></td>
                </tr> 
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">dest</td>
                    <td colspan="1" rowspan="1">3pcc extended mode only: the twin sipp instance which the command will be sent to</td>
                    <td colspan="1" rowspan="1"><code>&lt;sendCmd dest="s1"&gt;</code>: the command will be sent to the "s1" twin instance</td>
                </tr>           
                <tr>
                    <td colspan="1" rowspan="1"><anchor id="recvCmd"/><strong>&lt;recvCmd&gt;</strong></td>
                    <td colspan="1" rowspan="1">action</td>
                    <td colspan="1" rowspan="1">Specify an action when receiving the command. See  <link href="#actions">Actions section</link> for possible actions.</td>
                    <td colspan="1" rowspan="1">Example of a "regular expression" to retrieve what has been send by a sendCmd command:<source xml:space="preserve"><![CDATA[<recvCmd>
  <action>
     <ereg regexp="Content-Type:.*"
           search_in="msg"
           assign_to="2"/>
  </action>
</recvCmd>]]></source></td>
                </tr> 
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">src</td>
                    <td colspan="1" rowspan="1">3pcc extended mode only: indicate the twin sipp instance which the command is expected to be received from </td>
                    <td colspan="1" rowspan="1"><code>&lt;recvCmd src = "s1"&gt;</code>: the command will be expected to be received from the "s1" twin instance</td>
                </tr>           
                <tr>
                    <td colspan="1" rowspan="1"><strong>&lt;label&gt;</strong></td>
                    <td colspan="1" rowspan="1">id</td>
                    <td colspan="1" rowspan="1">A label is used when you want to branch to specific parts
                    in your scenarios. The "id" attribute is an integer where the maximum value is 19.
                    See <link href="#branching">conditional branching</link> section for more info.</td>
                    <td colspan="1" rowspan="1">Example: set label number 13:<source xml:space="preserve"><![CDATA[<label id="13"/>]]></source></td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><anchor id="resptimerep"/><strong>&lt;Response Time Repartition&gt;</strong></td>
                    <td colspan="1" rowspan="1">value</td>
                    <td colspan="1" rowspan="1">Specify the intervals, in milliseconds, used to distribute the values of response times.</td>
                    <td colspan="1" rowspan="1"><code>&lt;ResponseTimeRepartition value="10, 20,
                    30"/&gt;</code>: response time values are distributed
                    between 0 and 10ms, 10 and 20ms, 20 and 30ms, 30 and
                    beyond.</td>
                </tr>            
                <tr>
                    <td colspan="1" rowspan="1"><anchor id="calllengthrep"/><strong>&lt;Call Length Repartition&gt;</strong></td>
                    <td colspan="1" rowspan="1">value</td>
                    <td colspan="1" rowspan="1">Specify the intervals, in milliseconds, used to distribute the values of the call length measures.</td>
                    <td colspan="1" rowspan="1"><code>&lt;CallLengthRepartition value="10, 20,
                    30"/&gt;</code>: call length values are distributed between
                    0 and 10ms, 10 and 20ms, 20 and 30ms, 30 and beyond.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><anchor id="sync"/><strong>&lt;sync&gt;</strong></td>
                    <td colspan="1" rowspan="1">action</td>
                    <td colspan="1" rowspan="1">As most scenarios have a preparation step (user reservation) that is
                     not considered part of the actual scenario exercised and as this actual
                     scenario must start at the time given by the statistical distribution of
                     scenario attempts, scenario files (at least the initiating side) must
                     contain a synchronization point where SIPp will wait until the time the
                     actual scenario attempt must start.</td>
                    <td colspan="1" rowspan="1">
<source xml:space="preserve"><![CDATA[
<sync crlf="true">
 <action>
  <exec int_cmd="set_start_time"/>
 </action>
</sync>
]]></source><br/>
                    Note that the manager configuration can disable this synchronization for
                    some parts of the runs, for example in a step performing the
                    pre-registration of users.
                  </td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><anchor id="sendrmt"/><strong>&lt;sendRmt&gt;</strong></td>
                    <td colspan="1" rowspan="1">type</td>
                    <td colspan="1" rowspan="1">
                      The command sends a (non-SIP) message to the partner SIPp instance. In case no partner has been assigned yet to the scenario, 
                      a partner SIPp instance is selected at random (uniform) before sending the message.
                     </td>
                    <td colspan="1" rowspan="1">
<source xml:space="preserve"><![CDATA[
<sendRmt type="req_user">
 <param name="scenario" value="ims_uas"/>
 <param name="from_uri" value="[field0]@[field1]"/>
 <param name="call_id" value="[call_id]"/>
</sendRmt>
]]></source><br/>
                  </td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><anchor id="recvrmt"/><strong>&lt;recvRmt&gt;</strong></td>
                    <td colspan="1" rowspan="1">type</td>
                    <td colspan="1" rowspan="1">
                      The command waits for a message of the specified type to be received from the
                      partner SIPp instance.<br/> 
                      <p>Additionally, it can also be the first command of a receiving side scenario
                      (e.g. the called party), in which case it must specify the <code>req_user</code>
                      message type.<br/>
                      A special behavior is implemented for this message type: when received, SIPp
                      instantiates a new incoming call executing the scenario specified by the scenario
                      parameter of the incoming <code>req_user</code> message, assigns it the
                      sending SIPp instance as partner and then feeds the newly created call with the
                      received message so that scenario execution immediately starts. </p>
                     </td>
                    <td colspan="1" rowspan="1">
<source xml:space="preserve"><![CDATA[
<recvRmt type="req_user">
 <action>
  <assign_user pool="2"/>
  <move_user pool="3"/>
</recvRmt>
]]></source><br/>
                  </td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"/>
                    <td colspan="1" rowspan="1">timeout</td>
                    <td colspan="1" rowspan="1">
                    Max time to wait for the message from partner (not valid for a &lt;recvRmt&gt; as first command in a scenario). 
                     </td>
                    <td colspan="1" rowspan="1">
<source xml:space="preserve"><![CDATA[
<recvRmt type="res_user" timeout="8000">
 <action>
   <store_param param="user_name" assign_to="1"/>
 </action>
</recvRmt>
]]></source><br/>
                  </td>
                </tr>
                
            </table>
            <anchor id="partner_msg_types"/><p>Partner Message Types (sendRmt and recvRmt)</p>
            <table>
            <tr><td colspan="1" rowspan="1">req_user</td><td colspan="1" rowspan="1">Requests user reservation.</td></tr>
            <tr><td colspan="1" rowspan="1">res_user</td><td colspan="1" rowspan="1">Result of user resevation.</td></tr>
            <tr><td colspan="1" rowspan="1">res_call_info</td>
             <td colspan="1" rowspan="1">Typically sent at the end of a scenario, carries call information like RTDs and
              timestamps measured at the partner SIPp (the approach is that all timing
              measurements are gathered at one side of a scenario and dumped by that side - hence
              they need to be sent from the partner in case they were measured there, or in
              case the measurement is between events at different sides).</td></tr>
            </table>

            <p>There are not so many commands: send, recv, sendRmt, recvRmt,
            pause, ResponseTimeRepartition and CallLengthRepartition. To make
            things even clearer, nothing is better than an example...</p>
      <section><title>Structure of client (UAC like) XML scenarios</title>
            <p>A client scenario is a scenario that starts with a "send" command. So let's start:</p>
            <source xml:space="preserve"><![CDATA[<scenario name="Basic Sipstone UAC">
  <send>
    <![CDATA[
    
      INVITE sip:]]><strong>[service]</strong><![CDATA[@]]><strong>[remote_ip]</strong><![CDATA[:]]><strong>[remote_port]</strong><![CDATA[ SIP/2.0
      Via: SIP/2.0/]]><strong>[transport]</strong><![CDATA[ ]]><strong>[local_ip]</strong><![CDATA[:]]><strong>[local_port]</strong><![CDATA[
      From: sipp <sip:sipp@]]><strong>[local_ip]</strong><![CDATA[:]]><strong>[local_port]</strong><![CDATA[>;tag=]]><strong>[call_number]</strong><![CDATA[
      To: sut <sip:]]><strong>[service]</strong><![CDATA[@]]><strong>[remote_ip]</strong><![CDATA[:]]><strong>[remote_port]</strong><![CDATA[>
      Call-ID: ]]><strong>[call_id]</strong><![CDATA[
      Cseq: 1 INVITE
      Contact: sip:sipp@]]><strong>[local_ip]</strong><![CDATA[:]]><strong>[local_port]</strong><![CDATA[
      Max-Forwards: 70
      Subject: Performance Test
      Content-Type: application/sdp
      Content-Length: ]]><strong>[len]</strong><![CDATA[

      v=0
      o=user1 53655765 2353687637 IN IP]]><strong>[local_ip_type]</strong><![CDATA[ ]]><strong>[local_ip]</strong><![CDATA[
      s=-
      t=0 0
      c=IN IP]]><strong>[media_ip_type]</strong><![CDATA[ ]]><strong>[media_ip]</strong><![CDATA[
      m=audio ]]><strong>[media_port]</strong><![CDATA[ RTP/AVP 0
      a=rtpmap:0 PCMU/8000


    ]]]]><![CDATA[>
  </send>]]></source>
            <p>Inside the "send" command, you have to enclose your SIP message
            between the "&lt;![CDATA" and the "]]&gt;" tags. Everything between
            those tags is going to be sent toward the remote system. You may
            have noticed that there are strange keywords in the SIP message,
            like <strong>[service], [remote_ip], ...</strong>. Those keywords
            are used to indicate to SIPp that it has to do something with
            it.</p>
            <p>Here is the list:</p>
            <anchor id="keyword"/>
            <table>
                <caption>Keyword list</caption>
                <tr>
                    <th colspan="1" rowspan="1">Keyword</th>
                    <th colspan="1" rowspan="1">Default</th>
                    <th colspan="1" rowspan="1">Description</th>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[service]</strong></td>
                    <td colspan="1" rowspan="1">service</td>
                    <td colspan="1" rowspan="1">Service field, as passed in the <strong><code>-s service_name</code></strong></td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[remote_ip]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Remote IP address, as passed on the command line.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[remote_port]</strong></td>
                    <td colspan="1" rowspan="1">5060</td>
                    <td colspan="1" rowspan="1">Remote IP port, as passed on the command line. You can 
                    add a computed offset [remote_port+3] to this value.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[transport]</strong></td>
                    <td colspan="1" rowspan="1">UDP</td>
                    <td colspan="1" rowspan="1">Depending on the value of <strong>-t</strong> parameter, this will take the values "UDP" or "TCP".</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[local_ip]</strong></td>
                    <td colspan="1" rowspan="1">Primary host IP address</td>
                    <td colspan="1" rowspan="1">Will take the value of <strong>-i</strong> parameter.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[local_ip_type]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Depending on the address type of <strong>-i</strong> parameter (IPv4 or IPv6),
                    local_ip_type will have value "4" for IPv4 and "6" for IPv6.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[local_port]</strong></td>
                    <td colspan="1" rowspan="1">Random</td>
                    <td colspan="1" rowspan="1">Will take the value of <strong>-p</strong> parameter.
                    You can add a computed offset [local_port+3] to this value.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[len]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Computed length of the SIP body. To be used in "Content-Length"
                    header. You can add a computed offset [len+3] to this value.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[call_number]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Index. The call_number starts from "1" and is incremented by 1 for each call.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[cseq]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Generates automatically the CSeq number. The initial value is 1 by default. It
                    can be changed by using the <code>-base_cseq</code> command line option.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[call_id]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">A call_id identifies a call and is generated by SIPp for each new call. <strong>In client mode, it is mandatory
                    to use the value generated by SIPp in the "Call-ID" header.</strong> Otherwise, SIPp will not recognise
                    the answer to the message sent as being part of an existing call.<br/>
                    Note: [call_id] can be pre-pended with an arbitrary string using '///'.
                    Example: Call-ID: ABCDEFGHIJ///[call_id] - it will still be recognized by SIPp as part of the same call.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[media_ip]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Depending on the value of <strong>-mi</strong> parameter, it is the local IP address for RTP echo.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[media_ip_type]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Depending on the address type of <strong>-mi</strong> parameter (IPv4 or IPv6),
                    media_ip_type will have value "4" for IPv4 and "6" for IPv6. Useful to build the SDP independently
                    of the media IP type.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[media_port]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Depending on the value of <strong>-mp</strong> parameter, it set the local RTP echo port number. Default
                      is none. RTP/UDP packets received on that port are echoed to their sender. You can 
                    add a computed offset [media_port+3] to this value.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[auto_media_port]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Only for pcap. To make audio and video ports begin from the value of <strong>-mp</strong> parameter, 
                        and change for each call using a periodical system, modulo 10000 (which limits to 10000 concurrent RTP sessions for pcap_play) </td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[last_*]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">The '[last_*]' keyword is replaced automatically by the
                    specified header if it was present in the last message
                    received (except if it was a retransmission). If the header
                    was not present or if no message has been received, the
                    '[last_*]' keyword is discarded, and all bytes until the end
                    of the line are also discarded. If the specified header was
                    present several times in the message, all occurrences are
                    concatenated (CRLF separated) to be used in place of the
                    '[last_*]' keyword.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[field0-n]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Used to inject values from an external CSV file or from
                    static user data if a user is assigned to the call. See
                    <link href="#inffile">"Injecting values from an external CSV
                    during calls"</link> section.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[$n]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Used to inject the value of call variable number n. See "<link href="#actions">Actions</link>" section</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[authentication]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Used to put the authentication header. This field can have parameters, in the following form: 
                    [authentication username=myusername password=mypassword]. If no username is provided, 
                    the value from -s command line parameter (service) is used.  If no password is provided, the value 
                    from -ap command line parameter is used. See "<link href="#authentication">Authentication</link>" section</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[pid]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Provide the process ID (pid) of the main SIPp thread.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[routes]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">If the "rrs" attribute in a recv command is set to "true",
                    then the "Record-Route:" header of the message received is stored 
                    and can be recalled using the [routes] keyword</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[next_url]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">If the "rrs" attribute in a recv command is set to "true",
                    then the [next_url] contains the contents of the Contact header 
                    (i.e within the '&lt;' and '&gt;' of Contact)</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[branch]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Provide a branch value which is a concatenation of magic cookie 
                    (z9hG4bK) + call number + message index in scenario.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[msg_index]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Provide the message number in the scenario.</td>
                </tr>
                <tr>
                    <td colspan="1" rowspan="1"><strong>[cseq]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1">Provides the CSeq value of the last request received. This value can be incremented (e.g. [cseq+1] adds 1 to
                        the CSeq value of the last request).</td>
                </tr>
                
                <tr>
                    <td colspan="1" rowspan="1"><strong>[%&lt;<i>param</i>&gt;]</strong></td>
                    <td colspan="1" rowspan="1">-</td>
                    <td colspan="1" rowspan="1"><comment>NEW!</comment>Use to inject a global generic parameters
                     (see <code>-key</code> command line option and manager
                     <link href="#scen_params">scenario parameters</link>).<br/>
                     Example: <code>&lt;pause poisson="true" mean="%RingTime"/&gt;</code></td>
                </tr>                
                
            </table>
            <p>Now that the INVITE message is sent, SIPp can wait for an answer by using the "<link href="#recv">recv</link>" command.</p>
<source xml:space="preserve"><![CDATA[  <recv response="100"> optional="true"
  </recv>

  <recv response="180"> optional="true"
  </recv>

  <recv response="200">
  </recv>]]></source>
            <p>100 and 180 messages are optional, and 200 is mandatory. 
            <strong>In a "recv" sequence, there must be one mandatory message</strong>.</p>
            <p>Now, let's send the ACK:</p>
<source xml:space="preserve"><![CDATA[  <send>
    <![CDATA[

      ACK sip:]]><strong>[service]</strong><![CDATA[@]]><strong>[remote_ip]</strong><![CDATA[:]]><strong>[remote_port]</strong><![CDATA[ SIP/2.0
      Via: SIP/2.0/]]><strong>[transport]</strong><![CDATA[ ]]><strong>[local_ip]</strong><![CDATA[:]]><strong>[local_port]</strong><![CDATA[
      From: sipp <sip:sipp@]]><strong>[local_ip]</strong><![CDATA[:]]><strong>[local_port]</strong><![CDATA[>;tag=]]><strong>[call_number]</strong><![CDATA[
      To: sut <sip:]]><strong>[service]</strong><![CDATA[@]]><strong>[remote_ip]</strong><![CDATA[:]]><strong>[remote_port</strong><![CDATA[]>]]><strong>[peer_tag_param]</strong><![CDATA[
      Call-ID: ]]><strong>[call_id]</strong><![CDATA[
      Cseq: 1 ACK
      Contact: sip:sipp@]]><strong>[local_ip]</strong><![CDATA[:]]><strong>[local_port]</strong><![CDATA[
      Max-Forwards: 70
      Subject: Performance Test
      Content-Length: 0

    ]]]]><![CDATA[>
  </send>]]></source>
            <p>We can also insert a pause. The scenario will wait for 5 seconds at this point.</p>
<source xml:space="preserve"><![CDATA[  <pause milliseconds="5000"/>]]></source>
            <p>And finish the call by sending a BYE and expecting the 200 OK:</p>
<source xml:space="preserve"><![CDATA[    <send retrans="500">
     <![CDATA[

      BYE sip:]]><strong>[service]</strong><![CDATA[@]]><strong>[remote_ip]</strong><![CDATA[:]]><strong>[remote_port]</strong><![CDATA[ SIP/2.0
      Via: SIP/2.0/]]><strong>[transport] [local_ip]</strong><![CDATA[:]]><strong>[local_port]</strong><![CDATA[
      From: sipp  <sip:sipp@]]><strong>[local_ip]</strong><![CDATA[:]]><strong>[local_port]</strong><![CDATA[>;tag=]]><strong>[call_number]</strong><![CDATA[
      To: sut  <sip:]]><strong>[service]</strong><![CDATA[@]]><strong>[remote_ip]</strong><![CDATA[:]]><strong>[remote_port]</strong><![CDATA[>]]><strong>[peer_tag_param]</strong><![CDATA[
      Call-ID: ]]><strong>[call_id]</strong><![CDATA[
      Cseq: 2 BYE
      Contact: sip:sipp@]]><strong>[local_ip]</strong><![CDATA[:]]><strong>[local_port]</strong><![CDATA[
      Max-Forwards: 70
      Subject: Performance Test
      Content-Length: 0

    ]]]]><![CDATA[>
   </send>

   <recv response="200">
   </recv>]]></source>
            <p>And this is the end of the scenario:</p>
<source xml:space="preserve"><![CDATA[</scenario>]]></source>
            <p>Creating your own SIPp scenarios is not a big deal. 
            If you want to see other examples, use the <code>-sd</code> parameter
            on the command line to display embedded scenarios.</p>
      </section>

      <section><title>Structure of server (UAS like) XML scenarios</title>
            <p>A server scenario is a scenario that starts with a "<link href="#recv">recv</link>" command. 
            The syntax and the list of available commands is the same as for
            "client" scenarios.</p>
            <p>But you are more likely to use [last_*] keywords in those server
            side scenarios. For example, a UAS example will look like:</p>
<source xml:space="preserve"><![CDATA[  <recv request="INVITE">
  </recv>

  <send>
    <![CDATA[

      SIP/2.0 180 Ringing
      ]]><strong>[last_Via:]</strong><![CDATA[
      ]]><strong>[last_From:]</strong><![CDATA[
      ]]><strong>[last_To:]</strong><![CDATA[;tag=]]><strong>[call_number]</strong><![CDATA[
      ]]><strong>[last_Call-ID:]</strong><![CDATA[
      ]]><strong>[last_CSeq:]</strong><![CDATA[
      Contact: <sip:]]><strong>[local_ip]</strong><![CDATA[:]]><strong>[local_port]</strong><![CDATA[;transport=]]><strong>[transport]</strong><![CDATA[>
      Content-Length: 0

    ]]]]><![CDATA[>
  </send>]]></source>
            <p>The answering message, 180 Ringing in this case, is built
            with the content of headers received in the INVITE message.</p>
      </section>
<!-- ********************************************* -->
<!-- ********************************************* -->
      <anchor id="actions"/><section><title>Actions</title>
              <p>In a "<link href="#recv">recv</link>" or "<link href="#recvCmd">recvCmd</link>" command,
              you have the possibility to execute an action.
              Several actions are available:</p>
              <ul>
                <li><link href="#action_regexp">Regular expressions</link> (ereg)</li>
                <li><link href="#action_log">Log something in aa log file</link> (log)</li>
                <li><link href="#action_exec">Execute an external (system), internal (int_cmd) or 
                pcap_play_audio/pcap_play_video command</link> (exec)</li>
                <li><link href="#action_user">User-related Actions</link> (assign_user, move_user)</li>
                <li><link href="#action_rtd">RTD-related Actions</link> (rtd_eval, rtd_store, rtd_op)</li>
              </ul>
        <anchor id="action_regexp"/><section><title>Regular expressions</title>
                  <p>Using regular expressions in SIPp allows to</p>
                  <ul>
                     <li>Extract content of a SIP message or a SIP header and
                     store it for future usage (called re-injection)</li>
                     <li>Check that a part of a SIP message or of a header 
                     is matching an expected expression</li>
                  </ul>
                  <p>Regular expressions used in SIPp are defined per 
                  <link href="http://www.opengroup.org/onlinepubs/007908799/xbd/re.html">
                  Posix Extended standard (POSIX 1003.2)</link>. If you want to
                  learn how to write regular expressions, I will recommend 
                  this <link href="http://analyser.oli.tudelft.nl/regex/index.html.en">
                  regexp tutorial</link>.</p>
                  <p>Here is the syntax of the regexp action:</p>
                  <table>
                      <caption>regexp action syntax</caption>
                      <tr>
                          <th colspan="1" rowspan="1">Keyword</th>
                          <th colspan="1" rowspan="1">Default</th>
                          <th colspan="1" rowspan="1">Description</th>
                      </tr>
                      <tr>
                          <td colspan="1" rowspan="1">regexp</td>
                          <td colspan="1" rowspan="1">None</td>
                          <td colspan="1" rowspan="1">Contains the regexp to use for matching the 
                          received message or header. MANDATORY.</td>
                      </tr>
                      <tr>
                          <td colspan="1" rowspan="1">search_in</td>
                          <td colspan="1" rowspan="1">msg</td>
                          <td colspan="1" rowspan="1">can have 2 values: "msg" (try to match against 
                          the entire message) or "hdr" (try to match against a specific SIP header).</td>
                      </tr>
                      <tr>
                          <td colspan="1" rowspan="1">header</td>
                          <td colspan="1" rowspan="1">None</td>
                          <td colspan="1" rowspan="1">Header to try to match against. Only used when 
                          the search_in tag is set to hdr. MANDATORY IF 
                          search_in is equal to hdr.</td>
                      </tr>
                      <tr>
                          <td colspan="1" rowspan="1">case_indep</td>
                          <td colspan="1" rowspan="1">false</td>
                          <td colspan="1" rowspan="1">To look for a header ignoring case . Only used when 
                          the search_in tag is set to hdr. </td>
                      </tr>
                      <tr>
                          <td colspan="1" rowspan="1">occurence</td>
                          <td colspan="1" rowspan="1">1</td>
                          <td colspan="1" rowspan="1">To find the nth occurrence of a header. Only used when 
                          the search_in tag is set to hdr.</td>
                      </tr>
                      <tr>
                          <td colspan="1" rowspan="1">start_line</td>
                          <td colspan="1" rowspan="1">false</td>
                          <td colspan="1" rowspan="1">To look only at start of line. Only used when 
                          the search_in tag is set to hdr.</td>
                      </tr>
                      <tr>
                          <td colspan="1" rowspan="1">check_it</td>
                          <td colspan="1" rowspan="1">false</td>
                          <td colspan="1" rowspan="1">if set to true, the call is marked as failed if 
                          the regexp doesn't match.</td>
                      </tr>
                      <tr>
                          <td colspan="1" rowspan="1">assign_to</td>
                          <td colspan="1" rowspan="1">None</td>
                          <td colspan="1" rowspan="1">contains the variable id (integer) or a list of 
                          variable id which will be used to store the 
                          result(s) of the matching process between the regexp 
                          and the message. Those variables can be re-used at 
                          a later time either by using '[$n]' in the scenario 
                          to inject the value of the variable in the messages or
                          by using the content of the variables for <link href="#branching">conditional 
                          branching</link>.

                          <p><comment>NEW!</comment>With the introduction by IMS
                          Bench SIPp of the concept of users, it is now also possible
                          to store results of regular expression matching into
                          user variables. These variables can then be used just
                          like call variables but, contrary to call variables,
                          they preserve their value between subsequent calls
                          associated with the same user. Assigning a value
                          to a user variable requires that a user has previously
                          been assigned to the call. To assign a result to a
                          user variable <i>n</i>, the variable id must be
                          specified as 'u<i>n</i>'.</p>

                          <p>The first variable in the variable list of
                          assign_to contains the entire regular
                          expression matching. The following variables contain the
                          sub-expressions matching. Example:</p>
<source xml:space="preserve"><![CDATA[<ereg regexp="o=([[:alnum:]]*) ([[:alnum:]]*) ([[:alnum:]]*)"
            search_in="msg"
            check_it=i"true"
            assign_to="3,u3,u2,8"/>]]></source>
                          If the SIP message contains the line
                          <source xml:space="preserve"><![CDATA[o=user1 53655765 2353687637 IN IP4 127.0.0.1]]></source>
                          <strong>call</strong> variable 3 will contain "o=user1 53655765 2353687637",
                          <strong>user</strong> variable 3 will contain "user1", 
                          <strong>user</strong> variable 2 will contain "53655765"
                          and <strong>call</strong> variable 8 will contain "2353687637".</td>
                      </tr>
                  </table>
                  <p>Note that you can have several regular expressions
                  in one action.</p>
                  <p>The following example is used to:</p>
                  <ul>
                    <li>First action:
                      <ul>
                        <li>Extract the first IPv4 address of the received SIP message</li>
                        <li>Check that we could actually extract this IP address (otherwise
                        call will be marked as failed)</li>
                        <li>Assign the extracted IP address to call variables 1
                        and 2.</li>
                      </ul>
                    </li>
                    <li>Second action:
                      <ul>
                        <li>Extract the Contact: header of the received SIP message</li>
                        <li>Assign the extracted Contract: header to variable 6.</li>
                      </ul>
                    </li>
                  </ul>
                  <source xml:space="preserve"><![CDATA[
<recv response="200" start_rtd="true">
  <action>
    <ereg regexp="([0-9]{1,3}\.){3}[0-9]{1,3}:[0-9]*" search_in="msg" check_it="true" assign_to="1,2" /> 
    <ereg regexp=".*" search_in="hdr" header="Contact:" check_it="true" assign_to="6" />
  </action>
</recv>
]]></source>
        </section>
        <anchor id="action_log"/><section><title>Log a message</title>
                  <p>The "log" action allows you to customize your traces. Messages
                  are printed in the &lt;scenario file name&gt;_&lt;pid&gt;_logs.log file.
                  Any <link href="#keyword">keyword</link> is expanded to reflect the value actually used.</p>
                  <warning>Logs are generated only if -trace_logs option is set on
                  the command line.</warning>
                  <p>Example:</p>
                  <source xml:space="preserve"><![CDATA[   <recv request="INVITE" crlf="true" rrs="true">
     <action>
	 <ereg regexp=".*" search_in="hdr" header="Some-New-Header:" assign_to="1" />
          <log message="From is [last_From]. Custom header is [$1]"/>
     </action>
   </recv>]]></source>
        </section>
        <anchor id="action_exec"/><section><title>Execute a command</title>
                <p>The "exec" action allows you to execute "internal", "external",
                "play_pcap_audio" or "play_pcap_video" commands.</p>
          <section><title>Internal commands</title>
                  <p><strong>Internal</strong> commands (specified using int_cmd attribute) are: </p>
                  <table>
                  <tr><th colspan="1" rowspan="1">Keyword</th><th colspan="1" rowspan="1">Description</th><th colspan="1" rowspan="1">Example</th></tr>
                  <tr><td colspan="1" rowspan="1"><code>stop_call</code><br/><code>stop_gracefully</code></td>
                   <td colspan="1" rowspan="1">Similar to pressing 'q'</td>
                   <td colspan="1" rowspan="1"><source xml:space="preserve"><![CDATA[<exec int_cmd="stop_call"/>]]></source></td></tr>
                  <tr><td colspan="1" rowspan="1"><code>stop_now</code></td>
                   <td colspan="1" rowspan="1">Similar to pressing ctrl+C</td>
                   <td colspan="1" rowspan="1"><source xml:space="preserve"><![CDATA[<exec int_cmd="stop_now"/>]]></source></td></tr>
                  <tr><td colspan="1" rowspan="1"><code>set_start_time</code></td>
                   <td colspan="1" rowspan="1">Resets the time reference for the current call. This is used so
                    as to ignore the user reservation procedure portion of a scenario, as
                    it is not actually part of the SIP scenario being performed. 
                    This action should therefore be