Commit c90b262d authored by Yann Garcia's avatar Yann Garcia
Browse files

Add SIP MIME support

parent ced76caf
Loading
Loading
Loading
Loading
+77 −0
Original line number Diff line number Diff line
module AtsNg112_Steps {
  
  // LibSip
  import from LibSip_SIPTypesAndValues all;
  import from LibSip_SDPTypes all;
  import from LibSip_Steps all;
  import from LibSip_Templates all;
  import from LibSip_Interface all;
  
  // LibIms
  import from LibIms_SIPTypesAndValues all;
  import from LibIms_Steps all;
  import from LibIms_Templates all;
  import from LibIms_Interface all;
  
  // LibNg112
  import from LibNg112_TypesAndValues all;
  import from LibNg112_Steps all;
  import from LibNg112_Pixits all;
  
  group Constants {
    
    group SdpUserProfileConstants {
      
      const integer c_userProfile_Huawei := 1;
      
    } // End of group SdpUserProfileConstants
    
    
  } // End of group Constants
  
  group globalSteps {
    
    /*
     * 
     * @desc sets user parameters with PIXIT values
     * @param p_user identifies the selected user configuration and location
     * @verdict 
     */
    function f_init_sdp_userprofile(
                                    inout SDP_Message p_loc_SDP,
                                    in integer p_user,
                                    in integer p_sdp_user
                                    ) runs on ImsComponent {
      
      select(p_user){
        case (c_userProfile_UE1atSUThome) { //variant c_userProfile_UE1atSUThome
          p_loc_SDP := valueof(
                               m_SDP_mediaList(
                                               {
                                                 { { c_audio, { 10500, omit}, "RTP/AVP", {"8", "0", "18", "4", "96", "97"} }, omit, omit, omit, omit, omit }
                                               },
                                               vc_userprofile
                                               )
                               );
          vc_sdp_local.origin.user_name := "FAST_V2R1";
          vc_sdp_local.origin.session_id := "2006";
          vc_sdp_local.origin.session_version := "2007";
          vc_sdp_local.origin.addr := "155.11.49.64";
          vc_sdp_local.session_name := "-";
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"0", {"PCMU", "8000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"18", {"G729", "8000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"4", {"G723", "8000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"96", {"AMR", "8000", omit} } } );
          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 := { } } );
        }
        
      } // End of 'select' statement

      log("<<< f_init_sdp_userprofile: p_loc_SDP= ", p_loc_SDP);
    } // End of function f_init_sdp_userprofile
    
  } // End of group globalSteps
  
} // End of module AtsNg112_Steps 
+113 −0
Original line number Diff line number Diff line
/**
 * @author STF 346, STF366, STF368, STF369, STF471
 * @version $Id$
 * @desc
 *     This module provides the XML type system for SIP tests. The types have been generated automatically, followed by manual modifications: - bitType substituted by OneBitType - twobitType substituted by TwoBitType - addition of pattern for: OneBitType, TwoBitType, ThreeBitType, FourBitType, FourBitType, SixBitType - application of enumerated for: State_type, Endpoint_status_type, Joining_type, Disconnection_type, Media_status_type, Originating_identity_presentation_restriction, Terminating_identity_presentation_restriction - addition of length value: NetworkIdentityType, SixteenbitType - addition of value restriction: CugIndexType - substitution of "content" by "choice": Call_type, Mcid - additional type renaming (upper first letter): AbsService, Anonymous, Busy, Communication_diverted,
 *     Conference_description_type, Conference_info, Conference_media_type, Conference_medium_type, Conference_state_type, Conference_type, Cug, CugRequestType, Empty_element_type, Endpoint_type, Execution_type, Host_type, Keywords_type, Media, Media_type, No_answer, Not_reachable, Not_registered, Originating_identity_presentation, Presence_status, Presence_status_activity_type, RequestType, ResponseType, Roaming, Rule_deactivated, Sidebars_by_val_type, Simservs, SimservType, Terminating_identity_presentation, Uri_type, Uris_type, User_roles_type, User_languages_type, User_type, Users_type - new group CDIV added by STF369 - new group ACR_CD added by STF38 - new types RegInfo and Pidf_Lo added by STF160. 
 *     This module is part of LibSipV3.
 */
