Loading ttcn/AtsPSAP/AtsPSAP_Steps.ttcn +70 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ module AtsPSAP_Steps { import from LibSip_Steps all; import from LibSip_Templates all; import from LibSip_Interface all; import from LibSip_PIXITS all; // LibIms import from LibIms_SIPTypesAndValues all; Loading Loading @@ -92,4 +93,73 @@ module AtsPSAP_Steps { } // End of group globalSteps group awaitingMessages { /** * @desc await OPTIONS request reply with 200 OK */ function f_awaitingOPTIONS_sendReply( in template(present) OPTIONS_Request p_MSG := ? ) runs on ImsComponent { var OPTIONS_Request v_MSG; tc_wait.start(PX_SIP_TWAIT); alt { [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { tc_wait.stop; //f_getRouteMapIntoRecordRoute(v_MSG); f_setHeadersOnReceiptOfRequest(v_MSG); // Answer to the OPTIONS f_send200OK(); } } } // end of f_awaitingOPTIONS_sendReply /** * @desc await INFO request reply with 200 OK */ function f_awaitingINFO_sendReply_( in template(present) INFO_Request p_info := ? ) runs on ImsComponent { var INFO_Request v_request; tc_wait.start(PX_SIP_TWAIT); alt { [] SIPP.receive(p_info) -> value v_request { tc_wait.stop; f_setHeadersOnReceiptOfRequest(v_request); // Answer to the INFO f_send200OK(); } } } // end of f_awaitingINFO_sendReply }//end of group awaitingMessages group fieldOperations { function f_setHeadersINFO( inout CSeq p_cSeq_s, in SipUrl p_to_user, in SipUrl p_from_user ) runs on ImsComponent { f_setHeadersGeneral(p_cSeq_s, "INFO"); // cseq, contact, branch, via vc_cancel_To := vc_to; vc_caller_To := vc_to; vc_caller_From := vc_from; vc_reqHostPort := vc_requestUri.components.sip.hostPort; vc_branch := c_branchCookie & f_getRndTag(); vc_via := { fieldName := VIA_E, viaBody := {valueof(m_ViaBody_virtual_XCSCF(vc_branch, vc_userprofile))} }; vc_to := f_initToHeader(p_to_user); // init of vc_to using userProfile identifier vc_from := f_initFromHeader(p_from_user, f_getRndTag()); // init of vc_from using userProfile identifier vc_requestUri := p_to_user; // Request URI of Invite is identical with To header // contact header initialization for sending of OPTIONS from CSCF component vc_contact := m_Contact(m_SipUrl_currIpaddr_CSCF(vc_userprofile)); } // end function f_setHeadersINFO } //end group fieldOperations } // End of module AtsPSAP_Steps Loading
ttcn/AtsPSAP/AtsPSAP_Steps.ttcn +70 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ module AtsPSAP_Steps { import from LibSip_Steps all; import from LibSip_Templates all; import from LibSip_Interface all; import from LibSip_PIXITS all; // LibIms import from LibIms_SIPTypesAndValues all; Loading Loading @@ -92,4 +93,73 @@ module AtsPSAP_Steps { } // End of group globalSteps group awaitingMessages { /** * @desc await OPTIONS request reply with 200 OK */ function f_awaitingOPTIONS_sendReply( in template(present) OPTIONS_Request p_MSG := ? ) runs on ImsComponent { var OPTIONS_Request v_MSG; tc_wait.start(PX_SIP_TWAIT); alt { [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { tc_wait.stop; //f_getRouteMapIntoRecordRoute(v_MSG); f_setHeadersOnReceiptOfRequest(v_MSG); // Answer to the OPTIONS f_send200OK(); } } } // end of f_awaitingOPTIONS_sendReply /** * @desc await INFO request reply with 200 OK */ function f_awaitingINFO_sendReply_( in template(present) INFO_Request p_info := ? ) runs on ImsComponent { var INFO_Request v_request; tc_wait.start(PX_SIP_TWAIT); alt { [] SIPP.receive(p_info) -> value v_request { tc_wait.stop; f_setHeadersOnReceiptOfRequest(v_request); // Answer to the INFO f_send200OK(); } } } // end of f_awaitingINFO_sendReply }//end of group awaitingMessages group fieldOperations { function f_setHeadersINFO( inout CSeq p_cSeq_s, in SipUrl p_to_user, in SipUrl p_from_user ) runs on ImsComponent { f_setHeadersGeneral(p_cSeq_s, "INFO"); // cseq, contact, branch, via vc_cancel_To := vc_to; vc_caller_To := vc_to; vc_caller_From := vc_from; vc_reqHostPort := vc_requestUri.components.sip.hostPort; vc_branch := c_branchCookie & f_getRndTag(); vc_via := { fieldName := VIA_E, viaBody := {valueof(m_ViaBody_virtual_XCSCF(vc_branch, vc_userprofile))} }; vc_to := f_initToHeader(p_to_user); // init of vc_to using userProfile identifier vc_from := f_initFromHeader(p_from_user, f_getRndTag()); // init of vc_from using userProfile identifier vc_requestUri := p_to_user; // Request URI of Invite is identical with To header // contact header initialization for sending of OPTIONS from CSCF component vc_contact := m_Contact(m_SipUrl_currIpaddr_CSCF(vc_userprofile)); } // end function f_setHeadersINFO } //end group fieldOperations } // End of module AtsPSAP_Steps