Commit 0afe89a7 authored by pintar's avatar pintar
Browse files

TIPTIR interworking group finished

parent 3b2b1ad0
Loading
Loading
Loading
Loading
+350 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ module SipIsup_SS_TCFunctions {
	import from LibIms_Steps all;	
	import from LibIms_SIPTypesAndValues all;
	import from LibIms_Interface all;
	import from LibIms_PIXITS all;
	//IsupAts
	import from SipIsup_ISUP_ModuleParams all; // for timer values e.g. PX: T7, T9
	import from SipIsup_PIXITS all;
@@ -40,7 +41,355 @@ module SipIsup_SS_TCFunctions {
      //HostPort
      charstring 	        host optional,        // hostname, IPv4 or IPv6
      integer             portField optional    // represented as an integer
    }with { encode "SIPCodec" }
    }with { encode "SIPCodec" }group SuplementaryService_TIP_TIR{

	group SS_TIPTIR_SIPSIP{

		group Term_P_CSCF{
		}// end group Term_P_CSCF
		group TermUserE{
		}// end group TermUserE
		group OrigUserE{
		}// end group OrigUserE
		group DestNetw{
		}// end group DestNetw
		group TIR{
		}// end group TIR
		group CDIV{
		}// end group CDIV
		group OrigNetw{
		}// end group OrigNetw
		group OtherNetw{
				
			function f_Sip_TIP_N06_001_UE1(in CSeq p_cSeq_s) runs on SipComponent {
		
				// 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 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_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
				// Testbody

				// 	INVITE UE1@IMS1
				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());
					}
				}		
					
				f_check_Conversation();
					
				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
					
				//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();
				
			}

			function f_Sip_TIP_N06_001_IMS1(in CSeq p_cSeq_s
			) runs on SipComponent {
				
				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
		
				// 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();
			}
				
			function f_Sip_TIP_N06_002_UE1(in CSeq p_cSeq_s) runs on SipComponent {
		
				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_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
				// Testbody

				// 	INVITE UE1@IMS1
				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());
					}
				}		
					
				f_check_Conversation();
					
				f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
					
				//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();
			}

			function f_Sip_TIP_N06_002_IMS1(in CSeq p_cSeq_s) runs on SipComponent {
				
				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
		
				// 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();
			}
				
			function f_Sip_TIP_N06_003_UE1(in CSeq p_cSeq_s) runs on SipComponent {
				f_Sip_TIP_N06_001_UE1(p_cSeq_s);
			}

			function f_Sip_TIP_N06_003_IMS1(in CSeq p_cSeq_s) runs on SipComponent {
				f_Sip_TIP_N06_001_IMS1(p_cSeq_s);
			}
				
			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);
			}
		}// end group OtherNetw
	
	}//group SS_TIPTIR_SIPSIP
	
}// end  group SuplementaryService_TIP_TIR  
  
group SuplementaryService_CUG{
	
	group SS_CUG_SIPSIP{
		
		group Originating_UE{
		}// end group Originating_UE
		group Originating_AS{
		}// end group Originating_AS
		group Terminating_AS{
		}// end group Terminating_AS
		group Interaction{
		}// end group Interaction
		
	}// end group SS_CUG_SIPSIP
	
	group SS_CUG_SIPISUP{
	}// end group SS_CUG_SIPISUP
	
	group SS_CUG_ISUPSIP{
	}// end group SS_CUG_ISUPSIP
	
}// end  group SuplementaryService_CUG 
  
group SuplementaryService_ACR{
	
	group SS_ACR_SIPSIP{
		
		group ACR_terminating_AS{
		}// end group ACR_terminating_AS
		group OBC_originating_AS{
		}// end group OBC_originating_AS
		group IBC_terminating_AS{
		}// end group IBC_terminating_AS
		group Interaction_OIP{
		}// end group Interaction_OIP
		group Interaction_CDIV{
		}// end group Interaction_CDIV
		
	}// end group SS_ACR_SIPSIP
	
	group SS_ACR_SIPISUP{
	}// end group SS_ACR_SIPISUP
	
	group SS_ACR_ISUPSIP{
	}// end group SS_ACR_ISUPSIP
	
}// end  group SuplementaryService_ACR 
  
group SuplementaryService_MCID{
	
	group SS_MCID_SIPSIP{
		
		group terminating_S_CSCF{
		}// end group terminating_S_CSCF
		group terminating_AS{
		}// end group terminating_AS
		group destination_UE{
		}// end group destination_UE
		
	}// end group SS_MCID_SIPSIP
	
	group SS_MCID_SIPISUP{
	}// end group SS_MCID_SIPISUP
	
	group SS_MCID_ISUPSIP{
	}// end group SS_MCID_ISUPSIP
}// end  group SuplementaryService_MCID 

} // end module SipIsup_SIP_TCFunctions