<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<!--
   sipp file used for InviteProxy UAC test. Designed only for TCP (no
   retransmission enabled for UDP). Scenario of this test:

   UAC             PROXY                  UAC
        INVITE
    --------------- >
        100
    <--------------
                            INVITE
                     -------------------- >
                           180 Ringing
                     <--------------------
                           200 OK
                     <--------------------
        180 Ringing
    <--------------
        200 OK
    <--------------
        ACK
    --------------- >
        BYE
    --------------- >
                            ACK
                     -------------------- >
                            BYE
                     -------------------- >
                           200 OK
                     <--------------------
        200 OK
    <--------------

    The rtd timer is set to measure only the time from invote to first 200
    OK response.

    Note that because the 100/180/200 responses can be received in any order,
    the 100/180 are marked as optional=global -- that way, they can occur at
    any time without affecting the scenario.
-->

<scenario name="InviteProxy UAC">
  <send retrans="500">
    <![CDATA[

      INVITE sip:[service]@[remote_ip]:[remote_port];transport=[transport] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
      To: sut <sip:[service]@[remote_ip]:[remote_port]>
      Call-ID: [call_id]
      CSeq: 1 INVITE
      Contact: <sip:sipp@[local_ip]:[local_port];transport=[transport]>
      Max-Forwards: 70
      Subject: InviteProxy Performance Test
      Test-Type: uas
      Content-Type: application/sdp
      Content-Length: [len]

      v=0
      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
      s=-
      c=IN IP[media_ip_type] [media_ip]
      t=0 0
      m=audio [media_port] RTP/AVP 0
      a=rtpmap:0 PCMU/8000

    ]]>
  </send>

  <recv response="100" optional="global"/>
  <recv response="180" optional="global"/>

  <recv response="200" rtd="true" rrs="true" optional="false">
	<action>
	    <ereg regexp="fid=[-a-zA-Z0-9_]*" search_in="hdr" header="Contact:" check_it="true" assign_to="6" />
	</action>
  </recv>

  <send>
    <![CDATA[

      ACK sip:[service]@[remote_ip]:[remote_port];transport=[transport];[$6] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
      Call-ID: [call_id]
      CSeq: 1 ACK
      [routes]
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: InviteProxy Performance Test
      Content-Length: 0

    ]]>
  </send>

  <pause/>

  <send retrans="500">
    <![CDATA[

      BYE sip:[service]@[remote_ip]:[remote_port];transport=[transport];[$6] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
      Call-ID: [call_id]
      [routes]
      CSeq: 2 BYE
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: InviteProxy Performance Test
      Content-Length: 0

    ]]>
  </send>

  <recv response="200" crlf="true"/>

  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>

</scenario>

