AtsImsIot_Emergency.ttcn 244 KB
Newer Older
				group f_TD_VoLTE_ECO_RMI_INI_01 {

					function f_mtc_check_precond_TD_VoLTE_ECO_RMI_INI_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_RMI_INI_01

				} // End of group f_TD_VoLTE_ECO_RMI_INI_01
			} // End of group RoamingUECallingPSAPWithEmergencyRegistration

			/**
		 	* @see ETSI TS 103 795-3 Clause 6.3.2    Roaming UE calling PSAP with non-emergency registration
		 	*/      			
			group RoamingUECallingPSAPWithNonEmergencyRegistration { 
				
				/**
				 * @desc    To demonstrate the establishment of dedicated bearers at the originating EPC due to roaming SIP emergency session establishment within non-emergency registration.
				 *          PSAP is located in the IM CN subsystem of IMS A
				 * @see ETSI TS 103 795-2 Clause 6.3.2.1    Roaming UE calling PSAP in same network
				 */
				testcase TD_VoLTE_ECO_RMI_INI_02() runs on ImsTestCoordinator system IotSystemInterface {

					var IotEquipmentUser v_ueB  := f_cf_create_IotEquipmentUser ( c_userUE_B_emergency );
					var IotEquipmentUser v_psap := f_cf_create_IotEquipmentUser ( c_psap );
					var ImsUserInfo v_userInfoB := f_getImUser ( PX_EUT_B ); //non-emergency registration
					var ImsUserInfo v_infoPsap  := f_getImUser ( PX_PSAP );

					f_setVxLteMonIterfacesAvailability();
					//Check required monitor interfaces due to TD
					if (f_checkVxLteRequiredMonitorInterface({PX_SIP_GMB_INTERFACENAME,
															  PX_DIAMETER_GX_INTERFACENAME,
															  PX_DIAMETER_RX_INTERFACENAME,
															  PX_SIP_MW_PE_INTERFACENAME,
															  PX_SIP_MM_B_PSAP_INTERFACENAME // E-CSCCF -> PSAP
															  }))
					{
						var SipMessage v_sip;

						f_cf_createVxLteMonitor();

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

						// Preamble
						f_mtc_userRegistration(v_ueB, v_userInfoB);
						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_RMI_INI_02();

						// Test body
						// Test body
						if (not PX_ECALL) {
							f_mtc_check_TP_GM_PCSCF_ECO_INVITE_02(vc_vxlte_monitor_components.gmB, -, v_sip); // INVITE Event 1
						} else {
							f_mtc_check_TP_GM_PCSCF_ECO_INVITE_04(vc_vxlte_monitor_components.gmB, -, v_sip); // INVITE Event 1
						}
						f_mtc_check_TP_GM_PCSCF_ECO_100Trying_01(vc_vxlte_monitor_components.gmB, -, 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 2
						f_mtc_check_TP_GX_PCRF_RAR_01(vc_vxlte_monitor_components.gx, true); // Event 3
						f_mtc_check_TP_GX_PGW_RAA_02(vc_vxlte_monitor_components.gx);  // Event 4
						f_mtc_check_TP_RX_PCRF_AAA_02(vc_vxlte_monitor_components.rx); // Event 5
						f_mtc_check_TP_RX_PCSCF_RAA_01(vc_vxlte_monitor_components.rx);// Events 7,8
						f_mtc_check_TP_GX_PCRF_CCA_01(vc_vxlte_monitor_components.gx); // Events 6,9

						f_mtc_check_TP_MW_PCSCF_ECO_INVITE_02(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 10
						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
						f_mtc_check_TP_MM_ECSCF_ECO_100Trying_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip);

						// 183 Session Progress
						f_mtc_check_TP_MM_ECSCF_ECO_183SESSION_PROGRESS_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // 183 In Progress Event 12
						f_mtc_check_TP_MW_PCSCF_ECO_183SESSION_PROGRESS_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 13
						f_mtc_check_TP_GM_PCSCF_183SESSION_PROGRESS_01(vc_vxlte_monitor_components.gmB, -, v_sip); // Event 18

						//Rx/Gx exchange after 183(SDP) was received at P-CSCF
						f_mtc_check_TP_RX_PCSCF_AAR_04(vc_vxlte_monitor_components.rx);// Event 14
						f_mtc_check_TP_GX_PCRF_RAR_01(vc_vxlte_monitor_components.gx, true); // Event 15
						f_mtc_check_TP_GX_PGW_RAA_02(vc_vxlte_monitor_components.gx);  // Event 16
						f_mtc_check_TP_RX_PCRF_AAA_02(vc_vxlte_monitor_components.rx); // Event 17

						f_mtc_check_TP_MM_ECSCF_ECO_180RINGING_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // 180 Ringing – Event 20
						f_mtc_check_TP_MW_PCSCF_ECO_180RINGING_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 21
						f_mtc_check_TP_GM_PCSCF_180RINGING_01(vc_vxlte_monitor_components.gmB, -, v_sip); // Event 22

						f_mtc_userCheckRinging(v_psap); // Event 19
						f_mtc_userCheckPeerIsRinging(v_ueB); // Event 19
						f_mtc_userAnswerCall(v_psap);

						f_mtc_check_TP_MM_ECSCF_ECO_200OK_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // 200 OK Event 23
						f_mtc_check_TP_MW_PCSCF_ECO_200OK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 24
						f_mtc_check_TP_GM_PCSCF_200OK_01(vc_vxlte_monitor_components.gmB, -, v_sip); // Event 25

						f_mtc_check_TP_GM_PCSCF_ACK_01(vc_vxlte_monitor_components.gmB, -, v_sip); // ACK Event 26 
						f_mtc_check_TP_MW_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // ACK Event 27
						f_mtc_check_TP_MM_ECSCF_ECO_ACK_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // ACK – Event 28

						f_mtc_userCheckCallEstablished(v_ueB); // Event 29
						f_mtc_userCheckCallEstablished(v_psap); // Event 29

						// Postamble
						f_mtc_EndCall(v_ueB);
						f_PO_user_home_deregistration(v_ueB);
						f_PO_user_home_deregistration(v_psap);
						//f_cf_int_call_down(v_config);

						//unmap/disconnect component ports
						f_cf_user_down ( v_psap );
						f_cf_user_down ( v_ueB );
						f_cf_VxLteMonitor_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_RMI_INI_02

				group f_TD_VoLTE_ECO_RMI_INI_02 {

					function f_mtc_check_precond_TD_VoLTE_ECO_RMI_INI_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_INI_02

				} // End of group f_TD_VoLTE_ECO_RMI_INI_02
				
				
				/**
				 * @desc    To demonstrate the rejection of roaming UE emergency session establishment when the 
				 * 			P-CFCF is in home operator's network within non-emergency registration.
				 *          P-CFCF is located in the IM CN subsystem of IMS A
				 * @see ETSI TS 103 795-2 Clause 6.3.2.2    Roaming UE calling PSAP in home operator's network
				 */
				testcase TD_VoLTE_ECO_RMI_INI_03() runs on ImsTestCoordinator system IotSystemInterface {
					
					var IotEquipmentUser v_ueA  := f_cf_create_IotEquipmentUser ( c_userUE_A_emergency );
					var ImsUserInfo v_userInfoA := f_getImUser ( PX_EUT_A ); //non-emergency registration

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

						f_cf_createVxLteMonitor();

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

						// Preamble
						//registration is not needed
						
						//similar to TC_VxLTE_RMI_ATT_01 UE A has perform a network_attachment
barakatr's avatar
barakatr committed
						f_mtc_userRadioEnabled ( v_ueA, true, true ); // UE-A trigger an initial network_attachment by enabling radio interface of its mobile
						// UE A requests emergency session initiation  // Event 1
						f_mtc_check_TP_GM_PCSCF_ECO_INVITE_05(vc_vxlte_monitor_components.gmA, -, v_sip); // INVITE Event 2
						f_mtc_check_TP_GM_PCSCF_ECO_100Trying_01(vc_vxlte_monitor_components.gmA, -, v_sip);

						// 380 (Alternative Service)
						f_mtc_check_TP_GM_PCSCF_ECO_380ALTSRV_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 3
						
						// ACK
						f_mtc_check_TP_GM_PCSCF_ECO_ACK_01(vc_vxlte_monitor_components.gmA, -, v_sip); // Event 6

						//unmap/disconnect component ports
						f_cf_user_down ( v_ueA );
						f_cf_VxLteMonitor_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_RMI_INI_02

				group f_TD_VoLTE_ECO_RMI_INI_03 {

					function f_mtc_check_precond_TD_VoLTE_ECO_RMI_INI_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_INI_02

				} // End of group f_TD_VoLTE_ECO_RMI_INI_03
				
				
				/**
				 * @desc    To demonstrate the establishment of dedicated bearers for a roaming UE without any registration.
				 *          PSAP is located in the IM CN subsystem of IMS A
				 * @see ETSI TS 103 795-2 Clause 6.3.2.3    Roaming UE calling PSAP with non-registration
				 */
				testcase TD_VoLTE_ECO_RMI_INI_04() runs on ImsTestCoordinator system IotSystemInterface {
					var IotEquipmentUser v_ueB  := f_cf_create_IotEquipmentUser ( c_userUE_B_emergency );
					var IotEquipmentUser v_psap := f_cf_create_IotEquipmentUser ( c_psap );
					var ImsUserInfo v_infoPsap  := f_getImUser ( PX_PSAP );

					f_setVxLteMonIterfacesAvailability();
					//Check required monitor interfaces due to TD
					if (f_checkVxLteRequiredMonitorInterface({PX_SIP_GMB_INTERFACENAME,
															  PX_DIAMETER_GX_INTERFACENAME,
															  PX_DIAMETER_RX_INTERFACENAME,
															  PX_SIP_MW_PE_INTERFACENAME,
															  PX_SIP_MM_B_PSAP_INTERFACENAME // E-CSCCF -> PSAP
															  }))
					{
						var SipMessage v_sip;

						f_cf_createVxLteMonitor();

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

						// Preamble
						//UE B non-registered
						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_RMI_INI_04();

						// Test body
						f_mtc_check_TP_GM_PCSCF_ECO_INVITE_03(vc_vxlte_monitor_components.gmB, -, v_sip); // INVITE Event 1
						f_mtc_check_TP_GM_PCSCF_ECO_100Trying_01(vc_vxlte_monitor_components.gmB, -, 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 2
						f_mtc_check_TP_GX_PCRF_RAR_01(vc_vxlte_monitor_components.gx, true); // Event 3
						f_mtc_check_TP_GX_PGW_RAA_02(vc_vxlte_monitor_components.gx);  // Event 4
						f_mtc_check_TP_RX_PCRF_AAA_02(vc_vxlte_monitor_components.rx); // Event 5
						f_mtc_check_TP_RX_PCSCF_RAA_01(vc_vxlte_monitor_components.rx);// Events 7,8
						f_mtc_check_TP_GX_PCRF_CCA_01(vc_vxlte_monitor_components.gx); // Events 6,9

						f_mtc_check_TP_MW_PCSCF_ECO_INVITE_03(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 10
						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
						f_mtc_check_TP_MM_ECSCF_ECO_100Trying_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip);

						// 183 Session Progress
						f_mtc_check_TP_MM_ECSCF_ECO_183SESSION_PROGRESS_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // 183 In Progress Event 12
						f_mtc_check_TP_MW_PCSCF_ECO_183SESSION_PROGRESS_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 13
						f_mtc_check_TP_GM_PCSCF_183SESSION_PROGRESS_01(vc_vxlte_monitor_components.gmB, -, v_sip); // Event 18

						//Rx/Gx exchange after 183(SDP) was received at P-CSCF
						f_mtc_check_TP_RX_PCSCF_AAR_04(vc_vxlte_monitor_components.rx);// Event 14
						f_mtc_check_TP_GX_PCRF_RAR_01(vc_vxlte_monitor_components.gx, true); // Event 15
						f_mtc_check_TP_GX_PGW_RAA_02(vc_vxlte_monitor_components.gx);  // Event 16
						f_mtc_check_TP_RX_PCRF_AAA_02(vc_vxlte_monitor_components.rx); // Event 17

						f_mtc_check_TP_MM_ECSCF_ECO_180RINGING_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // 180 Ringing – Event 22
						f_mtc_check_TP_MW_PCSCF_ECO_180RINGING_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 24
						f_mtc_check_TP_GM_PCSCF_180RINGING_01(vc_vxlte_monitor_components.gmB, -, v_sip); // Event 25

						f_mtc_userCheckRinging(v_psap); // Event 19
						f_mtc_userCheckPeerIsRinging(v_ueB); // Event 19
						f_mtc_userAnswerCall(v_psap); // Event 26

						f_mtc_check_TP_MM_ECSCF_ECO_200OK_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // 200 OK Event 23
						f_mtc_check_TP_MW_PCSCF_ECO_200OK_01(vc_vxlte_monitor_components.mwPE, -, v_sip); // Event 24
						f_mtc_check_TP_GM_PCSCF_200OK_01(vc_vxlte_monitor_components.gmB, -, v_sip); // Event 25

						f_mtc_check_TP_GM_PCSCF_ACK_01(vc_vxlte_monitor_components.gmB, -, 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_MM_ECSCF_ECO_ACK_01(vc_vxlte_monitor_components.mmB_PSAP, -, v_sip); // ACK – Event 28

						f_mtc_userCheckCallEstablished(v_ueB); // Event 29
						f_mtc_userCheckCallEstablished(v_psap); // Event 29

						// Postamble
						f_mtc_EndCall(v_ueB);
						f_PO_user_home_deregistration(v_ueB);
						f_PO_user_home_deregistration(v_psap);
						//f_cf_int_call_down(v_config);

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

					function f_mtc_check_precond_TD_VoLTE_ECO_RMI_INI_04() 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_INI_04

				} // End of group f_TD_VoLTE_ECO_RMI_INI_02
				
			} // End of group RoamingUECallingPSAPWithNonEmergencyRegistration
				
        } // End of group EmergencySessionEstablishmentRoaming

    } // End of group Roaming

} // End of module AtsImsIot_Emergency