Commit 7dda161b authored by YannGarcia's avatar YannGarcia
Browse files

Validate TC_PSAP_SIP_INVITE_BV_06 with SIPp

parent dce25a4f
Loading
Loading
Loading
Loading
+131 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<!-- This program is free software; you can redistribute it and/or      -->
<!-- modify it under the terms of the GNU General Public License as     -->
<!-- published by the Free Software Foundation; either version 2 of the -->
<!-- License, or (at your option) any later version.                    -->
<!--                                                                    -->
<!-- This program is distributed in the hope that it will be useful,    -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
<!-- GNU General Public License for more details.                       -->
<!--                                                                    -->
<!-- You should have received a copy of the GNU General Public License  -->
<!-- along with this program; if not, write to the                      -->
<!-- Free Software Foundation, Inc.,                                    -->
<!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->
<!--                                                                    -->
<!--                 Sipp default 'uac' scenario.                       -->
<!--                                                                    -->

<scenario name="Basic UAC">
  <!-- In client mode (sipp placing calls), the Call-ID MUST be         -->
  <!-- generated by sipp. To do so, use [call_id] keyword.                -->
  <send retrans="1000">
    <![CDATA[

      INVITE urn:service:sos SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: Alice <sip:alice-01@plugtests.net>;tag=[pid]SIPpTag00[call_number]
      To: [service] <sip:[service]@plugtests.net>
      Call-ID: [call_id]
      CSeq: 1 INVITE
      Contact: sip:alice-01@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: Plugtests Test
      Geolocation: <cid:gE4dNNthX4QcNzCv@dec112.app>;inserted_by="sip:bob-04@plugtests.net"
      Geolocation-Routing: no
      Accept: application/pidf+xml
      Content-Type: multipart/mixed; boundary=qfpbntOwkOXuJWki
      Content-Length: [len]

      --qfpbntOwkOXuJWki
      Content-Type: application/sdp

      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
	
      --qfpbntOwkOXuJWki
      Content-Type: application/pidf+xml
      Content-ID: <gE4dNNthX4QcNzCv@dec112.app>

      <?xml version="1.0" encoding="UTF-8"?><presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10" xmlns:gbp="urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy" xmlns:cl="urn:ietf:params:xml:ns:pidf:geopriv10:civicAddr" xmlns:gml="http://www.opengis.net/gml" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" entity="pres:alice@atlanta.example.com"><dm:device id="01003118-0200-d09c-a762-00046e180003"><gp:geopriv><gp:location-info><gml:location><gml:Point srsName="urn:ogc:def:crs:EPSG::4326"><gml:pos>43.62303240 7.04618454</gml:pos></gml:Point></gml:location></gp:location-info><gp:usage-rules><gbp:retransmission-allowed>false</gbp:retransmission-allowed><gbp:retention-expiry>2018-04-16T08:23:31.036Z</gbp:retention-expiry></gp:usage-rules><gp:method>gps</gp:method></gp:geopriv><dm:deviceID>01003118-0200-d09c-a762-00046e180003</dm:deviceID><dm:timestamp>2018-04-15T08:23:31.036Z</dm:timestamp></dm:device></presence>
      --qfpbntOwkOXuJWki--

    ]]>
  </send>

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

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

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

  <!-- By adding rrs="true" (Record Route Sets), the route sets         -->
  <!-- are saved and used for following messages sent. Useful to test   -->
  <!-- against stateful SIP proxies/B2BUAs.                             -->
  <recv response="200" rtd="true">
  </recv>

  <!-- Packet lost can be simulated in any send/recv message by         -->
  <!-- by adding the 'lost = "10"'. Value can be [1-100] percent.       -->
  <send>
    <![CDATA[

      ACK sip:[service]@[remote_ip]:[remote_port] 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: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
      Call-ID: [call_id]
      CSeq: 1 ACK
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: Performance Test
      Content-Length: 0

    ]]>
  </send>

  <!-- This delay can be customized by the -d command-line option       -->
  <!-- or by adding a 'milliseconds = "value"' option here.             -->
  <pause milliseconds="15000"/>

  <!-- The 'crlf' option inserts a blank line in the statistics report. -->
  <send retrans="1000">
    <![CDATA[

      BYE sip:[service]@[remote_ip]:[remote_port] 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: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
      Call-ID: [call_id]
      CSeq: 2 BYE
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: Performance Test
      Content-Length: 0

    ]]>
  </send>

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

  <!-- definition of the response time repartition table (unit is ms)   -->
  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>

  <!-- definition of the call length repartition table (unit is ms)     -->
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>

