AtsImsIot_Emergency.ttcn 226 KB
Newer Older
                        f_PO_user_home_deregistration(v_psap);
                        f_cf_user_down ( v_psap );
                        f_cf_user_down ( v_ueA );
                        f_cf_VxLteMonitor_Down();
                        f_cf_adapter_down ( );
                    }else{
                        //log...
                        setverdict (inconc,"At least one required monitor interface SHALL be selected! Check PIXITs")
                    }
                    f_cf_adapter_down ( );
                } // End of TC TD_VoLTE_ECO_INT_REL_02_01
                group f_TD_VoLTE_ECO_INT_REL_02_01 {
                    function f_mtc_check_precond_TD_VoLTE_ECO_INT_REL_02_01() runs on ImsTestCoordinator {
                        log("If the test case fails, please check the preconditions");
                        // TODO Add real code to check pre-conditions
                     } // End of function f_mtc_check_precond_TD_VoLTE_ECO_INT_REL_02_01
                } // End of group f_TD_VoLTE_ECO_INT_REL_02_01

               /**
                 * @desc    To perform originating PSAP session release and the tear down of related dedicated bearers.
                 * @see ETSI TS 103 795-2 Clause 5.3.3.2    PSAP Initiated Emergency Session Release
                 * @remark This is option2: PSAP is not in IMS A network
                 */
                testcase TD_VoLTE_ECO_INT_REL_02_02() runs on ImsTestCoordinator system IotSystemInterface {

                    var IotEquipmentUser v_ueA  := f_cf_create_IotEquipmentUser ( c_userUE_A_emergency );
                    var IotEquipmentUser v_psap := f_cf_create_IotEquipmentUser ( c_psap );
                    var ImsUserInfo v_userInfoA := f_getImUser ( PX_EUT_A_EMERGENCY );
                    var ImsUserInfo v_infoPsap  := f_getImUser ( PX_PSAP );

                    f_setVxLteMonIterfacesAvailability();
                    //Check required monitor interfaces due to TD
                    if (f_checkVxLteRequiredMonitorInterface({PX_SIP_GMA_INTERFACENAME,
                                                              PX_DIAMETER_GX_INTERFACENAME,
                                                              PX_DIAMETER_RX_INTERFACENAME,
                                                              PX_SIP_MW_PE_INTERFACENAME,
Yann Garcia's avatar
Yann Garcia committed
                                                              PX_SIP_MW_EB_INTERFACENAME, // E-CSCF -> IBCF
                                                              PX_SIP_IC_INTERFACENAME // IBCF -> IMS
                                                              }))
                    {
                        var SipMessage v_sip;
                        // map/connect component ports
                        f_cf_adapter_up ( );
                        f_cf_user_up ( v_ueA );
                        f_cf_user_up ( v_psap );
                        f_cf_VxLteMonitor_Up();
                        f_mtc_userRegistration(v_ueA, v_userInfoA);
Yann Garcia's avatar
Yann Garcia committed
                        if (PX_PSAP_REGISTERED) {
                            f_mtc_userRegistration(v_psap, v_infoPsap);
                        } else {
                            // TODO Check OPTIONS from PSAP to E-CSCF
                        }
                        f_mtc_check_precond_TD_VoLTE_ECO_INT_REL_02_02();
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_userInitiateCall (v_ueA, v_infoPsap); // Event 1
                        f_mtc_check_TP_IC_IBCF_BYE_01(vc_vxlte_monitor_components.ic); // Event 3
                        f_mtc_check_TP_MM_ECSCF_ECO_BYE_01(vc_vxlte_monitor_components.mwEB, -, v_sip); // Event 4

                        f_mtc_check_TP_MW_PCSCF_ECO_BYE_02(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 7
                        f_mtc_check_TP_GM_PCSCF_ECO_BYE_02(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 8

                        //Rx/Gx exchange after BYE was received at P-CSCF
                        f_mtc_check_TP_RX_PCSCF_STR_01(vc_vxlte_monitor_components.rx); // Event 9
                        f_mtc_check_TP_GX_PCRF_RAR_02(vc_vxlte_monitor_components.gx, true); // Event 10
                        f_mtc_check_TP_GX_PGW_RAA_03(vc_vxlte_monitor_components.gx); // Event 1
                        f_mtc_check_TP_RX_PCRF_STA_01(vc_vxlte_monitor_components.rx); // Event 12                       

                        f_mtc_check_TP_GM_PCSCF_ECO_200OK_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 13
                        f_mtc_check_TP_MW_PCSCF_ECO_200OK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 14

                        f_mtc_check_TP_MM_ECSCF_ECO_200OK_01(vc_vxlte_monitor_components.mwEB, -, v_sip); // Event 16
                        f_mtc_check_TP_IC_IBCF_2XXRESP_01(vc_vxlte_monitor_components.ic); // Event 17
                        f_mtc_userCheckCallTerminated(v_ueA); // Event 21
                        f_mtc_userCheckCallCancelled(v_psap); // Event 20
                        // Postamble
                        f_PO_user_home_deregistration(v_ueA);
                        f_PO_user_home_deregistration(v_psap);
                        f_cf_user_down ( v_psap );
                        f_cf_user_down ( v_ueA );
                        f_cf_VxLteMonitor_Down();
                        f_cf_adapter_down ( );
                    }else{
                        //log...
                        setverdict (inconc,"At least one required monitor interface SHALL be selected! Check PIXITs")
                    }
                    f_cf_adapter_down ( );
                } // End of TC TD_VoLTE_ECO_INT_REL_02_02
                group f_TD_VoLTE_ECO_INT_REL_02_02 {
                    function f_mtc_check_precond_TD_VoLTE_ECO_INT_REL_02_02() runs on ImsTestCoordinator {
                        log("If the test case fails, please check the preconditions");
                        // TODO Add real code to check pre-conditions
                     } // End of function f_mtc_check_precond_TD_VoLTE_ECO_INT_REL_02_02
                } // End of group f_TD_VoLTE_ECO_INT_REL_02_02

               /**
                 * @desc    To perform originating PSAP session release and the tear down of related dedicated bearers.
                 *          On call release initiated bye PSAP, the P-CSCF A should trigger the removal of all relevant previously created bearers
                 * @see ETSI TS 103 795-2 Clause 5.3.3.2    PSAP Initiated Emergency Session Release
                 * @remark This is option2: PSAP is in the same network
                 */
                testcase TD_VoLTE_ECO_INT_REL_02_03() runs on ImsTestCoordinator system IotSystemInterface {

                    var IotEquipmentUser v_ueA  := f_cf_create_IotEquipmentUser ( c_userUE_A_emergency );
                    var IotEquipmentUser v_psap := f_cf_create_IotEquipmentUser ( c_psap );
                    var ImsUserInfo v_userInfoA := f_getImUser ( PX_EUT_A_EMERGENCY );
                    var ImsUserInfo v_infoPsap  := f_getImUser ( PX_PSAP );

                    f_setVxLteMonIterfacesAvailability();
                    //Check required monitor interfaces due to TD
                    if (f_checkVxLteRequiredMonitorInterface({PX_SIP_GMA_INTERFACENAME,
                                                              PX_DIAMETER_GX_INTERFACENAME,
                                                              PX_DIAMETER_RX_INTERFACENAME,
                                                              PX_SIP_MW_PE_INTERFACENAME,
Yann Garcia's avatar
Yann Garcia committed
                                                              PX_SIP_MW_EB_INTERFACENAME // E-CSCF -> BGCF
                        // map/connect component ports
                        f_cf_adapter_up ( );
                        f_cf_user_up ( v_ueA );
                        f_cf_user_up ( v_psap );
                        f_cf_VxLteMonitor_Up();
                        f_mtc_userRegistration(v_ueA, v_userInfoA);
Yann Garcia's avatar
Yann Garcia committed
                        if (PX_PSAP_REGISTERED) {
                            f_mtc_userRegistration(v_psap, v_infoPsap);
                        } else {
                            // TODO Check OPTIONS from PSAP to E-CSCF
                        }
                        f_mtc_check_precond_TD_VoLTE_ECO_INT_REL_02_03();
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_userInitiateCall (v_ueA, v_infoPsap); // Event 1
                        f_mtc_check_TP_IC_IBCF_BYE_01(vc_vxlte_monitor_components.ic); // Event 4
                        f_mtc_check_TP_MX_ECSCF_ECO_BYE_01(vc_vxlte_monitor_components.mwEB, -, v_sip); // Event 5

                        f_mtc_check_TP_MW_PCSCF_ECO_BYE_02(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 7
                        f_mtc_check_TP_GM_PCSCF_ECO_BYE_02(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 8

                        //Rx/Gx exchange after BYE was received at P-CSCF
                        f_mtc_check_TP_RX_PCSCF_STR_01(vc_vxlte_monitor_components.rx); // Event 9
                        f_mtc_check_TP_GX_PCRF_RAR_02(vc_vxlte_monitor_components.gx, true); // Event 10
                        f_mtc_check_TP_GX_PGW_RAA_03(vc_vxlte_monitor_components.gx); // Event 1
                        f_mtc_check_TP_RX_PCRF_STA_01(vc_vxlte_monitor_components.rx); // Event 12                       

                        f_mtc_check_TP_GM_PCSCF_ECO_200OK_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 13
                        f_mtc_check_TP_MW_PCSCF_ECO_200OK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 14

                        f_mtc_check_TP_MW_PCSCF_ECO_200OK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 18
                        f_mtc_check_TP_IC_IBCF_2XXRESP_01(vc_vxlte_monitor_components.ic); // Event 19
                        f_mtc_userCheckCallTerminated(v_ueA); // Event 21
                        f_mtc_userCheckCallCancelled(v_psap); // Event 20
                        // Postamble
                        f_PO_user_home_deregistration(v_ueA);
                        f_PO_user_home_deregistration(v_psap);
                        f_cf_user_down ( v_psap );
                        f_cf_user_down ( v_ueA );
                        f_cf_VxLteMonitor_Down();
                        f_cf_adapter_down ( );
                    }else{
                        //log...
                        setverdict (inconc,"At least one required monitor interface SHALL be selected! Check PIXITs")
                    }
                    f_cf_adapter_down ( );
                } // End of TC TD_VoLTE_ECO_INT_REL_02_03
                group f_TD_VoLTE_ECO_INT_REL_02_03 {
                    function f_mtc_check_precond_TD_VoLTE_ECO_INT_REL_02_03() runs on ImsTestCoordinator {
                        log("If the test case fails, please check the preconditions");
                        // TODO Add real code to check pre-conditions
                     } // End of function f_mtc_check_precond_TD_VoLTE_ECO_INT_REL_02_03
                } // End of group f_TD_VoLTE_ECO_INT_REL_02_03

            } // End of group EmergencySessionRelease

            group EmergencySessionAbortOrReject {

                /**
                 * @desc    To perform SIP session abort (originating side) and the related interactions with PCRF A and EPC A.
                 * @see ETSI TS 103 795-2 Clause 5.3.4.1    Emergency Session Abort 
                 * @remark This is option 1: PSAP is in IMS A network
                testcase TD_VoLTE_EMC_INT_ABT_01_01() runs on ImsTestCoordinator system IotSystemInterface {

                    var IotEquipmentUser v_ueA  := f_cf_create_IotEquipmentUser ( c_userUE_A_emergency );
                    var IotEquipmentUser v_psap := f_cf_create_IotEquipmentUser ( c_psap );
                    var ImsUserInfo v_userInfoA := f_getImUser ( PX_EUT_A_EMERGENCY );
                    var ImsUserInfo v_infoPsap  := f_getImUser ( PX_PSAP );

                    f_setVxLteMonIterfacesAvailability();
                    //Check required monitor interfaces due to TD
                    if (f_checkVxLteRequiredMonitorInterface({PX_SIP_GMA_INTERFACENAME,
                                                              PX_DIAMETER_GX_INTERFACENAME,
                                                              PX_DIAMETER_RX_INTERFACENAME,
                                                              PX_SIP_MW_PE_INTERFACENAME,
Yann Garcia's avatar
Yann Garcia committed
                                                              PX_SIP_MW_EB_INTERFACENAME, // E-CSCF -> IBCF
                                                              PX_SIP_MM_B_PSAP_INTERFACENAME // E-CSCCF -> PSAP
                        // map/connect component ports
                        f_cf_adapter_up ( );
                        f_cf_user_up ( v_ueA );
                        f_cf_user_up ( v_psap );
                        f_cf_VxLteMonitor_Up();
                        f_mtc_userRegistration(v_ueA, v_userInfoA);
Yann Garcia's avatar
Yann Garcia committed
                        if (PX_PSAP_REGISTERED) {
                            f_mtc_userRegistration(v_psap, v_infoPsap);
                        } else {
                            // TODO Check OPTIONS from PSAP to E-CSCF
                        }
                        f_mtc_check_precond_TD_VoLTE_EMC_INT_ABT_01_01();
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_userInitiateCall (v_ueA, v_infoPsap); // Event 1
                        // Test body
                        //f_mtc_userInitiateCall (v_ueA, v_userTelInfoB);

                        f_mtc_check_TP_GM_PCSCF_EMC_CANCEL_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 1

                        //Rx/Gx exchange after CANCEL was received at P-CSCF
                        f_mtc_check_TP_RX_PCSCF_STR_01(vc_vxlte_monitor_components.rx); // (STR – Event 2
                        f_mtc_check_TP_GX_PCRF_RAR_02(vc_vxlte_monitor_components.gx, true); // (RAR – Event 3)
                        f_mtc_check_TP_GX_PGW_RAA_03(vc_vxlte_monitor_components.gx); // (RAA – Event 4)
                        f_mtc_check_TP_RX_PCRF_STA_01(vc_vxlte_monitor_components.rx); // (STA – Event 5)                        

                        f_mtc_check_TP_MW_PCSCF_EMC_CANCEL_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 6
                        f_mtc_check_TP_MM_ECSCF_EMC_CANCEL_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 7

                        f_mtc_check_TP_MW_PCSCF_ECO_200OK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 17
                        f_mtc_check_TP_GM_PCSCF_200OK_02(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 18

                        f_mtc_check_TP_MW_PCSCF_EMC_487INVITE_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 24
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_check_TP_GM_PCSCF_487INVITE_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 25

                        f_mtc_check_TP_GM_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 26
                        f_mtc_check_TP_MW_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 27
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_check_TP_MM_ECSCF_ECO_ACK_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 28
                        f_mtc_userCheckCallTerminated(v_ueA); // Event 33
                        f_mtc_userCheckCallCancelled(v_psap); // Event 34
                        // Postamble
                        f_PO_user_home_deregistration(v_ueA);
                        f_PO_user_home_deregistration(v_psap);
                        f_cf_user_down ( v_psap );
                        f_cf_user_down ( v_ueA );
                        f_cf_VxLteMonitor_Down();
                        f_cf_adapter_down ( );
                    }else{
                        //log...
                        setverdict (inconc,"At least one required monitor interface SHALL be selected! Check PIXITs")
                    }
                    f_cf_adapter_down ( );
                } // End of TC TD_VoLTE_EMC_INT_ABT_01_01
                    function f_mtc_check_precond_TD_VoLTE_EMC_INT_ABT_01_01() runs on ImsTestCoordinator {
                        log("If the test case fails, please check the preconditions");
                        // TODO Add real code to check pre-conditions
                     } // End of function f_mtc_check_precond_TD_VoLTE_EMC_INT_ABT_01_01
                } // End of group f_TD_VoLTE_EMC_INT_ABT_01_01

                /**
                 * @desc    To perform SIP session abort (originating side) and the related interactions with PCRF A and EPC A.
                 * @see ETSI TS 103 795-2 Clause 5.3.4.1    Emergency Session Abort 
                 * @remark This is option 1: PSAP is not in IMS A network
                testcase TD_VoLTE_EMC_INT_ABT_01_02() runs on ImsTestCoordinator system IotSystemInterface {

                    var IotEquipmentUser v_ueA  := f_cf_create_IotEquipmentUser ( c_userUE_A_emergency );
                    var IotEquipmentUser v_psap := f_cf_create_IotEquipmentUser ( c_psap );
                    var ImsUserInfo v_userInfoA := f_getImUser ( PX_EUT_A_EMERGENCY );
                    var ImsUserInfo v_infoPsap  := f_getImUser ( PX_PSAP );

                    f_setVxLteMonIterfacesAvailability();
                    //Check required monitor interfaces due to TD
                    if (f_checkVxLteRequiredMonitorInterface({PX_SIP_GMA_INTERFACENAME,
                                                              PX_DIAMETER_GX_INTERFACENAME,
                                                              PX_DIAMETER_RX_INTERFACENAME,
                                                              PX_SIP_MW_PE_INTERFACENAME,
Yann Garcia's avatar
Yann Garcia committed
                                                              PX_SIP_MW_EB_INTERFACENAME, // E-CSCF -> IBCF
                                                              PX_SIP_IC_INTERFACENAME // IBCF -> IMS -> PSAP
                                                              }))
                    {
                        var SipMessage v_sip;
                        // map/connect component ports
                        f_cf_adapter_up ( );
                        f_cf_user_up ( v_ueA );
                        f_cf_user_up ( v_psap );
                        f_cf_VxLteMonitor_Up();
                        f_mtc_userRegistration(v_ueA, v_userInfoA);
Yann Garcia's avatar
Yann Garcia committed
                        if (PX_PSAP_REGISTERED) {
                            f_mtc_userRegistration(v_psap, v_infoPsap);
                        } else {
                            // TODO Check OPTIONS from PSAP to E-CSCF
                        }
                        f_mtc_check_precond_TD_VoLTE_EMC_INT_ABT_01_02();
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_userInitiateCall (v_ueA, v_infoPsap); // Event 1
                        // Test body
                        //f_mtc_userInitiateCall (v_ueA, v_userTelInfoB);

                        f_mtc_check_TP_GM_PCSCF_EMC_CANCEL_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 1
Yann Garcia's avatar
Yann Garcia committed

                        //Rx/Gx exchange after CANCEL was received at P-CSCF
                        f_mtc_check_TP_RX_PCSCF_STR_01(vc_vxlte_monitor_components.rx); // (STR – Event 2
                        f_mtc_check_TP_GX_PCRF_RAR_02(vc_vxlte_monitor_components.gx, true); // (RAR – Event 3)
                        f_mtc_check_TP_GX_PGW_RAA_03(vc_vxlte_monitor_components.gx); // (RAA – Event 4)
                        f_mtc_check_TP_RX_PCRF_STA_01(vc_vxlte_monitor_components.rx); // (STA – Event 5)                        

                        f_mtc_check_TP_MW_PCSCF_EMC_CANCEL_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 6
                        f_mtc_check_TP_MX_ECSCF_EMC_CANCEL_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 9
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_check_TP_IC_IBCF_CANCEL_01(vc_vxlte_monitor_components.ic, true); // CANCEL Event 10 (NOTE: comment out if ISC simulated by Ic)

                        f_mtc_check_TP_IC_IBCF_2XXRESP_01(vc_vxlte_monitor_components.ic); // 200 CANCEL – Event 11
                        f_mtc_check_TP_MX_ECSCF_ECO_200OK_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 12
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_check_TP_MW_PCSCF_ECO_200OK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 17
                        f_mtc_check_TP_GM_PCSCF_200OK_02(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 18

                        f_mtc_check_TP_IC_IBCF_487INVITE_01(vc_vxlte_monitor_components.ic); // Event 20
                        f_mtc_check_TP_MX_ECSCF_EMC_487INVITE_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 21
                        f_mtc_check_TP_MW_PCSCF_EMC_487INVITE_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 24
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_check_TP_GM_PCSCF_487INVITE_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 25

                        f_mtc_check_TP_GM_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 26
                        f_mtc_check_TP_MW_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 27
                        f_mtc_check_TP_MX_ECSCF_ECO_ACK_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 29
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_check_TP_IC_IBCF_ACK_01(vc_vxlte_monitor_components.ic, true); // Event 30
                        f_mtc_userCheckCallTerminated(v_ueA); // Event 33
                        f_mtc_userCheckCallCancelled(v_psap); // Event 34
                        // Postamble
                        f_PO_user_home_deregistration(v_ueA);
                        f_PO_user_home_deregistration(v_psap);
                        f_cf_user_down ( v_psap );
                        f_cf_user_down ( v_ueA );
                        f_cf_VxLteMonitor_Down();
                        f_cf_adapter_down ( );
                    }else{
                        //log...
                        setverdict (inconc,"At least one required monitor interface SHALL be selected! Check PIXITs")
                    }
                    f_cf_adapter_down ( );
                } // End of TC TD_VoLTE_EMC_INT_ABT_01_02
                    function f_mtc_check_precond_TD_VoLTE_EMC_INT_ABT_01_02() runs on ImsTestCoordinator {
                        log("If the test case fails, please check the preconditions");
                        // TODO Add real code to check pre-conditions
                     } // End of function f_mtc_check_precond_TD_VoLTE_EMC_INT_ABT_01_02
                } // End of group f_TD_VoLTE_EMC_INT_ABT_01_02

                /**
                 * @desc    To perform SIP session abort (originating side) and the related interactions with PCRF A and EPC A.
                 * @see ETSI TS 103 795-2 Clause 5.3.4.1    Emergency Session Abort 
                 * @remark This is option 1: PSAP is in PSTN network
                testcase TD_VoLTE_EMC_INT_ABT_01_03() runs on ImsTestCoordinator system IotSystemInterface {

                    var IotEquipmentUser v_ueA  := f_cf_create_IotEquipmentUser ( c_userUE_A_emergency );
                    var IotEquipmentUser v_psap := f_cf_create_IotEquipmentUser ( c_psap );
                    var ImsUserInfo v_userInfoA := f_getImUser ( PX_EUT_A_EMERGENCY );
                    var ImsUserInfo v_infoPsap  := f_getImUser ( PX_PSAP );

                    f_setVxLteMonIterfacesAvailability();
                    //Check required monitor interfaces due to TD
                    if (f_checkVxLteRequiredMonitorInterface({PX_SIP_GMA_INTERFACENAME,
                                                              PX_DIAMETER_GX_INTERFACENAME,
                                                              PX_DIAMETER_RX_INTERFACENAME,
                                                              PX_SIP_MW_PE_INTERFACENAME,
Yann Garcia's avatar
Yann Garcia committed
                                                              PX_SIP_MW_EB_INTERFACENAME, // E-CSCF -> IBCF
                                                              PX_SIP_IC_INTERFACENAME // IBCF -> IMS -> PSAP
                        f_cf_createVxLteMonitor();
                        // map/connect component ports
                        f_cf_adapter_up ( );
                        f_cf_user_up ( v_ueA );
                        f_cf_user_up ( v_psap );
                        f_cf_VxLteMonitor_Up();
                        f_mtc_userRegistration(v_ueA, v_userInfoA);
Yann Garcia's avatar
Yann Garcia committed
                        if (PX_PSAP_REGISTERED) {
                            f_mtc_userRegistration(v_psap, v_infoPsap);
                        } else {
                            // TODO Check OPTIONS from PSAP to E-CSCF
                        }
                        f_mtc_check_precond_TD_VoLTE_EMC_INT_ABT_01_03();
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_userInitiateCall (v_ueA, v_infoPsap); // Event 1
                        // Test body
                        //f_mtc_userInitiateCall (v_ueA, v_userTelInfoB);

                        f_mtc_check_TP_GM_PCSCF_EMC_CANCEL_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 1
Yann Garcia's avatar
Yann Garcia committed

                        //Rx/Gx exchange after CANCEL was received at P-CSCF
                        f_mtc_check_TP_RX_PCSCF_STR_01(vc_vxlte_monitor_components.rx); // (STR – Event 2
                        f_mtc_check_TP_GX_PCRF_RAR_02(vc_vxlte_monitor_components.gx, true); // (RAR – Event 3)
                        f_mtc_check_TP_GX_PGW_RAA_03(vc_vxlte_monitor_components.gx); // (RAA – Event 4)
                        f_mtc_check_TP_RX_PCRF_STA_01(vc_vxlte_monitor_components.rx); // (STA – Event 5)                        

                        f_mtc_check_TP_MW_PCSCF_EMC_CANCEL_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 6
                        f_mtc_check_TP_MI_ECSCF_EMC_CANCEL_01(vc_vxlte_monitor_components.mwEB, -, v_sip); // Event 13
                        f_mtc_check_TP_MM_ECSCF_EMC_CANCEL_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 14
Yann Garcia's avatar
Yann Garcia committed

                        f_mtc_check_TP_MI_ECSCF_ECO_200OK_01(vc_vxlte_monitor_components.mwEB, -, v_sip); // Event 16
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_check_TP_MW_PCSCF_ECO_200OK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 17
                        f_mtc_check_TP_GM_PCSCF_200OK_02(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 18

                        f_mtc_check_TP_MM_ECSCF_EMC_487INVITE_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 22
                        f_mtc_check_TP_MI_ECSCF_EMC_487INVITE_01(vc_vxlte_monitor_components.mwEB, -, v_sip); // Event 23
                        f_mtc_check_TP_MW_PCSCF_EMC_487INVITE_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 24
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_check_TP_GM_PCSCF_487INVITE_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 25

                        f_mtc_check_TP_GM_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 26
                        f_mtc_check_TP_MW_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 27
                        f_mtc_check_TP_MI_ECSCF_ECO_ACK_01(vc_vxlte_monitor_components.mwEB, -, v_sip); // Event 31
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_check_TP_MM_ECSCF_ECO_ACK_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 32
                        f_mtc_userCheckCallTerminated(v_ueA); // Event 33
                        f_mtc_userCheckCallCancelled(v_psap); // Event 34
                        // Postamble
                        f_PO_user_home_deregistration(v_ueA);
                        f_PO_user_home_deregistration(v_psap);
                        f_cf_user_down ( v_psap );
                        f_cf_user_down ( v_ueA );
                        f_cf_VxLteMonitor_Down();
                        f_cf_adapter_down ( );
                    }else{
                        //log...
                        setverdict (inconc,"At least one required monitor interface SHALL be selected! Check PIXITs")
                    }
                    f_cf_adapter_down ( );
                } // End of TC TD_VoLTE_EMC_INT_ABT_01_03
                    function f_mtc_check_precond_TD_VoLTE_EMC_INT_ABT_01_03() runs on ImsTestCoordinator {
                        log("If the test case fails, please check the preconditions");
                        // TODO Add real code to check pre-conditions
                     } // End of function f_mtc_check_precond_TD_VoLTE_EMC_INT_ABT_01_03
                } // End of group f_TD_VoLTE_EMC_INT_ABT_01_03
                /**
                 * @desc    To demonstrate interaction between UE A and PSAP when an emergency session is rejected.
                 * @see ETSI TS 103 795-2 5.3.4.3    Emergency Session Reject
                 * @remark This is option 1: PSAP is in IMS A network
                 */
                testcase TD_VoLTE_ECO_INT_REJ_01_01() runs on ImsTestCoordinator system IotSystemInterface {

                    var IotEquipmentUser v_ueA  := f_cf_create_IotEquipmentUser ( c_userUE_A_emergency );
                    var IotEquipmentUser v_psap := f_cf_create_IotEquipmentUser ( c_psap );
                    var ImsUserInfo v_userInfoA := f_getImUser ( PX_EUT_A_EMERGENCY );
                    var ImsUserInfo v_infoPsap  := f_getImUser ( PX_PSAP );

                    f_setVxLteMonIterfacesAvailability();
                    //Check required monitor interfaces due to TD
                    if (f_checkVxLteRequiredMonitorInterface({PX_SIP_GMA_INTERFACENAME,
                                                              PX_DIAMETER_GX_INTERFACENAME,
                                                              PX_DIAMETER_RX_INTERFACENAME,
                                                              PX_SIP_MW_PE_INTERFACENAME,
Yann Garcia's avatar
Yann Garcia committed
                                                              PX_SIP_MW_EB_INTERFACENAME, // E-CSCF -> IBCF
                                                              PX_SIP_MM_B_PSAP_INTERFACENAME // E-CSCCF -> PSAP
                        // map/connect component ports
                        f_cf_adapter_up ( );
                        f_cf_user_up ( v_ueA );
                        f_cf_user_up ( v_psap );
                        f_cf_VxLteMonitor_Up();
                        f_mtc_userRegistration(v_ueA, v_userInfoA);
Yann Garcia's avatar
Yann Garcia committed
                        if (PX_PSAP_REGISTERED) {
                            f_mtc_userRegistration(v_psap, v_infoPsap);
                        } else {
                            // TODO Check OPTIONS from PSAP to E-CSCF
                        }
                        f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_01_01();
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_userInitiateCall (v_ueA, v_infoPsap); // Event 3
                        // Test body
                        //f_mtc_userInitiateCall (v_ueA, v_userTelInfoB);

Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_check_TP_GM_PCSCF_ECO_INVITE_02(vc_vxlte_monitor_components.gmA, -, v_sip); // INVITE Event 3
                        f_mtc_check_TP_GM_PCSCF_ECO_100Trying_01(vc_vxlte_monitor_components.gmA, -, v_sip);

                        //Rx/Gx exchange after INVITE (SDP) was received at P-CSCF
                        f_mtc_check_TP_RX_PCSCF_AAR_03(vc_vxlte_monitor_components.rx);// Event 4
                        f_mtc_check_TP_GX_PCRF_RAR_01(vc_vxlte_monitor_components.gx, true); // Event 5
                        f_mtc_check_TP_GX_PGW_RAA_02(vc_vxlte_monitor_components.gx);  // Event 6
                        f_mtc_check_TP_RX_PCRF_AAA_02(vc_vxlte_monitor_components.rx); // Event 7
                        f_mtc_check_TP_RX_PCSCF_RAA_01(vc_vxlte_monitor_components.rx);// Events 8,9
                        f_mtc_check_TP_GX_PCRF_CCA_01(vc_vxlte_monitor_components.gx); // Events 10,11

                        f_mtc_check_TP_MW_PCSCF_ECO_INVITE_02(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 12
                        f_mtc_check_TP_MW_PCSCF_ECO_100Trying_01(vc_vxlte_monitor_components.mwPE, -, v_sip);

                        f_mtc_check_TP_MW_PCSCF_ECO_INVITE_03(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 13
                        f_mtc_check_TP_MW_PCSCF_ECO_100Trying_01(vc_vxlte_monitor_components.mwPE, -, v_sip);

                        f_mtc_check_TP_MM_ECSCF_ECO_INVITE_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 11

                        // 480 Temporary Unvailable
                        f_mtc_check_TP_MM_ECSCF_ECO_480INVITE_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // 480 Temporary Unavailables Event 14
                        f_mtc_check_TP_MW_PCSCF_ECO_480INVITE_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 23
Yann Garcia's avatar
Yann Garcia committed

                        f_mtc_check_TP_RX_PCSCF_STR_01(vc_vxlte_monitor_components.rx); // Event 24
                        f_mtc_check_TP_GX_PCRF_RAR_01(vc_vxlte_monitor_components.gx, true); // Event 25
                        f_mtc_check_TP_GX_PGW_RAA_02(vc_vxlte_monitor_components.gx);  // Event 26
                        f_mtc_check_TP_RX_PCRF_STA_01(vc_vxlte_monitor_components.rx); // Event 27                        

                        f_mtc_check_TP_GM_PCSCF_ECO_380ALTSRV_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 28
Yann Garcia's avatar
Yann Garcia committed

                        f_mtc_check_TP_GM_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 29
                        f_mtc_check_TP_MW_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 30
                        f_mtc_check_TP_MM_ECSCF_ECO_ACK_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 31
                        f_mtc_userCheckCallTerminated(v_ueA); // Event 36
                        f_mtc_userCheckCallCancelled(v_psap); // Event 37
                        // Postamble
                        f_PO_user_home_deregistration(v_ueA);
                        f_PO_user_home_deregistration(v_psap);
                        //unmap/disconnect component ports
                        f_cf_user_down ( v_psap );
                        f_cf_user_down ( v_ueA );
                        f_cf_VxLteMonitor_Down();
                        f_cf_adapter_down ( );
                    }else{
                        //log...
                        setverdict (inconc,"At least one required monitor interface SHALL be selected! Check PIXITs")
                    }
                    f_cf_adapter_down ( );
                } // End of TC TD_VoLTE_ECO_INT_REJ_01_01
                group f_TD_VoLTE_ECO_INT_REJ_01_01 {
                    function f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_01_01() runs on ImsTestCoordinator {
                        log("If the test case fails, please check the preconditions");
                        // TODO Add real code to check pre-conditions
                     } // End of function f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_01_01
                } // End of group f_TD_VoLTE_ECO_INT_REJ_01_01
                 * @desc    To demonstrate interaction between UE A and PSAP when an emergency session is rejected.
                 * @see ETSI TS 103 795-2 5.3.4.3    Emergency Session Reject
                 * @remark This is option 1: PSAP is not in IMS A network
                testcase TD_VoLTE_ECO_INT_REJ_01_02() runs on ImsTestCoordinator system IotSystemInterface {

                    var IotEquipmentUser v_ueA  := f_cf_create_IotEquipmentUser ( c_userUE_A_emergency );
                    var IotEquipmentUser v_psap := f_cf_create_IotEquipmentUser ( c_psap );
                    var ImsUserInfo v_userInfoA := f_getImUser ( PX_EUT_A_EMERGENCY );
                    var ImsUserInfo v_infoPsap  := f_getImUser ( PX_PSAP );

                    f_setVxLteMonIterfacesAvailability();
                    //Check required monitor interfaces due to TD
                    if (f_checkVxLteRequiredMonitorInterface({PX_SIP_GMA_INTERFACENAME,
                                                              PX_DIAMETER_GX_INTERFACENAME,
                                                              PX_DIAMETER_RX_INTERFACENAME,
                                                              PX_SIP_MW_PE_INTERFACENAME,
Yann Garcia's avatar
Yann Garcia committed
                                                              PX_SIP_MW_EB_INTERFACENAME, // E-CSCF -> IBCF
                                                              PX_SIP_IC_INTERFACENAME // IBCF -> IMS -> PSAP
                        // map/connect component ports
                        f_cf_adapter_up ( );
                        f_cf_user_up ( v_ueA );
                        f_cf_user_up ( v_psap );
                        f_cf_VxLteMonitor_Up();
                        f_mtc_userRegistration(v_ueA, v_userInfoA);
Yann Garcia's avatar
Yann Garcia committed
                        if (PX_PSAP_REGISTERED) {
                            f_mtc_userRegistration(v_psap, v_infoPsap);
                        } else {
                            // TODO Check OPTIONS from PSAP to E-CSCF
                        }
                        f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_01_02();
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_userInitiateCall (v_ueA, v_infoPsap); // Event 3
                        // Test body
                        //f_mtc_userInitiateCall (v_ueA, v_userTelInfoB);

Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_check_TP_GM_PCSCF_ECO_INVITE_02(vc_vxlte_monitor_components.gmA, -, v_sip); // INVITE Event 3
                        f_mtc_check_TP_GM_PCSCF_ECO_100Trying_01(vc_vxlte_monitor_components.gmA, -, v_sip);

                        //Rx/Gx exchange after INVITE (SDP) was received at P-CSCF
                        f_mtc_check_TP_RX_PCSCF_AAR_03(vc_vxlte_monitor_components.rx);// Event 4
                        f_mtc_check_TP_GX_PCRF_RAR_01(vc_vxlte_monitor_components.gx, true); // Event 5
                        f_mtc_check_TP_GX_PGW_RAA_02(vc_vxlte_monitor_components.gx);  // Event 6
                        f_mtc_check_TP_RX_PCRF_AAA_02(vc_vxlte_monitor_components.rx); // Event 7
                        f_mtc_check_TP_RX_PCSCF_RAA_01(vc_vxlte_monitor_components.rx);// Events 8,9
                        f_mtc_check_TP_GX_PCRF_CCA_01(vc_vxlte_monitor_components.gx); // Events 10,11

                        f_mtc_check_TP_MW_PCSCF_ECO_INVITE_02(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 12
                        f_mtc_check_TP_MW_PCSCF_ECO_100Trying_01(vc_vxlte_monitor_components.mwPE, -, v_sip);

                        f_mtc_check_TP_MX_ECSCF_ECO_INVITE_01(vc_vxlte_monitor_components.mwEB, -, v_sip); // Event 11
                        f_mtc_check_TP_MX_ECSCF_ECO_100Trying_01(vc_vxlte_monitor_components.mwEB, -, v_sip);
Yann Garcia's avatar
Yann Garcia committed

                        f_mtc_check_TP_IC_IBCF_INVITE_01(vc_vxlte_monitor_components.ic); // INVITE Event 12 (NOTE: comment out if ISC simulated by Ic)

                        // 480 Temporary Unavailable
                        f_mtc_check_TP_IC_IBCF_480TEMPAV_01(vc_vxlte_monitor_components.ic, -, v_sip); // INVITE Event 12 (NOTE: comment out if ISC simulated by Ic)
                        f_mtc_check_TP_MW_PCSCF_ECO_480INVITE_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 23
Yann Garcia's avatar
Yann Garcia committed

                        f_mtc_check_TP_RX_PCSCF_STR_01(vc_vxlte_monitor_components.rx); // Event 24
                        f_mtc_check_TP_GX_PCRF_RAR_01(vc_vxlte_monitor_components.gx, true); // Event 25
                        f_mtc_check_TP_GX_PGW_RAA_02(vc_vxlte_monitor_components.gx);  // Event 26
                        f_mtc_check_TP_RX_PCRF_STA_01(vc_vxlte_monitor_components.rx); // Event 27                        

                        f_mtc_check_TP_GM_PCSCF_ECO_380ALTSRV_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 28
Yann Garcia's avatar
Yann Garcia committed

                        f_mtc_check_TP_GM_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 29
                        f_mtc_check_TP_MW_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 30
                        f_mtc_check_TP_IC_IBCF_ACK_01(vc_vxlte_monitor_components.mmB_PSAP); // Event 31
Yann Garcia's avatar
Yann Garcia committed

                        f_mtc_userCheckCallTerminated(v_ueA); // Event 36
                        f_mtc_userCheckCallCancelled(v_psap); // Event 37
                        // Postamble
                        f_PO_user_home_deregistration(v_ueA);
                        f_PO_user_home_deregistration(v_psap);
                        f_cf_user_down ( v_psap );
                        f_cf_user_down ( v_ueA );
                        f_cf_VxLteMonitor_Down();
                        f_cf_adapter_down ( );
                    }else{
                        //log...
                        setverdict (inconc,"At least one required monitor interface SHALL be selected! Check PIXITs")
                    }
                    f_cf_adapter_down ( );
                } // End of TC TD_VoLTE_ECO_INT_REJ_01_02
                group f_TD_VoLTE_ECO_INT_REJ_01_02 {
                    function f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_01_02() runs on ImsTestCoordinator {
                        log("If the test case fails, please check the preconditions");
                        // TODO Add real code to check pre-conditions
                     } // End of function f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_01_02
                } // End of group f_TD_VoLTE_ECO_INT_REJ_01_02
                /**
                 * @desc    To demonstrate interaction between UE A and PSAP when an emergency session is rejected.
                 * @see ETSI TS 103 795-2 5.3.4.3    Emergency Session Reject
                 * @remark This is option 1: PSAP is in PSTN network
                 */
                testcase TD_VoLTE_ECO_INT_REJ_01_03() runs on ImsTestCoordinator system IotSystemInterface {

                    var IotEquipmentUser v_ueA  := f_cf_create_IotEquipmentUser ( c_userUE_A_emergency );
                    var IotEquipmentUser v_psap := f_cf_create_IotEquipmentUser ( c_psap );
                    var ImsUserInfo v_userInfoA := f_getImUser ( PX_EUT_A_EMERGENCY );
                    var ImsUserInfo v_infoPsap  := f_getImUser ( PX_PSAP );

                    f_setVxLteMonIterfacesAvailability();
                    //Check required monitor interfaces due to TD
                    if (f_checkVxLteRequiredMonitorInterface({PX_SIP_GMA_INTERFACENAME,
                                                              PX_DIAMETER_GX_INTERFACENAME,
                                                              PX_DIAMETER_RX_INTERFACENAME,
                                                              PX_SIP_MW_PE_INTERFACENAME,
Yann Garcia's avatar
Yann Garcia committed
                                                              PX_SIP_MW_EB_INTERFACENAME, // E-CSCF -> IBCF
                                                              PX_SIP_IC_INTERFACENAME // IBCF -> IMS -> PSAP
                                                              }))
                    {
                        var SipMessage v_sip;
                        // map/connect component ports
                        f_cf_adapter_up ( );
                        f_cf_user_up ( v_ueA );
                        f_cf_user_up ( v_psap );
                        f_cf_VxLteMonitor_Up();
                        f_mtc_userRegistration(v_ueA, v_userInfoA);
Yann Garcia's avatar
Yann Garcia committed
                        if (PX_PSAP_REGISTERED) {
                            f_mtc_userRegistration(v_psap, v_infoPsap);
                        } else {
                            // TODO Check OPTIONS from PSAP to E-CSCF
                        }
                        f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_01_03();
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_userInitiateCall (v_ueA, v_infoPsap); // Event 1
                        // Test body
                        //f_mtc_userInitiateCall (v_ueA, v_userTelInfoB);

                        f_mtc_check_TP_GM_PCSCF_ECO_INVITE_02(vc_vxlte_monitor_components.gmA, -, v_sip); // INVITE Event 3
                        f_mtc_check_TP_GM_PCSCF_ECO_100Trying_01(vc_vxlte_monitor_components.gmA, -, v_sip);

                        //Rx/Gx exchange after INVITE (SDP) was received at P-CSCF
                        f_mtc_check_TP_RX_PCSCF_AAR_03(vc_vxlte_monitor_components.rx);// Event 4
                        f_mtc_check_TP_GX_PCRF_RAR_01(vc_vxlte_monitor_components.gx, true); // Event 5
                        f_mtc_check_TP_GX_PGW_RAA_02(vc_vxlte_monitor_components.gx);  // Event 6
                        f_mtc_check_TP_RX_PCRF_AAA_02(vc_vxlte_monitor_components.rx); // Event 7
                        f_mtc_check_TP_RX_PCSCF_RAA_01(vc_vxlte_monitor_components.rx);// Events 8,9
                        f_mtc_check_TP_GX_PCRF_CCA_01(vc_vxlte_monitor_components.gx); // Events 10,11

                        f_mtc_check_TP_MW_PCSCF_ECO_INVITE_02(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 12
                        f_mtc_check_TP_MW_PCSCF_ECO_100Trying_01(vc_vxlte_monitor_components.mwPE, -, v_sip);

                        f_mtc_check_TP_MI_ECSCF_ECO_INVITE_01(vc_vxlte_monitor_components.mwEB, -, v_sip); // Event 19
                        f_mtc_check_TP_MI_ECSCF_ECO_100Trying_01(vc_vxlte_monitor_components.mwEB, -, v_sip);
                        f_mtc_check_TP_MM_ECSCF_ECO_INVITE_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 20

                        // 480 Temporary Unavailable
                        f_mtc_check_TP_MM_ECSCF_ECO_480INVITE_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // Event 21
                        f_mtc_check_TP_MI_ECSCF_ECO_480INVITE_01(vc_vxlte_monitor_components.mwEB, -, v_sip); // Event 22
                        f_mtc_check_TP_MW_PCSCF_ECO_480INVITE_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 23

                        f_mtc_check_TP_RX_PCSCF_STR_01(vc_vxlte_monitor_components.rx); // Event 24
                        f_mtc_check_TP_GX_PCRF_RAR_01(vc_vxlte_monitor_components.gx, true); // Event 25
                        f_mtc_check_TP_GX_PGW_RAA_02(vc_vxlte_monitor_components.gx);  // Event 26
                        f_mtc_check_TP_RX_PCRF_STA_01(vc_vxlte_monitor_components.rx); // Event 27                        

                        f_mtc_check_TP_GM_PCSCF_ECO_380ALTSRV_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 28

                        f_mtc_check_TP_GM_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 29
                        f_mtc_check_TP_MW_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 30
                        f_mtc_check_TP_MI_ECSCF_ECO_ACK_01(vc_vxlte_monitor_components.mwEB, -, v_sip); // Event 34                        
                        f_mtc_check_TP_MM_ECSCF_ECO_ACK_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // ACK – Event 35
                        f_mtc_userCheckCallTerminated(v_ueA); // Event 33
                        f_mtc_userCheckCallCancelled(v_psap); // Event 34
                        // Postamble
                        f_PO_user_home_deregistration(v_ueA);
                        f_PO_user_home_deregistration(v_psap);
                        //unmap/disconnect component ports
                        f_cf_user_down ( v_psap );
                        f_cf_user_down ( v_ueA );
                        f_cf_VxLteMonitor_Down();
                        f_cf_adapter_down ( );
                    }else{
                        //log...
                        setverdict (inconc,"At least one required monitor interface SHALL be selected! Check PIXITs")
                    }
                    f_cf_adapter_down ( );
                } // End of TC TD_VoLTE_ECO_INT_REJ_01_03
                group f_TD_VoLTE_ECO_INT_REJ_01_03 {
                    function f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_01_03() runs on ImsTestCoordinator {
                        log("If the test case fails, please check the preconditions");
                        // TODO Add real code to check pre-conditions
                     } // End of function f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_01_03
                } // End of group f_TD_VoLTE_ECO_INT_REJ_01_03
                /**
                 * @desc    To demonstrate interaction between UE A and P-CSCF when an emergency session is rejected.
                 * @see ETSI TS 103 795-2 Clause 5.3.3.3    Emergency Session Reject - IMS not able to handle emergency sessions
                testcase TD_VoLTE_ECO_INT_REJ_02() runs on ImsTestCoordinator system IotSystemInterface {

                    var IotEquipmentUser v_ueA  := f_cf_create_IotEquipmentUser ( c_userUE_A_emergency );
                    var IotEquipmentUser v_psap := f_cf_create_IotEquipmentUser ( c_psap );
                    var ImsUserInfo v_userInfoA := f_getImUser ( PX_EUT_A_EMERGENCY );
                    var ImsUserInfo v_infoPsap  := f_getImUser ( PX_PSAP );

                    f_setVxLteMonIterfacesAvailability();
                    //Check required monitor interfaces due to TD
                    if (f_checkVxLteRequiredMonitorInterface({PX_SIP_GMA_INTERFACENAME,
                                                              PX_DIAMETER_GX_INTERFACENAME
                        f_cf_createVxLteMonitor();
                        // map/connect component ports
                        f_cf_adapter_up ( );
                        f_cf_user_up ( v_ueA );
                        f_cf_user_up ( v_psap );
                        f_cf_VxLteMonitor_Up();
                        f_mtc_userRegistration(v_ueA, v_userInfoA);
Yann Garcia's avatar
Yann Garcia committed
                        if (PX_PSAP_REGISTERED) {
                            f_mtc_userRegistration(v_psap, v_infoPsap);
                        } else {
                            // TODO Check OPTIONS from PSAP to E-CSCF
                        }
                        f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_02();
Yann Garcia's avatar
Yann Garcia committed
                        f_mtc_userInitiateCall (v_ueA, v_infoPsap); // Event 1
                        f_mtc_check_TP_GM_PCSCF_ECO_INVITE_01(vc_vxlte_monitor_components.gmA, -, v_sip); // INVITE Event 1
                        f_mtc_check_TP_GM_PCSCF_ECO_380ALTSRV_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 2
                        f_mtc_check_TP_GM_PCSCF_ACK_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 3 
                        // Postamble
                        f_PO_user_home_deregistration(v_ueA);
                        f_PO_user_home_deregistration(v_psap);
                        //unmap/disconnect component ports
                        f_cf_user_down ( v_psap );
                        f_cf_user_down ( v_ueA );
                        f_cf_VxLteMonitor_Down();
                        f_cf_adapter_down ( );
                    }else{
                        //log...
                        setverdict (inconc,"At least one required monitor interface SHALL be selected! Check PIXITs")
                    }
                    f_cf_adapter_down ( );
                } // End of TC TD_VoLTE_ECO_INT_REJ_02
                    function f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_02() runs on ImsTestCoordinator {
                        log("If the test case fails, please check the preconditions");
                        // TODO Add real code to check pre-conditions
                     } // End of function f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_02
                } // End of group f_TD_VoLTE_ECO_INT_REJ_02
                /**
                 * @desc To demonstrate interaction between UE A and P-CSCF when an emergency session is rejected due to wrong urn
                 * @see ETSI TS 103 795-2 Clause 5.3.3.4    Emergency Session Reject – due to wrong urn
                 */
                testcase TD_VoLTE_ECO_INT_REJ_03() runs on ImsTestCoordinator system IotSystemInterface {

                    var IotEquipmentUser v_ueA  := f_cf_create_IotEquipmentUser ( c_userUE_A_emergency );
                    var IotEquipmentUser v_psap := f_cf_create_IotEquipmentUser ( c_psap );
                    var ImsUserInfo v_userInfoA := f_getImUser ( PX_EUT_A_EMERGENCY );
                    var ImsUserInfo v_infoPsap  := f_getImUser ( PX_PSAP );

                    f_setVxLteMonIterfacesAvailability();
                    //Check required monitor interfaces due to TD
                    if (f_checkVxLteRequiredMonitorInterface({PX_SIP_GMA_INTERFACENAME,
                                                              PX_DIAMETER_GX_INTERFACENAME
                                                              }))
                    {
                        var SipMessage v_sip;

                        f_cf_createVxLteMonitor();

                        // map/connect component ports
                        f_cf_adapter_up ( );
                        f_cf_user_up ( v_ueA );
                        f_cf_user_up ( v_psap );
                        f_cf_VxLteMonitor_Up();

                        // Preamble
                        f_mtc_userRegistration(v_ueA, v_userInfoA);
                        if (PX_PSAP_REGISTERED) {
                            f_mtc_userRegistration(v_psap, v_infoPsap);
                        } else {
                            // TODO Check OPTIONS from PSAP to E-CSCF
                        }
                        f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_03();
                        f_mtc_userInitiateCall (v_ueA, v_infoPsap); // Event 1

                        // Test body
                        f_mtc_check_TP_GM_PCSCF_ECO_INVITE_01(vc_vxlte_monitor_components.gmA, -, v_sip); // INVITE Event 1
                        f_mtc_check_TP_GM_PCSCF_ECO_380ALTSRV_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 2
                        f_mtc_check_TP_GM_PCSCF_ACK_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 3 

                        // Postamble
                        f_PO_user_home_deregistration(v_ueA);
                        f_PO_user_home_deregistration(v_psap);

                        //unmap/disconnect component ports
                        f_cf_user_down ( v_psap );
                        f_cf_user_down ( v_ueA );
                        f_cf_VxLteMonitor_Down();
                        f_cf_adapter_down ( );
                    }else{
                        //log...
                        setverdict (inconc,"At least one required monitor interface SHALL be selected! Check PIXITs")
                    }
                    f_cf_adapter_down ( );
                } // End of TC TD_VoLTE_ECO_INT_REJ_03

                group f_TD_VoLTE_ECO_INT_REJ_03 {

                    function f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_03() runs on ImsTestCoordinator {
                        log("If the test case fails, please check the preconditions");
                        // TODO Add real code to check pre-conditions
                     } // End of function f_mtc_check_precond_TD_VoLTE_ECO_INT_REJ_03

                } // End of group f_TD_VoLTE_ECO_INT_REJ_03

            } // End of group EmergencySessionAbortOrReject

        } // End of group EmergencySessionEmergencyBearerOperations

        /**
         * @see ETSI TS 103 795-2 Clause 5.5    Emergency Network Detachment
         */
        group EmergencyNetworkDetachment {

            group EmergencySessionDetachment {
                /**
                 * @desc    To demonstrate UE initiated network emergency detachment (IP-CAN session termination) for a UE that has not yet emergency registered to the IMS or for UE that has been emergency registered to the IMS
                 * @see ETSI TS 103 795-2 Clause 5.5.1    UE Emergency  Network Detachment (with/without Emergency Registration)
                 */
                testcase TC_VoLTE_ECO_INT_DTC_01 ( ) runs on ImsTestCoordinator system IotSystemInterface {

                    var IotEquipmentUser v_ueA    := f_cf_create_IotEquipmentUser ( c_userUE_A );
                    var ImsUserInfo v_userInfoA    := f_getImUser ( PX_EUT_A );

                    f_setVxLteMonIterfacesAvailability();
                    //Check required monitor interfaces due to TD
                    if (f_checkVxLteRequiredMonitorInterface({PX_DIAMETER_GX_INTERFACENAME})){
                        f_cf_createVxLteMonitor();

                        // map/connect component ports
                        f_cf_adapter_up ( );
                        f_cf_user_up ( v_ueA );
                        f_cf_VxLteMonitor_Up();

                        //preamble
                        f_mtc_userRadioEnabled ( v_ueA, true, true ); // UA-A trigger an initial network_attachment by enabling radio interface of its mobile
                        f_mtc_userRadioEnabled ( v_ueA, false, true );
                        // test body
                        // Check that user A starts initial network attachment
                        f_mtc_check_TP_GX_PCRF_EMC_CCA_01(vc_vxlte_monitor_components.gx, false);//f_mtc_check_TP_GX_PCRF_ECO_CCA_02 ( vc_vxlte_monitor_components.gx, false ); // Check (CCA – Event 3)

                        //postamble

                        //unmap/disconnect component ports
                        f_cf_user_down ( v_ueA );
                        f_cf_VxLteMonitor_Down();
                        f_cf_adapter_down ( );
                    }else{
                        //log...