Commit 1fbcf0ec authored by Yann Garcia's avatar Yann Garcia
Browse files

Add PSAP missing tests

parent c37755aa
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -48,14 +48,14 @@ udp_layer::udp_layer(const std::string & p_type, const std::string & param) : la
    loggers::get_instance().warning("udp_layer::udp_layer: Failed to set SO_REUSEADDR");
  }
  // Bind it
  /*struct ifreq ifr;
  struct ifreq ifr;
  memset(&ifr, 0, sizeof(ifr));
  snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "eth1");
  snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "eth2");
  if (setsockopt(_fd, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr, sizeof(ifr)) < 0) {
    close();
    loggers::get_instance().error("udp_layer::udp_layer: Failed to bind socket to %s", ifr.ifr_name);
  }
  loggers::get_instance().log("udp_layer::udp_layer: Bound to device %s", ifr.ifr_name);*/
  loggers::get_instance().log("udp_layer::udp_layer: Bound to device %s", ifr.ifr_name);
  if(::bind(_fd, (struct sockaddr *)&_saddr, sizeof(_saddr)) < 0) {
    close();
    loggers::get_instance().error("udp_layer::udp_layer: Failed to bind socket");
+23 −5
Original line number Diff line number Diff line
@@ -39,12 +39,31 @@ module AtsNg112_Steps {
     */
    function f_init_sdp_userprofile(
                                    inout SDP_Message p_loc_SDP,
                                    in integer p_user,
                                    in integer p_user, // TODO To be removed
                                    in integer p_sdp_user
                                    ) runs on ImsComponent {
      
      select(p_user){
      select(p_sdp_user){
        case (c_userProfile_UE1atSUThome) { // variant c_userProfile_UE1atSUThome
          p_loc_SDP := valueof(
                               m_SDP_mediaList(
                                               {
                                                 { { c_audio, { 20000, omit}, "RTP/AVP", {"0"} }, omit, omit, omit, omit, omit },
                                                 { { c_video, { 20002, omit}, "RTP/AVP", {"31"} }, omit, omit, omit, omit, omit }
                                               },
                                               vc_userprofile
                                               )
                               );
          vc_sdp_local.origin.user_name := PX_IMS_SUT_UE1_PUBLIC_USER;
          vc_sdp_local.origin.session_id := "2890844526";
          vc_sdp_local.origin.session_version := "2890842807";
          vc_sdp_local.origin.addr := "atlanta.example.com";
          vc_sdp_local.session_name := "c_userProfile_UE1atSUThome";
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"0", {"PCMU", "8000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"31", {"H261", "90000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { sendrecv := { } } );
        } // c_userProfile_UE1atSUThome
        case (c_userProfile_Huawei) { //variant c_userProfile_Huawei
          p_loc_SDP := valueof(
                               m_SDP_mediaList(
                                               {
@@ -65,8 +84,7 @@ module AtsNg112_Steps {
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"97", {"telephone-event", "8000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { fmtp := { "97", { unstructured := "0-15" } } } );
          f_append_media_attribute(vc_sdp_local, { sendrecv := { } } );
        }
        
        } // c_userProfile_Huawei
      } // End of 'select' statement

      log("<<< f_init_sdp_userprofile: p_loc_SDP= ", p_loc_SDP);
+576 −33

File changed.

Preview size limit exceeded, changes collapsed.

+11 −0
Original line number Diff line number Diff line
@@ -65,12 +65,23 @@ module AtsNg112_TestControl {
      //execute(TC_PSAP_SIP_INVITE_BV_04(v_cSeq));
      if (PICS_S_SIP_UDP1 and PICS_E_SIP_URN3) {
        if (PICS_B_SDP_ULA1) { execute(TC_PSAP_SIP_INVITE_BV_01(v_cSeq)); }
        if (PICS_B_SDP_ALA1) { execute(TC_PSAP_SIP_INVITE_BV_02(v_cSeq)); }
      }
      if (PICS_S_SIP_TCP1 and PICS_E_SIP_URN3) {
        if (PICS_B_SDP_ULA1) { execute(TC_PSAP_SIP_INVITE_BV_03(v_cSeq)); }
      }
      if (PICS_S_SIP_TCP1 and PICS_E_SIP_URN1) {
        if (PICS_B_SDP_ULA1) { execute(TC_PSAP_SIP_INVITE_BV_04(v_cSeq)); }
        if (PICS_B_SDP_ULA1) { execute(TC_PSAP_SIP_INVITE_BV_06(v_cSeq)); }
      }
      if (PICS_S_SIP_UDP1 and PICS_E_SIP_BSC1) {
        if (PICS_B_SDP_ULA1) { execute(TC_PSAP_SIP_INVITE_BV_05(v_cSeq)); }
      }
      if (PICS_E_SIP_URN1) {
        execute(TC_PSAP_SIP_INVITE_BV_07(v_cSeq));
      }
      if (PICS_S_SIP_OPT1) {
        execute(TC_PSAP_SIP_INVITE_BV_08(v_cSeq));
      }
    }
  } // End of 'control' statement
+15 −0
Original line number Diff line number Diff line
@@ -168,12 +168,27 @@ module LibNg112_Pics {
   */
  modulepar boolean PICS_S_SIP_TCP1 := false;
  
  modulepar boolean PICS_E_SIP_BSC1 := true;
  
  modulepar boolean PICS_E_SIP_URN1 := true;
  
  modulepar boolean PICS_E_SIP_URN2 := true;
  
  modulepar boolean PICS_E_SIP_URN3 := true;
  
  /**
   * @desc Does IUT support A-Law?
   */
  modulepar boolean PICS_B_SDP_ALA1 := true;
  
  /**
   * @desc Does IUT support U-Law?
   */
  modulepar boolean PICS_B_SDP_ULA1 := true;
  
  /**
   * @desc Does IUT support SIP OPTION?
   */
  modulepar boolean PICS_S_SIP_OPT1 := true;
  
} // End of module LibNg112_Pics
Loading