</scenario>
+3 −0
Original line number Diff line number Diff line
echo "Simulate PSAP Caller side (UAS)"
rm *.log
sipp -t t1 -trace_msg -trace_calldebug -trace_err -m 2 -sf PsapCaller.xml 127.0.0.1:5060
+140 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<!-- This program is free software; you can redistribute it and/or      -->
<!-- modify it under the terms of the GNU General Public License as     -->
<!-- published by the Free Software Foundation; either version 2 of the -->
<!-- License, or (at your option) any later version.                    -->
<!--                                                                    -->
<!-- This program is distributed in the hope that it will be useful,    -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
<!-- GNU General Public License for more details.                       -->
<!--                                                                    -->
<!-- You should have received a copy of the GNU General Public License  -->
<!-- along with this program; if not, write to the                      -->
<!-- Free Software Foundation, Inc.,                                    -->
<!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->
<!--                                                                    -->
<!--                 Sipp default 'uas' scenario.                       -->
<!--                                                                    -->

<scenario name="Basic UAS responder">
  <!-- By adding rrs="true" (Record Route Sets), the route sets         -->
  <!-- are saved and used for following messages sent. Useful to test   -->
  <!-- against stateful SIP proxies/B2BUAs.                             -->
  <recv request="INVITE" crlf="true" rrs="true">
  </recv>

  <!-- 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 occurences are concatenated (CRLF seperated)        -->
  <!-- to be used in place of the '[last_*]' keyword.                   -->

  <send>
    <![CDATA[

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

    ]]>
  </send>

  <pause milliseconds="1"/>    

  <send>
    <![CDATA[

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

    ]]>
  </send>

  <pause milliseconds="1"/>    

  <send retrans="1000">
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:];tag=[call_number]
      [last_Call-ID:]
      [last_CSeq:]
      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 0
      a=rtpmap:0 PCMU/8000

    ]]>
  </send>

  <recv request="ACK"
        optional="false"
        rtd="true"
        crlf="true">
  </recv>

  <pause milliseconds="4000"/>

  <!-- Keep the call open for a while in case the 200 is lost to be     -->
  <!-- able to retransmit it if we receive the BYE again.               -->
  <pause milliseconds="4000">
    <action>
      <exec command="sipp -t t1 -trace_msg -m 2 -sf PsapCallTalker.xml 127.0.0.1:5080"></exec>
    </action>
  </pause>

  <pause milliseconds="4000"/>

  <recv request="BYE">
  </recv>

  <send>
    <![CDATA[

      SIP/2.0 200 OK
      [last_Via:]
      [last_From:]
      [last_To:]
      [last_Call-ID:]
      [last_CSeq:]
      Contact: <sip:[local_ip]:[local_port];transport=[transport]>
      Content-Length: 0

    ]]>
  </send>

  <!-- definition of the response time repartition table (unit is ms)   -->
  <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>

  <!-- definition of the call length repartition table (unit is ms)     -->
  <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>

