diff --git a/ttcn/LibIms_Steps.ttcn b/ttcn/LibIms_Steps.ttcn index 7d08cca0c888d89ed975222e144d58db83a4618a..c2cf0b7bbc8c97c581e899d3a50e61198f8e8611 100644 --- a/ttcn/LibIms_Steps.ttcn +++ b/ttcn/LibIms_Steps.ttcn @@ -1347,6 +1347,41 @@ module LibIms_Steps } } // end function f_terminateCall_UE + + /** + * + * @desc sends BYE and awaits response and De-registration + * @param p_CallId parameter for outgoing BYE + * @param p_cSeq parameter for outgoing BYE + * @param p_from parameter for outgoing BYE + * @param p_to parameter for outgoing BYE + * @param p_reqHostPort parameter for outgoing BYE + */ + function f_terminateCall_UE_withDeReg(SipUrl p_requestUri, CallId p_CallId, inout CSeq p_cSeq, From p_from, + template To p_to) runs on ImsComponent + { + LibSip_Steps.f_setHeadersBYE(p_cSeq); + // Sending of a BYE request to release the call and expect a final response + f_SendBYE(m_BYE_Request_UE(p_requestUri, p_CallId, p_cSeq, p_from, valueof(p_to), vc_via, vc_route)); + + tc_resp.start(PX_SIP_TRESP); + alt + { + [] SIPP.receive (mw_Response_Base(mw_statusLine1xx, p_CallId, p_cSeq)) + { + repeat; + } + [] SIPP.receive (mw_Response_Base(mw_statusLineFinal, p_CallId, p_cSeq)) + { + tc_resp.stop; + } + // timeout should be handled in default_alt_step + }; + action("Please de-register"); + f_IMS_awaitDeRegistration(); + //f_terminate_component(); + } // end function f_terminateCall_UE_withDeReg + } group defaults {