Commit a509d217 authored by Iztok Juvancic's avatar Iztok Juvancic
Browse files

update templates, replaced tabs

parent 64b55852
Loading
Loading
Loading
Loading
+111 −27
Original line number Diff line number Diff line
module AtsSccas_Steps {
    
    // LibSip
    import from LibSip_Common all;
    import from LibSip_SIPTypesAndValues all;
    import from LibSip_SDPTypes all;
    import from LibSip_Steps all;
@@ -347,5 +349,87 @@ module AtsSccas_Steps {
        } // End of function f_init_interfaceprofile

    } // End of group globalSteps
    group SetHeaders{
        /**
         * @desc function sets header field for the next outgoing REGISTER message
         * @param p_cSeq_s CSeq parameter to be applied
         * @param p_emergency Set to true in case of emergency
         */
        function f_setHeaders_REGISTER_AS( //TODO review and repair params due to isc interface
            inout CSeq p_cSeq_s,
            boolean p_emergency := false
        ) runs on SipComponent  {
            var SemicolonParam_List v_params := {};

            f_setHeadersGeneral(p_cSeq_s, "REGISTER"); // cseq, contact, branch, via
            vc_requestUri := {
                scheme := c_sipScheme,
                components := {
                    sip := {
                        userInfo := omit,
                        hostPort := {
                            host := vc_userprofile.registrarDomain,
                            portField := omit
                        }
                    }
                },
                urlParameters := omit,
                headers := omit
            };

            vc_reqHostPort := vc_requestUri.components.sip.hostPort;

            vc_callId := {
                fieldName := CALL_ID_E,
                callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr
            };
            vc_callIdReg := vc_callId; // remember callId for de-registration
            vc_to := valueof(m_To(m_SipUrl_currDomain(vc_userprofile)));
            vc_cancel_To := vc_to;
            v_params := f_addParameter(v_params,
                {
                    id := c_tagId,
                    paramValue := { 
                        tokenOrHost := f_getRndTag()
                    }
                });
            vc_from := {
                fieldName := FROM_E,
                addressField := vc_to.addressField,
                fromParams := v_params
            };

            if (not vc_firstREGISTER_sent) {
                if (p_emergency) {
                    v_params := {
                        {
                            "sos",
                            omit
                        }
                    };
                    vc_contact.contactBody.contactAddresses[0].addressField.addrSpecUnion.urlParameters := v_params;
                }
                else {
                    v_params := {
                        {
                            id := c_expiresId,
                            paramValue := { 
                                tokenOrHost := c_shortRegistration
                            }
                        }
                    };
                    vc_contact.contactBody.contactAddresses[0].contactParams := v_params;
                }
            }

            vc_firstREGISTER_sent := true; // f_setHeaders_Register is called in deREGISTER function
            vc_authorization := {
                fieldName := AUTHORIZATION_E,
                body := {f_calculatecCredentials_empty(vc_userprofile)}
            };

            vc_via_REG := vc_via;
        } // end function setHeaders_REGISTER_AS
    } // End of group SetHeaders

} // End of module AtsSccas_Steps
+895 −874
Original line number Diff line number Diff line
@@ -183,8 +183,8 @@ module AtsSccas_TCFunctions {
                                                    PX_IMS_SUT_SCSCF_PORT, // TODO To be refined during validation
                                                    "600000",
                                                    m_sccas_featureCaps({m_fcValue("g3gppAtcfFeatureCapabilityIndicator")}),
													omit,//m_contentType(c_sdpApplication), // TODO To be refined during validation
													omit//m_MBody_SDP(vc_sdp_local) // TODO To be refined during validation
                                                    omit,
                                                    omit
                                                    );
                m_req:= {Register:=valueof(m_register3ptyUe)};
                
@@ -200,16 +200,13 @@ module AtsSccas_TCFunctions {
                                                                vc_from.addressField.nameAddr.addrSpec
                                                                );
                
                
                
                f_init_userprofile(c_userProfile_SCSCFwithHomeUE);
                f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_AS); //AS as SCCAS
                f_initSipUrl(c_userProfile_SCSCFwithHomeUE);
                
				
                f_selfOrClientSyncAndVerdict(c_prDone, f_getVerdict()); // sync preambleDone

				//f_setHeaders_REGISTER_AS(v_cSeq_s);//AS INTERFACE REGISTER
                f_setHeaders_REGISTER_AS(v_cSeq_s);//AS INTERFACE REGISTER
                f_SendREGISTER(
                               m_REGISTER_Request_AS(
                                                vc_requestUri, 
@@ -220,8 +217,7 @@ module AtsSccas_TCFunctions {
                                                vc_via_REG, 
                                                vc_contact, 
                                                -,
											   // PX_IMS_SUT_SCSCF_IPADDR, // TODO To be refined during validation
											   // PX_IMS_SUT_SCSCF_PORT, // TODO To be refined during validation
                                                "600000",
                                                m_contentType("multipart/mixed",{m_contentTypeBoundary(c_boundary)}) ,
                                                m_MBody_MIME_SipReqResp(c_boundary,m_req,m_ResponseReg_3ptyUe)
                                ));
@@ -237,7 +233,32 @@ module AtsSccas_TCFunctions {
                    }
                }

				// TODO Deregistration?
                //Deregistration
                f_SendREGISTER(
                               m_REGISTER_Request_AS(
                                                vc_requestUri, 
                                                vc_callId, 
                                                vc_cSeq, 
                                                vc_from, 
                                                vc_to, 
                                                vc_via_REG, 
                                                vc_contact, 
                                                -,
                                                "0",
                                                - ,
                                                -)
                                );
                tc_ack.start;
                alt {
                    [] SIPP.receive(mw_Response_2xxonREGISTER_AS(vc_callId, vc_cSeq, vc_from, vc_to, vc_via_REG, vc_contact)) {
                        tc_ack.stop;
                        log("*** " & __SCOPE__ & ": PASS: 200 OK message was received ***");
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_success); // sync
                    }
                    [] tc_ack.timeout {
                        f_selfOrClientSyncAndVerdict(c_tbDone, e_error); // sync 
                    }
                }
                f_selfOrClientSyncAndVerdict(c_poDone, f_getVerdict()); // sync

            } // End of function f_TC_ISC_SCCAS_RSC_REG_03
+212 −217
Original line number Diff line number Diff line
@@ -285,8 +285,7 @@ module AtsSccas_Templates
                                            template(value) Via p_via,
                                            template(omit) Contact p_contact := omit,
                                            template(omit) Authorization p_authorization := omit,
											//template(value) charstring p_host,
											//template(value) integer p_port,
                                            template(value) DeltaSec p_deltaSec,
                                            template(omit) ContentType p_contentType := omit,
                                            template(omit) MessageBody p_mb := omit
                        ) modifies m_REGISTER_Request_Base := {
@@ -300,17 +299,13 @@ module AtsSccas_Templates
                                contact := p_contact,
                                cSeq := p_cSeq,
                                fromField := p_from,
								//path := m_path_TS(p_host, p_port),
                                pChargingVector := m_pChargingVector_icid_TS,
                                pVisitedNetworkID := m_pVisitedNetworkID_TS,
								//require := {
								//	fieldName := REQUIRE_E,
								//	optionsTags := {"path"}
								//},
                                toField := p_to,
                                via := p_via,
                                contentLength := m_contentLength(f_MessageBodyLength(p_mb)),
								contentType   := p_contentType
                                contentType   := p_contentType,
                                expires       := m_expires(str2int(valueof(p_deltaSec)))
                            },
                            messageBody := p_mb
                        }