Commit 04e9c4d2 authored by YannGarcia's avatar YannGarcia
Browse files

Update f_TC_ISC_SCCAS_MSC_REG_01 and f_TC_ISC_SCCAS_MSC_REG_02 functions

parent 1a8798f6
Loading
Loading
Loading
Loading
+112 −20
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ module AtsSccas_TCFunctions_TS124292 {
            f_init_userprofile(c_userProfile_UE1atSUThome);
            f_initSipUrl(c_serviceProfile_EMERGENCY);
            f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_PCSCF1);
            action("Please register UE")
            f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync

            // Registration
@@ -54,19 +55,30 @@ module AtsSccas_TCFunctions_TS124292 {
                                       valueof(m_SipUrl_currDomain(vc_userprofile)),
                                       PX_IMS_SUT_UE1_QOP,
                                       mw_msc_register(
                                                       -, -, -, -, 
                                                       mw_Authorization_digest(
                                                       -, 
                                                       mw_pChargingVector(-, *),  // TODO To be refined during validation - Clause 6.3.2 Initial registration Point 11
                                                       mw_pVisitedNetworkID(?), // TODO To be refined during validation - Clause 6.3.2 Initial registration Point 12
                                                       -, // See helper f_check_contact_msc
                                                       mw_Authorization_digest( // Clause 6.3.2 Initial registration Point 4
                                                                               mw_digestResponse(
                                                                                                 (
                                                                                                  {"username", {tokenOrHost := PX_IMS_SUT_UE1_PRIVAT_USERNAME}}, 
                                                                                                  c_Integrity_protected_yes, 
                                                                                                  c_Integrity_protected_ip_assoc_pending
                                                                                                  )
                                       ))));
                                                                                                  {"realm", {tokenOrHost := PX_IMS_SUT_UE1_PUBLIC_USER}}, 
                                                                                                  {"integrity-protected", {tokenOrHost := "auth-done"}}, 
                                                                                                  {"nonce", {tokenOrHost := ""}}
                                                                                                  ))
                                                                               ),
                                                       m_expires(600000), // Clause 6.3.2 Initial registration Point 7
                                                       mw_supported_gruu, // Clause 6.3.2 Initial registration Point 8
                                                       mw_require_path, // Clause 6.3.2 Initial registration Point 9
                                                       mw_pAccessNetworkInfo // TODO To be refined during validation - Clause 6.3.2 Initial registration Point 13
                                       ));
            // Check vc_request.msgHeader.contact for 3GPP requirement
            f_check_contact_msc(vc_request.msgHeader.contact); // Clause 6.3.2 Initial registration Point 5
            f_check_via_msc(vc_request.msgHeader.via); // Clause 6.3.2 Initial registration Point 6
            f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync

            // Deregistration
            f_IMS_postamble_withDeRegistration(p_cSeq_s);
            f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync

        } // End of function f_TC_ISC_SCCAS_MSC_REG_01
@@ -77,26 +89,45 @@ module AtsSccas_TCFunctions_TS124292 {
         */
        function f_TC_ISC_SCCAS_MSC_REG_02(in CSeq p_cSeq_s) runs on ImsComponent {
            // Local variables
            var template REGISTER_Request v_register;
            var CSeq v_cSeq_s;

            // Preambule
            v_register := valueof(
                                  m_REGISTER_Request_Base(
                                                          vc_requestUri,
                                                          vc_callId, 
                                                          p_cSeq_s, 
                                                          vc_from, vc_to, vc_via_REG, 
                                                          vc_contact,
                                                          vc_authorization
                                  ));
            f_init_userprofile(c_userProfile_UE1atSUThome);
            f_initSipUrl(c_serviceProfile_EMERGENCY);
            f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_PCSCF1);
            action("Please register UE")
            f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync

            // Registration

            f_awaitingRegistration_IMS(
                                       v_cSeq_s, 
                                       valueof(m_SipUrl_currDomain(vc_userprofile)),
                                       PX_IMS_SUT_UE1_QOP,
                                       mw_msc_register(
                                                       -, 
                                                       mw_pChargingVector(-, *),  // TODO To be refined during validation - Clause 6.3.2 Initial registration Point 11
                                                       mw_pVisitedNetworkID(?), // TODO To be refined during validation - Clause 6.3.2 Initial registration Point 12
                                                       -, // See helper f_check_contact_msc
                                                       mw_Authorization_digest( // Clause 6.3.2 Initial registration Point 4
                                                                               mw_digestResponse(
                                                                                                 (
                                                                                                  {"username", {tokenOrHost := PX_IMS_SUT_UE1_PRIVAT_USERNAME}}, 
                                                                                                  {"realm", {tokenOrHost := PX_IMS_SUT_UE1_PUBLIC_USER}}, 
                                                                                                  {"integrity-protected", {tokenOrHost := "auth-done"}}, 
                                                                                                  {"nonce", {tokenOrHost := ""}}
                                                                                                  ))
                                                                               ),
                                                       m_expires(600000), // Clause 6.3.2 Initial registration Point 7
                                                       mw_supported_gruu, // Clause 6.3.2 Initial registration Point 8
                                                       mw_require_path, // Clause 6.3.2 Initial registration Point 9
                                                       mw_pAccessNetworkInfo // TODO To be refined during validation - Clause 6.3.2 Initial registration Point 13
                                       ));
            // Check vc_request.msgHeader.contact for 3GPP requirement
            f_check_contact_msc(vc_request.msgHeader.contact); // Clause 6.3.2 Initial registration Point 5
            f_check_via_msc(vc_request.msgHeader.via); // Clause 6.3.2 Initial registration Point 6
            f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); // sync

            // Deregistration
            
            f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync

        } // End of function f_TC_ISC_SCCAS_MSC_REG_02
