From 58fd55a362e45540d0f965a058c800421de3f395 Mon Sep 17 00:00:00 2001 From: rennoch Date: Wed, 4 May 2011 12:38:53 +0000 Subject: [PATCH] deregister that does not terminate and allows postamble synchronisation --- ttcn/LibIms_Steps.ttcn | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ttcn/LibIms_Steps.ttcn b/ttcn/LibIms_Steps.ttcn index e87eb2a..1793181 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()}; -- GitLab