Commit 9fa221c6 authored by Axel Rennoch's avatar Axel Rennoch
Browse files

move functions to steps

parent a002ae4e
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
@@ -489,6 +489,38 @@ module AtsSccas_Steps {
            LibSip_Steps.f_setHeadersINVITE(p_cSeq_s);
        } // end f_setHeadersINVITE_AS

			/**
			 * @desc setting of general and basic OPTIONS header fields in additon to the addresses (To, From, ReqUri)
			 * @param p_cSeq_s
			 */
			function f_setHeadersOPTIONS(
				inout CSeq p_cSeq_s
			) runs on SipComponent  {
				f_setHeadersGeneral(p_cSeq_s, "OPTIONS"); // cseq, contact, branch, via
				vc_callId := {
					fieldName := CALL_ID_E,
					callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr
				};

				vc_cancel_To := vc_to;
				vc_caller_To := vc_to;

				vc_caller_From := vc_from;

				if (ischosen(vc_requestUri.components.sip)) {
					// sip/sips call
					vc_reqHostPort := vc_requestUri.components.sip.hostPort;
				}
				else if (ischosen(vc_requestUri.components.urn)) {
					// Emergency call
					vc_reqUrnUri := vc_requestUri.components.urn;
				}
				else {
					log("*** " & __SCOPE__ &": INFO:f_setHeadersOPTIONS: unsupported field: ", vc_requestUri," ***");
					setverdict(fail);
				}
			}

    } // End of group SetHeaders
    
    group CommonProcedures {
@@ -622,6 +654,18 @@ module AtsSccas_Steps {
			var CSeq v_cSeq_s := p_cSeq_s;
		} //end function f_ReleaseDialogAS


        /**
         * @desc function send OPTIONS message
         * @param p_request template of the message to be sent
         */
        function f_SendOPTIONS(
            template(value) OPTIONS_Request p_request
        ) runs on SipComponent  {
            SIPP.send(p_request) to vc_sent_label;
        }

		
    } //end group CommonProcedures

} // End of module AtsSccas_Steps