@@ -286,6 +317,67 @@ module AtsSccas_TCFunctions_TS124292 {

        } // End of function f_TC_ISC_SCCAS_MSC_CALL_ORG_02
        
    } // End of call_origination
    } // End of group call_origination

    group helpers {

        // Check vc_request.msgHeader.contact for 3GPP requirement
        function f_check_contact_msc(in Contact p_contact) runs on ImsComponent {

            if (ispresent(p_contact.contactBody.wildcard) == false) {
                log("f_check_contact_msc: FAIL: Invalid contact content")
                f_setVerdict(e_error);
                return;
            }

            // Looking for g.3gpp.icsi-ref
            var template charstring m_found_pattern := pattern "*g.3gpp.icsi-ref*";
            if (regexp(p_contact.contactBody.wildcard, m_found_pattern, 0) == "") {
                log("f_check_contact_msc: FAIL: g.3gpp.icsi-ref is not present")
                f_setVerdict(e_error); // g.3gpp.icsi-ref is not present
                return;
            }

            // Looking for g.3gpp.icsi-ref media
            m_found_pattern := pattern "*g.3gpp.icsi-ref media*";
            if (regexp(p_contact.contactBody.wildcard, m_found_pattern, 0) == "") {
                log("f_check_contact_msc: FAIL: g.3gpp.icsi-ref media is not present")
                f_setVerdict(e_error); // g.3gpp.icsi-ref media is not present
                return;
            }

            // not containing "reg-id"
            m_found_pattern := pattern "*reg-id*";
            if (regexp(p_contact.contactBody.wildcard, m_found_pattern, 0) != "") {
                log("f_check_contact_msc: FAIL: reg-id should not be present")
                f_setVerdict(e_error); // reg-id should not be present
                return;
            }

            // Checking succeed, keep current status
        } // End of f_check_contact_msc

        // Check vc_request.msgHeader.via for IP address or FQDN of the MSC Server
        function f_check_via_msc(in Via p_via) runs on ImsComponent {

            for (var integer i := 0; i < lengthof(p_via.viaBody); i := i + 1) {
                // TODO: check
                /*record ViaBody {
                        SentProtocol sentProtocol,
                        HostPort sentBy,
                        SemicolonParam_List viaParams optional
                    }
                    record SentProtocol {
                    charstring protocolName,
                    charstring protocolVersion,
                    charstring transport
                }
*/
            } // End of 'for' statement

            // Checking succeed, keep current status
        } // End of function f_check_via_msc

    } // End of group helpers
    
} // End of module AtsSccas_TCFunctions_TS124292
 No newline at end of file
+21 −3
Original line number Diff line number Diff line
@@ -37,16 +37,34 @@ module AtsSccas_Templates
                        contactBody := p_contact_body
                    } // End of template mw_sccas_contact

                    template(value) Supported mw_supported_gruu 
                    modifies m_supported := {
                        optionsTags := {"gruu"}
                    } // End of template mw_supported_gruu

                    template (present) PAccessNetworkInfo mw_pAccessNetworkInfo := { // TODO To be refined
                        fieldName := P_ACCESS_NETWORK_INFO_E,
                        accessType := ?,
                        genericParams := ?
                    } // End of template mw_pAccessNetworkInfo

                    template (present) REGISTER_Request mw_msc_register(
                                                                        template (present) Path p_Path := ?,
                                                                        template (present) PChargingVector p_pChargingVector := ?,
                                                                        template (present) PVisitedNetworkID p_pVisitedNetworkID := ?,
                                                                        template (present) LibSip_SIPTypesAndValues.Contact p_contact := mw_sccas_contact,
                                                                        template (present) Authorization p_authorization := mw_Authorization_digest
                                                                        template (present) Authorization p_authorization := mw_Authorization_digest,
                                                                        template (present) Expires p_expires := ?,
                                                                        template (present) Supported p_supported := ?,
                                                                        template (present) Require p_require := ?,
                                                                        template (present) PAccessNetworkInfo p_pPAccessNetworkInfo := ?
                                                                        ) modifies mw_REGISTER_Request_IMS := {
                        msgHeader := {
                            contact            := p_contact,
                            authorization := p_authorization
                            authorization      := p_authorization,
                            expires            := p_expires,
                            supported          := p_supported,
                            pAccessNetworkInfo := p_pPAccessNetworkInfo
                        }
                    } // End of template mw_msc_register
                }