Commit 1c2c2916 authored by rennoch's avatar rennoch
Browse files

MW_SUB_05

parent c9c1b186
Loading
Loading
Loading
Loading
+47 −4
Original line number Diff line number Diff line
@@ -4788,9 +4788,52 @@ module AtsIms_Mw_TCFunctions
		*  @param	p_cSeq_s 
		*/
		function f_TC_IMST2_MW_SUB_05_IMS(in CSeq p_cSeq_s) runs on ImsComponent {
			f_IMS_preamble_woRegistration(c_userProfile_SCSCFwithHomeUE, p_cSeq_s);
			f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_ICSCF);
			//TODO

			var CallId v_orig_callId;
			var CSeq v_CSeq;
			var Route v_notMatchingRoute := valueof(m_route_notmatching);
		
			
			f_IMS_preamble_woRegistration(c_userProfile_ICSCFwithHomeUE, p_cSeq_s);
			f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_SCSCF);
	
			f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict());
	
			// Testbody
	
			// prepare and send INVITE UE1
			LibIms_Steps.f_setHeadersINVITE(p_cSeq_s, c_userProfile_UE1atSUThome);
			f_SendINVITE(m_INVITE_Request_IMS(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via, vc_contact, omit, vc_route, omit, omit, m_pChargingVector_origIoi_fixedValue(vc_userprofile.homeDomain), valueof(m_MBody_SDP(vc_sdp_local))));
	
			// await response - 200 ...
			f_awaitingResponse(mw_Response_Base(c_statusLine200,vc_callId, vc_cSeq));
			// send ACK
			LibSip_Steps.f_setHeadersACK();
			f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via));
		
			// Sending of a BYE request not matching Route header
			LibSip_Steps.f_setHeadersBYE(vc_cSeq);
			f_SendBYE(m_BYE_Request_IMS(vc_requestUri, vc_callId, v_CSeq, vc_from, vc_to, vc_via, v_notMatchingRoute));
			
			//await response - 200 or 400 ...
			if (PC_PCSCF_handle_subsequent_request_with_mismatching_Route_header)
			{
				f_awaitingResponse(mw_Response_Base((c_statusLine400),vc_callId, vc_cSeq));
				// send ACK
				LibSip_Steps.f_setHeadersACK();
				f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via));
			}
			else 
			{
				f_awaitingResponse(mw_Response_Base((c_statusLine200),vc_callId, vc_cSeq));
			}

			f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
			//Postamble
	
			// send original BYE await response to clean the session
			f_terminateCall_IMS(vc_requestUri, v_orig_callId, vc_cSeq, vc_caller_From, vc_caller_To);
	
			f_SIP_postamble_IMS1_withoutRegistration ();
		} // end function f_TC_IMST2_MW_SUB_05_IMS