Commit 85f24061 authored by petersenj's avatar petersenj
Browse files

TIP N04 group implemented

parent 9c0fe776
Loading
Loading
Loading
Loading
+240 −35
Original line number Diff line number Diff line
@@ -59,24 +59,25 @@ module SS_Ims_TCFunctions {
		}// end group OrigNetw
		group OtherNetw{
				
			function f_Sip_TIP_N06_001_UE1(in CSeq p_cSeq_s) runs on SipComponent {
			function f_Sip_TIP_N04_001_Ic(in CSeq p_cSeq_s) runs on ImsComponent {
		
				// set PAsserted value 
				var template PAssertedID v_PAsserted := mw_PAssertedID(mw_AddrUnion_Nameaddr(omit, PX_IMS_SUT_UE2_PUBLIC_USER, omit));//mw_Addr_Union_CLIP_1(PX_SIP_ETS2_LOCAL_USER_FULL));
				var template PAssertedID v_PAsserted := mw_PAssertedID(mw_AddrUnion_Nameaddr(*, PX_IMS_SUT_UE2_PUBLIC_USER, *));//mw_Addr_Union_CLIP_1(PX_SIP_ETS2_LOCAL_USER_FULL));
				var template Response v_Response;
					
				// Request-Uri refers to home network (SUT)
				// UE1 registers its public sip-url in home network (SUT)
				// UE contact is in home network (SUT)
				// UE authorizaton data is in home network (SUT)
				f_IMS_preamble_withRegistration(c_userProfile_UE1atSUThome, p_cSeq_s, m_REGISTER_Request_Base(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization)); // LibSip
				f_IMS_preamble_woRegistration(c_userProfile_IBCFwithHomeUE, p_cSeq_s); // LibSip
		
				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
				// Testbody

				// 	INVITE UE1@IMS1
				LibIms_Steps.f_setHeadersINVITE(vc_cSeq, c_userProfile_IBCFwithHomeUE);
				// 	INVITE ICSCFUE@IMS1
				LibIms_Steps.f_setHeadersINVITE(vc_cSeq, c_userProfile_ICSCFwithHomeUE);
				f_SendINVITE(m_INVITE_Request_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_contact, omit, vc_route, vc_recordRoute, omit, omit, m_MBody_SDP(vc_sdp_local)));
				// Actually m_INVITE_Request_IMS is defined in the comment to go over Mw, but this is the Ic Interface
				
				select (PX_TC_VA){ // PIXIT for TC VARIANT
					case (1) {
@@ -114,24 +115,19 @@ module SS_Ims_TCFunctions {
				//Send BYE and awaiting response
				f_terminateCall_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To);
					
				f_RemoveRegistration(vc_cSeq); // deregistration in SUT
				f_SIP_postamble_UE1_withoutRegistration();
				
			}
			}// end f_Sip_TIP_N04_001_Ic

			function f_Sip_TIP_N06_001_IMS1(in CSeq p_cSeq_s
			) runs on SipComponent {
			function f_Sip_TIP_N04_001_Mw(in CSeq p_cSeq_s) runs on ImsComponent {
				
				var template PAssertedID v_PAsserted;

				// set PAssertedID
				v_PAsserted := m_PAssertedID(m_AddrUnion_NameAddr(PX_SIP_NameAddr_PAsserted));

				// IMS1  interface profile initialization
				f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_IBCF1);

				// IMS1UE1 contact is in home network (TS)
				f_IMS_preamble_woRegistration(c_userProfile_IBCFwithHomeUE, p_cSeq_s); // configuration of local user IMS1UE1
				f_IMS_preamble_woRegistration(c_userProfile_ICSCFwithHomeUE, p_cSeq_s); // configuration of local user IMS1UE1
		
				// Note: UE1 is registerd in SUT only, but not registered in IMS1
				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
@@ -178,9 +174,9 @@ module SS_Ims_TCFunctions {

				// UE1 is registerd in SUT only, but not registered in IMS1
				f_SIP_postamble_IMS1_withoutRegistration();
			}
			} //end f_Sip_TIP_N04_001_Mw
				
			function f_Sip_TIP_N06_002_UE1(in CSeq p_cSeq_s) runs on SipComponent {
			function f_Sip_TIP_N04_002_Ic(in CSeq p_cSeq_s) runs on ImsComponent {
		
				var template Response v_Response;
					
@@ -188,13 +184,13 @@ module SS_Ims_TCFunctions {
				// UE1 registers its public sip-url in home network (SUT)
				// UE contact is in home network (SUT)
				// UE authorizaton data is in home network (SUT)
				f_IMS_preamble_withRegistration(c_userProfile_UE1atSUThome, p_cSeq_s, m_REGISTER_Request_Base(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization)); // LibSip
				f_IMS_preamble_woRegistration(c_userProfile_IBCFwithHomeUE, p_cSeq_s); // LibSip
		
				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
				// Testbody

				// 	INVITE UE1@IMS1
				LibIms_Steps.f_setHeadersINVITE(vc_cSeq, c_userProfile_IBCFwithHomeUE);
				// 	ICSCFUE@IMS1
				LibIms_Steps.f_setHeadersINVITE(vc_cSeq, c_userProfile_ICSCFwithHomeUE);
				f_SendINVITE(m_INVITE_Request_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_contact, omit, vc_route, vc_recordRoute, omit, omit, m_MBody_SDP(vc_sdp_local)));
				
				select (PX_TC_VA){ // PIXIT for TC VARIANT
@@ -234,19 +230,17 @@ module SS_Ims_TCFunctions {
				f_terminateCall_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To);
					
				f_RemoveRegistration(vc_cSeq); // deregistration in SUT
				f_SIP_postamble_UE1_withoutRegistration();
			}
				f_SIP_postamble_UE1_withoutRegistration(); // might be incorrect ( it does stop the component, but naming... )
				
			function f_Sip_TIP_N06_002_IMS1(in CSeq p_cSeq_s) runs on SipComponent {
			}// end f_Sip_TIP_N04_002_Ic

			function f_Sip_TIP_N04_002_Mw(in CSeq p_cSeq_s) runs on ImsComponent {
				
				var template PAssertedID v_PAsserted;

				// set PAssertedID
				v_PAsserted := m_PAssertedID(m_AddrUnion_NameAddr(PX_SIP_NameAddr_PAsserted));

				// IMS1  interface profile initialization
				f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_IBCF1);

				// IMS1UE1 contact is in home network (TS)
				f_IMS_preamble_woRegistration(c_userProfile_IBCFwithHomeUE, p_cSeq_s); // configuration of local user IMS1UE1
		
@@ -297,22 +291,233 @@ module SS_Ims_TCFunctions {

				// UE1 is registerd in SUT only, but not registered in IMS1
				f_SIP_postamble_IMS1_withoutRegistration();
			}// end f_Sip_TIP_N04_002_Mw
				
			function f_Sip_TIP_N04_003_Mw(in CSeq p_cSeq_s) runs on ImsComponent {
				// trusted network
				var template PAssertedID v_PAsserted;
				var template Response v_Response;

				// set PAssertedID
				v_PAsserted := mw_PAssertedID(mw_AddrUnion_Nameaddr(*, PX_IMS_SUT_UE2_PUBLIC_USER, *));//mw_Addr_Union_CLIP_1(PX_SIP_ETS2_LOCAL_USER_FULL));

				// IMS1UE1 contact is in home network (TS)
				f_IMS_preamble_woRegistration(c_userProfile_ICSCFwithHomeUE, p_cSeq_s); // configuration of local user IMS1UE1
		
				// Note: UE1 is registerd in SUT only, but not registered in IMS1
				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());

				// Testbody
		
				LibIms_Steps.f_setHeadersINVITE(vc_cSeq, c_userProfile_IBCFwithHomeUE);
				f_SendINVITE(m_INVITE_Request_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_contact, omit, vc_route, vc_recordRoute, omit, omit, m_MBody_SDP(vc_sdp_local)));

				select(PX_TC_VA){ // PIXIT for TC VARIANT
					case (1) {
						// 180  Ringing
						// add check if right PAssertedID is present
						v_Response := mw_Response_PAsserted_Privacy(c_statusLine180, vc_callId, vc_cSeq, v_PAsserted, omit);
						f_awaitingResponse(v_Response);
						f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict());
						f_awaitingResponse(mw_Response_Base(c_statusLine200,vc_callId, vc_cSeq)); 
						f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via));
					} 
					case (2) {
						// 183 Session in Progress
						// add check if right PAssertedID is present
						v_Response := mw_Response_PAsserted_Privacy(c_statusLine183, vc_callId, vc_cSeq, v_PAsserted, omit);
						f_awaitingResponse(v_Response);
						f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict());
						f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); 
						f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via));
					}
					case else {
						// 200 OK
						// add check if right PAssertedID is present
						v_Response := mw_Response_PAsserted_Privacy(c_statusLine200, vc_callId, vc_cSeq, v_PAsserted, omit);
						f_awaitingResponse(v_Response);
						f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via));
						f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict());
					}
				}
					
			function f_Sip_TIP_N06_003_UE1(in CSeq p_cSeq_s) runs on SipComponent {
				f_Sip_TIP_N06_001_UE1(p_cSeq_s);
				f_check_Conversation();

				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());// sync point test body done
				
				//Send BYE and awaiting response
				f_terminateCall_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To);

			} // end f_Sip_TIP_N04_003_Mw

			function f_Sip_TIP_N04_003_Ic(in CSeq p_cSeq_s) runs on ImsComponent {
			// trusted network
				var template PAssertedID v_PAsserted;

				// set PAssertedID
				v_PAsserted := m_PAssertedID(m_AddrUnion_NameAddr(PX_SIP_NameAddr_PAsserted));

				f_IMS_preamble_woRegistration(c_userProfile_IBCFwithHomeUE, p_cSeq_s); // configuration of local user IMS1UE1
				
				// Note: UE1 is registerd in SUT only, but not registered in IMS1
				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());

				// Testbody
		
				f_awaitingINVITE(mw_INVITE_Request_Base); 

				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());

				select(PX_TC_VA){ // PIXIT for TC VARIANT
					case (1) {
						// 180  Ringing
						//f_SendResponse_with_ID_params(StatusLine180,omit,v_PAsserted,omit);
						//IUT (P-CSCF) should set&send PAssertedID parameter to originating side
						f_sendResponse(m_Response_PAsserted_Privacy(c_statusLine180, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, v_PAsserted, omit));
						f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict());
						f_sendResponse(m_Response_mbody(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, valueof( m_MBody_SDP(vc_sdp_local))));
						f_awaitingACK(mw_ACK_Request_Base(vc_callId));
					} 
					case (2) {
						// 183 Session in Progress
						//f_SendResponse_with_ID_params(StatusLine183,omit,v_PAsserted,omit);		
						//IUT (P-CSCF) should set&send PAssertedID parameter to originating side
						f_sendResponse(m_Response_PAsserted_Privacy(c_statusLine183, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, v_PAsserted, omit));
						f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict());
						f_sendResponse(m_Response_mbody(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, valueof( m_MBody_SDP(vc_sdp_local))));
						f_awaitingACK(mw_ACK_Request_Base(vc_callId));							
					} 
					case else {
						// 200 OK
						//f_SendResponse_with_ID_params(StatusLine200,omit,v_PAsserted,omit);		
						//IUT (P-CSCF) should set&send PAssertedID parameter to originating side
						f_sendResponse(m_Response_PAsserted_Privacy_mbody(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, v_PAsserted, omit, valueof( m_MBody_SDP(vc_sdp_local))));
						f_awaitingACK(mw_ACK_Request_Base(vc_callId));
						f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict());
					}		
				}
					
			function f_Sip_TIP_N06_003_IMS1(in CSeq p_cSeq_s) runs on SipComponent {
				f_Sip_TIP_N06_001_IMS1(p_cSeq_s);
				f_check_Conversation();

				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());// sync point test body done
				
				//await BYE and send 200 OK
				f_awaitingBYE_sendReply(mw_BYE_Request_Base(vc_callId));

				// UE1 is registerd in SUT only, but not registered in IMS1
				f_SIP_postamble_IMS1_withoutRegistration();
			} // end f_Sip_TIP_N04_003_Ic
				
			function f_Sip_TIP_N04_004_Mw(in CSeq p_cSeq_s) runs on ImsComponent {
			// un-trusted network				
				var template Response v_Response;


				// IMS1UE1 contact is in home network (TS)
				f_IMS_preamble_woRegistration(c_userProfile_ICSCFwithHomeUE, p_cSeq_s); // configuration of local user IMS1UE1
		
				// Note: UE1 is registerd in SUT only, but not registered in IMS1
				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());

				// Testbody
		
				LibIms_Steps.f_setHeadersINVITE(vc_cSeq, c_userProfile_IBCFwithHomeUE);
				f_SendINVITE(m_INVITE_Request_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_contact, omit, vc_route, vc_recordRoute, omit, omit, m_MBody_SDP(vc_sdp_local)));

				select(PX_TC_VA){ // PIXIT for TC VARIANT
					case (1) {
						// 180  Ringing
						// add check if right PAssertedID is present
						v_Response := mw_Response_PAsserted_Privacy(c_statusLine180, vc_callId, vc_cSeq, omit, omit);
						f_awaitingResponse(v_Response);
						f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict());
						f_awaitingResponse(mw_Response_Base(c_statusLine200,vc_callId, vc_cSeq)); 
						f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via));
					} 
					case (2) {
						// 183 Session in Progress
						// add check if right PAssertedID is present
						v_Response := mw_Response_PAsserted_Privacy(c_statusLine183, vc_callId, vc_cSeq, omit, omit);
						f_awaitingResponse(v_Response);
						f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict());
						f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); 
						f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via));
					}
					case else {
						// 200 OK
						// add check if right PAssertedID is present
						v_Response := mw_Response_PAsserted_Privacy(c_statusLine200, vc_callId, vc_cSeq, omit, omit);
						f_awaitingResponse(v_Response);
						f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via));
						f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict());
					}
				} // end f_Sip_TIP_N04_004_Mw
					
				f_check_Conversation();

				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());// sync point test body done
				
				//Send BYE and awaiting response
				f_terminateCall_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To);

			function f_Sip_TIP_N06_004_UE1(in CSeq p_cSeq_s) runs on SipComponent {
				f_Sip_TIP_N06_002_UE1(p_cSeq_s);
			}

			function f_Sip_TIP_N06_004_IMS1(in CSeq p_cSeq_s) runs on SipComponent {
				f_Sip_TIP_N06_002_IMS1(p_cSeq_s);
			function f_Sip_TIP_N04_004_Ic(in CSeq p_cSeq_s) runs on ImsComponent {
			// un-trusted network				
				var template PAssertedID v_PAsserted;

				// set PAssertedID
				v_PAsserted := m_PAssertedID(m_AddrUnion_NameAddr(PX_SIP_NameAddr_PAsserted));

				f_IMS_preamble_woRegistration(c_userProfile_IBCFwithHomeUE, p_cSeq_s); // configuration of local user IMS1UE1
				
				// Note: UE1 is registerd in SUT only, but not registered in IMS1
				f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());

				// Testbody
		
				f_awaitingINVITE(mw_INVITE_Request_Base); 

				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());

				select(PX_TC_VA){ // PIXIT for TC VARIANT
					case (1) {
						// 180  Ringing
						//f_SendResponse_with_ID_params(StatusLine180,omit,v_PAsserted,omit);
						//IUT (P-CSCF) should set&send PAssertedID parameter to originating side
						f_sendResponse(m_Response_PAsserted_Privacy(c_statusLine180, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, v_PAsserted, omit));
						f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict());
						f_sendResponse(m_Response_mbody(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, valueof( m_MBody_SDP(vc_sdp_local))));
						f_awaitingACK(mw_ACK_Request_Base(vc_callId));
					} 
					case (2) {
						// 183 Session in Progress
						//f_SendResponse_with_ID_params(StatusLine183,omit,v_PAsserted,omit);		
						//IUT (P-CSCF) should set&send PAssertedID parameter to originating side
						f_sendResponse(m_Response_PAsserted_Privacy(c_statusLine183, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, v_PAsserted, omit));
						f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict());
						f_sendResponse(m_Response_mbody(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, valueof( m_MBody_SDP(vc_sdp_local))));
						f_awaitingACK(mw_ACK_Request_Base(vc_callId));							
					} 
					case else {
						// 200 OK
						//f_SendResponse_with_ID_params(StatusLine200,omit,v_PAsserted,omit);		
						//IUT (P-CSCF) should set&send PAssertedID parameter to originating side
						f_sendResponse(m_Response_PAsserted_Privacy_mbody(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, v_PAsserted, omit, valueof( m_MBody_SDP(vc_sdp_local))));
						f_awaitingACK(mw_ACK_Request_Base(vc_callId));
						f_selfOrClientSyncAndVerdict(c_sync1, f_getVerdict());
					}		
				}
					
				f_check_Conversation();

				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());// sync point test body done
				
				//await BYE and send 200 OK
				f_awaitingBYE_sendReply(mw_BYE_Request_Base(vc_callId));

				// UE1 is registerd in SUT only, but not registered in IMS1
				f_SIP_postamble_IMS1_withoutRegistration();
			}
		}// end group OtherNetw