diff --git a/ttcn/LibIms_Steps.ttcn b/ttcn/LibIms_Steps.ttcn index e87eb2a03871a780e87e0f0bff09ac8031674763..179318156e73125bc820797a3bec2d49954982df 100644 --- a/ttcn/LibIms_Steps.ttcn +++ b/ttcn/LibIms_Steps.ttcn @@ -1253,6 +1253,31 @@ module LibIms_Steps f_terminate_component() }; + + function f_IMS_awaitDeRegistration () runs on ImsComponent + { + var SipUrl v_passociated_url; + //Awaiting 1st REGISTER + + f_awaitingREGISTER(mw_REGISTER_unauthorizedRequest_IMS); + + // 401 response + f_sendResponse(m_Response_WWWauthenticate_IMS(c_statusLine401, + vc_callId, vc_cSeq,vc_caller_From, vc_caller_To, vc_via, + m_wwwAuthenticate(f_calculatecChallenge_forWWWAuthorization + (PX_IMS_SUT_UE1_QOP,vc_authorization.body[0].digestResponse))) + ); + + //Awaiting 2nd REGISTER with authorization header + f_awaitingREGISTER(mw_REGISTER_unauthorizedRequest_IMS);//mw_REGISTER_authorizedRequest_IMS(m_Authorization_digest(mw_digestResponse(c_Integrity_protected_yes)))); + + // 200OK to complete the request +// vc_contact := vc_request.msgHeader.contact; +// vc_contact.contactBody.contactAddresses[0].contactParams := {{"expires",int2str(0)}}; + v_passociated_url := vc_caller_From.addressField.nameAddr.addrSpec; + f_sendResponse(m_Response_2xxonREGISTER_IMS(c_statusLine200,vc_callId, vc_cSeq,vc_callee_From, vc_callee_To, vc_via,vc_contact,f_initSipUrl(c_userProfile_SCSCFwithHomeUE),v_passociated_url)); + }; + function f_SIP_postamble_UE1_withoutRegistration () runs on ImsComponent {f_terminate_component()};