<?xml version="1.0" encoding="UTF-8" ?>

<scenario name="Sipwise NGCP Benchmark UAS Responder">

  <recv request="INVITE" crlf="true" rtd="true">
  </recv>

  <send>
    <![CDATA[

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

    ]]>
  </send>

  <pause milliseconds="500"/>

  <send>
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:];tag=[pid]SIPpTag01[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      [last_Record-Route:]
      [last_Route:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      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 8
      a=rtpmap:8 PCMA/8000
      a=ptime:50

    ]]>
  </send>

  <recv request="ACK" crlf="true" rtd="true" rrs="true">
  </recv>

  <!-- CALL IS UP -->

  <recv request="INVITE" crlf="true" rtd="true">
  </recv>

    <send>
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:]
      [last_Call-ID:]
      [last_CSeq:]
      [last_Record-Route:]
      [last_Route:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      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 8
      a=rtpmap:8 PCMA/8000
      a=ptime:50
      a=recvonly

    ]]>
  </send>

  <recv request="ACK" crlf="true" rtd="true" rrs="true">
  </recv>

  <!-- CALLEE IS ON HOLD -->

  <recv request="INVITE" crlf="true" rtd="true">
  </recv>

    <send>
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:]
      [last_Call-ID:]
      [last_CSeq:]
      [last_Record-Route:]
      [last_Route:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      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 8
      a=rtpmap:8 PCMA/8000
      a=ptime:50
      a=sendrecv

    ]]>
  </send>

  <recv request="ACK" crlf="true" rtd="true" rrs="true">
    <action>
      <ereg regexp=".*" search_in="hdr" header="From:" assign_to="1" />
      <ereg regexp=".*" search_in="hdr" header="To:" assign_to="2" />
    </action>
  </recv>

  <!-- CALLEE IS OFF HOLD -->

  <pause milliseconds="500"/>
  <nop>
    <action>
      <exec play_pcap_audio="media181sec.pcap"/>
    </action>
  </nop>

  <pause milliseconds="1500"/>

  <!-- SEND BYE -->

  <send start_rtd="4">
    <![CDATA[

      BYE [next_url] SIP/2.0
      [last_Via:]
      From: [$2]
      To: [$1]
      [last_Call-ID:]
      CSeq: 10 BYE
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      [routes]
      Max-Forwards: 70
      Content-Length: 0

    ]]>
  </send>

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

  <recv response="200" crlf="true" rtd="4">
  </recv>

 <send>
    <![CDATA[

      ACK [next_url] SIP/2.0
      [last_Via:]
      [last_From:]
      [last_To:]
      [last_Call-ID:]
      [routes]
      CSeq: 10 ACK
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      [routes]
      Max-Forwards: 70
      Content-Length: 0

    ]]>
  </send>

  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>

</scenario>
