Commit 22febeab authored by YannGarcia's avatar YannGarcia
Browse files

Validate TC_PSAP_SIP_OPTIONS, TC_PSAP_SIP_MESSAGE and TC_PSAP_SIP_INFO with SIPp

parent 0bcbb651
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -108,6 +108,10 @@ namespace LibSip__Interface {
      incoming_message(LibSip__SIPTypesAndValues::INFO__Request(p_ind.requestLine(), p_ind.msgHeader(), p_ind.messageBody(), p_ind.payload()));
      incoming_message(LibSip__SIPTypesAndValues::INFO__Request(p_ind.requestLine(), p_ind.msgHeader(), p_ind.messageBody(), p_ind.payload()));
    } else if (p_ind.requestLine().method() == LibSip__SIPTypesAndValues::Method::OPTIONS__E) {
    } else if (p_ind.requestLine().method() == LibSip__SIPTypesAndValues::Method::OPTIONS__E) {
      incoming_message(LibSip__SIPTypesAndValues::OPTIONS__Request(p_ind.requestLine(), p_ind.msgHeader(), p_ind.messageBody(), p_ind.payload()));
      incoming_message(LibSip__SIPTypesAndValues::OPTIONS__Request(p_ind.requestLine(), p_ind.msgHeader(), p_ind.messageBody(), p_ind.payload()));
    } else if (p_ind.requestLine().method() == LibSip__SIPTypesAndValues::Method::MESSAGE__E) {
      incoming_message(LibSip__SIPTypesAndValues::MESSAGE__Request(p_ind.requestLine(), p_ind.msgHeader(), p_ind.messageBody(), p_ind.payload()));
    } else if (p_ind.requestLine().method() == LibSip__SIPTypesAndValues::Method::CANCEL__E) {
      incoming_message(LibSip__SIPTypesAndValues::CANCEL__Request(p_ind.requestLine(), p_ind.msgHeader(), p_ind.messageBody(), p_ind.payload()));
    } else if (p_ind.requestLine().method() == LibSip__SIPTypesAndValues::Method::ACK__E) {
    } else if (p_ind.requestLine().method() == LibSip__SIPTypesAndValues::Method::ACK__E) {
      incoming_message(LibSip__SIPTypesAndValues::ACK__Request(p_ind.requestLine(), p_ind.msgHeader(), p_ind.messageBody(), p_ind.payload()));
      incoming_message(LibSip__SIPTypesAndValues::ACK__Request(p_ind.requestLine(), p_ind.msgHeader(), p_ind.messageBody(), p_ind.payload()));
    } else {
    } else {
+4 −2
Original line number Original line Diff line number Diff line
@@ -15,14 +15,14 @@ LibNg112_Pixits.PX_IMS_SUT_UE1_PUBLIC_USER := "alice-06"
LibNg112_Pixits.PX_IMS_SUT_UE1_HOME_DOMAIN       := "plugtests.net"
LibNg112_Pixits.PX_IMS_SUT_UE1_HOME_DOMAIN       := "plugtests.net"
LibNg112_Pixits.PX_IMS_TS_UE1_IPADDR             := "conftest.plugtests.net" # Local UE address used for From header
LibNg112_Pixits.PX_IMS_TS_UE1_IPADDR             := "conftest.plugtests.net" # Local UE address used for From header
LibNg112_Pixits.PX_IMS_SUT_UE1_BEARER_IPADDR     := "conftest.plugtests.net" # Local UE address used for SDP connection attrubute
LibNg112_Pixits.PX_IMS_SUT_UE1_BEARER_IPADDR     := "conftest.plugtests.net" # Local UE address used for SDP connection attrubute
LibNg112_Pics.PICS_PSAP_CALL_TAKER               := false      # Set to true when CallTalker interface is available
LibNg112_Pics.PICS_PSAP_CALL_TAKER               := true      # Set to true when CallTalker interface is available
#LibNg112_Pixits.PX_IMS_TS_UE1_PORT               := 5052  # SIP over TCP port
#LibNg112_Pixits.PX_IMS_TS_UE1_PORT               := 5052  # SIP over TCP port
LibNg112_Pixits.PX_IMS_SUT_EMERGENCY_SERVICE     := "sos"
LibNg112_Pixits.PX_IMS_SUT_EMERGENCY_SERVICE     := "sos"
LibNg112_Pixits.PX_IMS_SUT_EMERGENCY_HOME_DOMAIN := "psap1.frequentis.plugtests.net"
LibNg112_Pixits.PX_IMS_SUT_EMERGENCY_HOME_DOMAIN := "psap1.frequentis.plugtests.net"
LibNg112_Pixits.PX_IMS_SUT_PCSCF1_IPADDR         := "psap1.frequentis.plugtests.net"
LibNg112_Pixits.PX_IMS_SUT_PCSCF1_IPADDR         := "psap1.frequentis.plugtests.net"
LibNg112_Pixits.PX_IMS_SUT_UE_IPADDR             := "psap1.frequentis.plugtests.net"
LibNg112_Pixits.PX_IMS_SUT_UE_IPADDR             := "psap1.frequentis.plugtests.net"


AtsPSAP_Pics.PICS_PSAP_S_SIP_REGISTRATION := true
AtsPSAP_Pics.PICS_PSAP_S_SIP_REGISTRATION := false
AtsPSAP_Pics.PICS_PSAP_S_SIP_TCP1         := false       # Set to true when using SIP over TCP ==> change SIP ports configuration
AtsPSAP_Pics.PICS_PSAP_S_SIP_TCP1         := false       # Set to true when using SIP over TCP ==> change SIP ports configuration
                                                 # Update LibSip_PIXITS.PX_SIP_TRANSPORT according to true/false value
                                                 # Update LibSip_PIXITS.PX_SIP_TRANSPORT according to true/false value
AtsPSAP_Pics.PICS_PSAP_S_SIP_UDP1         := true
AtsPSAP_Pics.PICS_PSAP_S_SIP_UDP1         := true
@@ -100,6 +100,8 @@ AtsPSAP_TestControl.control
# IUT successfully handles an incoming SIP OPTION
# IUT successfully handles an incoming SIP OPTION
#AtsPSAP_TestCases.TC_PSAP_SIP_INVITE_BV_08
#AtsPSAP_TestCases.TC_PSAP_SIP_INVITE_BV_08


# IUT successfully handles an incoming SIP MESSAGE
#AtsPSAP_TestCases.TC_PSAP_SIP_MESSAGE_BV_01


# Check that the IUT registers properly to an ESRP Dequeue"
# Check that the IUT registers properly to an ESRP Dequeue"
#AtsPSAP_TestCases.TC_PSAP_DEQUEUE_BV_01
#AtsPSAP_TestCases.TC_PSAP_DEQUEUE_BV_01
+159 −0
Original line number Original line 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="500">
    <![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"/>

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

      INFO 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: 10 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: text/plain
      Content-Length: [len]

      blablabla

    ]]>
  </send>

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

  <pause milliseconds="1000"/>

  <!-- The 'crlf' option inserts a blank line in the statistics report. -->
  <send retrans="500">
    <![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 Original line Diff line number Diff line
echo "Simulate PSAP Caller side (UAS)"
rm *.log
sipp -t u1 -trace_msg -trace_err -m 2 -sf PsapCaller.xml 127.0.0.1:5060
+162 −0
Original line number Original line 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="500">
    <![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 u1 -trace_msg -m 1 -sf PsapCallTalker.xml 127.0.0.1:5080"></exec>
    </action>
  </pause>    

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

  <pause milliseconds="1000"/>

  <send>
    <![CDATA[

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

    ]]>
  </send>

  <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>
Loading