module LibSip_XMLTypes {
    import from http_www_w3_org_XML_1998_namespace language "XSD" all
    with {
        extension "File:../xsd/xml.xsd";
    }

    import from urn_ietf_params_xml_ns_common_policy language "XSD" all
    with {
        extension "File:../xsd/common-policy.xsd";
    }

    import from urn_ietf_params_xml_ns_resource_lists language "XSD" all
    with {
        extension "File:../xsd/ResourceList.xsd";
    }

    import from http_uri_etsi_org_ngn_params_xml_simservs_xcap language "XSD" all
    with {
        extension "File:../xsd/SupplementaryServices.xsd";
    }

    import from http_uri_etsi_org_ngn_params_xml_simservs_mcid language "XSD" all
    with {
        extension "File:../xsd/MCID.xsd";
    }

    import from NoTargetNamespace language "XSD" all
    with {
        extension "File:../xsd/Ims3gpp.xsd";
    }

    import from urn_3gpp_ns_cw_1_0 language "XSD" all
    with {
        extension "File:../xsd/cw.xsd";
    }

    import from urn_ietf_params_xml_ns_conference_info language "XSD" all
    with {
        extension "File:../xsd/CONF.xsd";
    }

    import from http_uri_etsi_org_ngn_params_xml_simservs_pstn language "XSD" all
    with {
        extension "File:../xsd/PSTN.xsd";
    }

    import from http_uri_etsi_org_ngn_params_xml_comm_div_info language "XSD" all
    with {
        extension "File:../xsd/CDIVN.xsd";
    }

    import from urn_oma_xml_xdm_common_policy language "XSD" all
    with {
        extension "File:../xsd/xdm_commonPolicy-v1_0.xsd";
    }
    // RFC 3680 Registration Info
    import from urn_ietf_params_xml_ns_reginfo language "XSD" all
    with {
        extension "File:../xsd/regInfo.xsd";
    }
    // RFC 3863 Presence Information Data Format
    import from urn_ietf_params_xml_ns_pidf language "XSD" all
    with {
        extension "File:../xsd/pidf.xsd";
    }
    // RFC 4119 Presence Information Data Format, Location Object extension
    import from urn_ietf_params_xml_ns_pidf_geopriv10_basicPolicy language "XSD" all
    with {
        extension "File:../xsd/geopriv10basic.xsd";
    }

    // RFC 4119 Presence Information Data Format, Location Object extension
    import from urn_ietf_params_xml_ns_pidf_geopriv10 language "XSD" all
    with {
        extension "File:../xsd/pidf_lo.xsd";
    }

    group XmlTypes {
        type union XmlBody {
            Mcid mcid,
            // if there is XML Mcid
            Comm_div_info_type cdivn,
            // if there is XML cdivn
            Simservs simservs,
            // if there is XML simservs (Oip/r, Tip/r, Call Diversion, ICB, OCB ...)
            Conference_type conference,
            // if there is XML conf
            Ims_cw cw,
            // if there is XML cw (defined in X_3gpp_ns_cw_1_0.ttcn3view)
            Cug cug,
            // if there is XML cug (defined in org_etsi_uri__ngn_params_xml_simservs_xcap.ttcn3view)
            TIMS3GPP ims3gpp,
            // if there is XML IMS 3GPP
            PSTN_transit pstnTransit,
            // if there is XML PSTN_transit
            Resource_lists resourceLists,
            // if there is XML Resource List data
            Reginfo regInfo,
            // if it is a NG 112 event
              Presence presence, // if it is a Presence Information Data Format Location Object
            // if it is a registration event
            Geopriv geopriv // if it is a Presence Information Data Format Location Object
        }
    }
}