</scenario>
+14 −4
Original line number Diff line number Diff line
@@ -950,12 +950,17 @@ module AtsPSAP_TestCases {
                                                );
        v_invite.msgHeader.contentType := m_contentType(m_mimeMultipart);
        f_SendINVITE(v_invite);
        f_awaitingResponseIgnore100Trying(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq));
        // awaiting 180 RINGING
        f_awaitingResponseIgnore100Trying(mw_Response_Base(c_statusLine180, vc_callId, vc_cSeq));
        // awaiting 200 OK INVITE
        f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq));
        // Send INVITE ACK
        LibSip_Steps.f_setHeadersACK();
        f_SendACK(m_ACK_Request_route(vc_requestUri, vc_callId, vc_response.msgHeader.cSeq, vc_from, vc_to, vc_via, vc_route));
        f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
        
        // Test Body
        f_sleep(10.0);
        f_check_Conversation(PX_CHECK_CONVERSATION);
        f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
        
@@ -979,15 +984,20 @@ module AtsPSAP_TestCases {
        // Test adapter configuration
        
        // Preamble
        f_IMS_preamble_woRegistration(p_cSeq_s)
        LibIms_Steps.f_setHeadersINVITE(p_cSeq_s, f_initSipUrl(c_serviceProfile_EMERGENCY), f_initSipUrl(c_userProfile_UE1atSUThome));
        f_IMS_preamble_woRegistration(p_cSeq_s);
        LibIms_Steps.f_setHeadersINVITE(p_cSeq_s, f_initUrnUrl("service", PX_IMS_SUT_EMERGENCY_SERVICE), f_initSipUrl(c_userProfile_UE1atSUThome));
        f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
        
        // Test Body
        // Await INVITE
        f_awaitingINVITE(mw_INVITE_Request_RequestURI(vc_requestUri));
        
        // Send 180 RINGING
        f_sendResponse(m_Response_18XonINVITE_UE(c_statusLine180, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via,
                                                 vc_contact));
        // Send 200 OK INVITE
        f_sendResponse(m_Response_2xxonINVITE_UE(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via,
                                                 vc_contact, f_recordroute(), valueof(m_MBody_SDP(vc_sdp_local))));
        // Await ACK INVITE
        f_awaitingACK(mw_ACK_Request_Base(vc_callId));
        
        f_check_Conversation(PX_CHECK_CONVERSATION);
+4 −4
Original line number Diff line number Diff line
@@ -25,14 +25,14 @@ module AtsPSAP_TestControl {
      if (PICS_PSAP_B_SDP_ALA1) { execute(TC_PSAP_SIP_INVITE_BV_04(v_cSeq)); }
      }*/
    //execute(TC_PSAP_SIP_INVITE_BV_04(v_cSeq));
    if (PICS_PSAP_S_SIP_TCP1 and PICS_PSAP_E_SIP_URN3) {
    /*if (PICS_PSAP_S_SIP_TCP1 and PICS_PSAP_E_SIP_URN3) {
      if (PICS_PSAP_B_SDP_ULA1) { execute(TC_PSAP_SIP_INVITE_BV_05(v_cSeq)); }
      }
    /*if (PICS_PSAP_S_SIP_TCP1 and PICS_PSAP_E_SIP_URN1) {
      }*/
    if (PICS_PSAP_S_SIP_TCP1 and PICS_PSAP_E_SIP_URN1) {
      if (PICS_PSAP_B_SDP_ULA1) { execute(TC_PSAP_SIP_INVITE_BV_06(v_cSeq)); }
      //if (PICS_PSAP_B_SDP_ULA1) { execute(TC_PSAP_SIP_BYE_BV_01(v_cSeq)); }
    }
    if (PICS_PSAP_S_SIP_UDP1 and PICS_PSAP_E_SIP_BSC1) {
    /*if (PICS_PSAP_S_SIP_UDP1 and PICS_PSAP_E_SIP_BSC1) {
      if (PICS_PSAP_B_SDP_ULA1) { execute(TC_PSAP_SIP_INVITE_BV_07(v_cSeq)); }
      }
    if (PICS_PSAP_E_SIP_URN1) {