Loading ttcn/LibIms_Steps.ttcn +260 −71 Original line number Diff line number Diff line Loading @@ -24,9 +24,70 @@ module LibIms_Steps import from LibIms_SIPTypesAndValues all; group externalfunctions { } }//end group externalfunctions group parameterOperations { /** * * @desc functions add new via parameter * @param p_message (request) SIP message to be used to prepair via header * @param p_userprofile user profile */ function f_addNewViaParameter(in Request p_message, in integer p_userprofile) runs on ImsComponent { var integer v_intVia; var integer i := 0; if (ispresent(p_message.msgHeader.via)) { v_intVia := sizeof(p_message.msgHeader.via.viaBody); while (i < v_intVia) { p_message.msgHeader.via.viaBody[v_intVia] := p_message.msgHeader.via.viaBody[v_intVia-1]; v_intVia := v_intVia - 1; } vc_branch := c_branchCookie & f_getRndTag(); p_message.msgHeader.via.viaBody[0] := valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile)); vc_via := p_message.msgHeader.via; } } /** * * @desc functions add new via parameter * @param p_message (request) SIP message to be used to prepair via header * @param p_userprofile user profile */ function f_addNewRecordRouteAndRemoveRoutParameter(in Request p_message) runs on ImsComponent { var integer v_intRoute,v_intRecordRoute; var integer i := 1; var integer j := 0; var RouteBody v_route1; var Route v_newRoute; v_newRoute.fieldName := ROUTE_E; if (ispresent(p_message.msgHeader.route)) { v_intRoute := sizeof(p_message.msgHeader.route.routeBody); v_route1 := p_message.msgHeader.route.routeBody[0]; while (i < v_intRoute) { v_newRoute.routeBody[i-1] := p_message.msgHeader.route.routeBody[i]; i := i + 1; } vc_route := v_newRoute; } if (ispresent(p_message.msgHeader.recordRoute)) { v_intRecordRoute := sizeof(p_message.msgHeader.recordRoute.routeBody); while (j < v_intRecordRoute) { p_message.msgHeader.recordRoute.routeBody[v_intRecordRoute] := p_message.msgHeader.recordRoute.routeBody[v_intRecordRoute-1]; v_intRecordRoute := v_intRecordRoute - 1; } p_message.msgHeader.recordRoute.routeBody[0] := v_route1; vc_recordRoute := p_message.msgHeader.recordRoute; } } }//end group parameterOperations group fieldOperations { /* Loading Loading @@ -68,20 +129,29 @@ module LibIms_Steps }// end f_setHeadersCANCEL /** * * @desc sets headers for forward request from AS in case if AS acts as Proxy * @param p_proxyMode true = proxyMode, false = B2BMode */ function f_setHeadersForwardRequestFromAS (inout CSeq p_cSeq_s) runs on ImsComponent function f_setHeadersForwardRequestFromAS (inout CSeq p_cSeq_s, boolean p_proxyMode) runs on ImsComponent { var Request v_request; v_request := vc_request; vc_via := v_request.msgHeader.via; // TODO via header need to be adapted due to standards vc_route := v_request.msgHeader.route; // TODO route header need to be adapted due to standards if (p_proxyMode) { vc_requestUri2 := v_request.requestLine.requestUri; vc_to := v_request.msgHeader.toField; vc_contact := v_request.msgHeader.contact; f_addNewViaParameter(v_request, c_userProfile_AS1); f_addNewRecordRouteAndRemoveRoutParameter(v_request); } else { //B2Bmode vc_contact := valueof(m_Contact(m_SipUrl_contactIpaddr(vc_userprofile))); vc_callId := { fieldName:=CALL_ID_E, callid:=f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr }; } }// end function f_setHeadersForwardRequest /** Loading Loading @@ -266,12 +336,16 @@ module LibIms_Steps * @param p_cSeq_s current cSeq * @param p_orginatingSide true in case of Re-INVITE is send from the orgination endpoint otherwise false. */ function f_setHeadersReINVITE (inout CSeq p_cSeq_s, in boolean p_orginatingSide) runs on ImsComponent function f_setHeadersReINVITE (inout CSeq p_cSeq_s, in boolean p_orginatingSide, in integer p_to_user) runs on ImsComponent { var integer v_tmp; f_setHeadersGeneral(p_cSeq_s, "INVITE"); // cseq, contact, branch, via vc_reqHostPort := vc_requestUri.components.sip.hostPort; vc_requestUri := f_initSipUrl(p_to_user); if(p_orginatingSide) { vc_to := vc_caller_To; vc_from := vc_caller_From; Loading @@ -281,6 +355,11 @@ module LibIms_Steps vc_from := vc_callee_From; } v_tmp := str2int(vc_sdp_local.origin.session_id); vc_sdp_local.origin.session_id := int2str(v_tmp + 1); v_tmp := str2int(vc_sdp_local.origin.session_version); vc_sdp_local.origin.session_version := int2str(v_tmp + 1); }// end function f_setHeadersReINVITE /** Loading Loading @@ -696,7 +775,16 @@ module LibIms_Steps case (c_userProfile_AS1) { //variant c_userProfile_AS1 vc_userprofile.currPort := PX_IMS_TS_AS1_PORT; // via, route(Isc interface of TS) vc_userprofile.currIpaddr := PX_IMS_TS_AS1_IPADDR; // via, route vc_userprofile.homeDomain := PX_IMS_TS_AS1_HOME_DOMAIN; // via, route vc_userprofile.contactPort := PX_IMS_TS_AS1_PORT; // contact (simulated UE) vc_userprofile.contactIpaddr := PX_IMS_TS_AS1_IPADDR; // contact vc_userprofile.bearerIpaddr := PX_IMS_SUT_UE1_BEARER_IPADDR; vc_userprofile.homeDomain := PX_IMS_TS_AS1_HOME_DOMAIN; // via, routevc_userprofile.publUsername := PX_IMS_SUT_UE4_PUBLIC_USER; // From, To (register) vc_userprofile.publUsername := "as1"; vc_userprofile.qop := ""; // Authorization vc_userprofile.privUsername := ""; // Authorization vc_userprofile.passwd := ""; // Authorization vc_userprofile.registrarDomain := ""; // Authorization } case (c_userProfile_AS2) { //variant c_userProfile_AS2 Loading Loading @@ -753,7 +841,7 @@ module LibIms_Steps function f_initSipUrl(in integer p_user) runs on ImsComponent return SipUrl { var SipUrl p_sipUrl := { var SipUrl v_sipUrl := { scheme := c_sipScheme, // contains "sip" components := { sip:= { userInfo := omit, Loading @@ -761,88 +849,96 @@ module LibIms_Steps urlParameters := omit, headers := omit}; var SipUrl v_urnUrl := { scheme := c_urnScheme, // contains "urn" components := { urn:= { namespaceId := "service", namespaceSpecificString := "sos"}}, urlParameters := omit, headers := omit}; select(p_user){ case (c_userProfile_UE1atSUThome) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE1_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE1_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE1_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE1_HOME_DOMAIN, portField :=omit} } case (c_userProfile_UE2atSUThome) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE2_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE2_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE2_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE2_HOME_DOMAIN, portField :=omit} } case (c_userProfile_UE3atSUThome) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE3_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE3_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE3_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE3_HOME_DOMAIN, portField :=omit} } case (c_userProfile_UE4atSUThome) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE4_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE4_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE4_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE4_HOME_DOMAIN, portField :=omit} } case (c_userProfile_IBCFwithHomeUE) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_IMS1UE_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_IMS1UE_HOME_DOMAIN, portField :=omit} } case (c_userProfile_ICSCFwithHomeUE) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_IMS1UE_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_IMS1UE_HOME_DOMAIN, portField :=omit} } case (c_userProfile_PCSCFwithHomeUE) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_PCSCF_IPADDR, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_PCSCF_IPADDR, portField :=omit} } case (c_userProfile_SCSCFwithHomeUE) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE4_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_SCSCF_HOME_DOMAIN, portField :=PX_IMS_TS_SCSCF_PORT} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE4_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_SCSCF_HOME_DOMAIN, portField :=PX_IMS_TS_SCSCF_PORT} } case (c_userProfile_SCSCFwithHomeUE_domain) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE4_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_SCSCF_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE4_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_SCSCF_HOME_DOMAIN, portField :=omit} } case (c_userProfile_AS1) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_AS1_IPADDR, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_AS1_IPADDR, portField :=omit} } case (c_userProfile_ECSCFwithHomeUE) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_ECSCF_IPADDR, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_ECSCF_IPADDR, portField :=omit} } case (c_userProfile_ISUP) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_ISUP_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_ISUP_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_ISUP_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_ISUP_HOME_DOMAIN, portField :=omit} } case (c_serviceProfile_EMERGENCY) { p_sipUrl.scheme := c_urnScheme; p_sipUrl.components.urn.namespaceId := PX_IMS_SUT_EMERGENCY_SERVICE_namespaceId; p_sipUrl.components.urn.namespaceId := PX_IMS_SUT_EMERGENCY_SERVICE_namespaceSpecificString; //p_sipUrl.hostPort := {host := PX_IMS_SUT_EMERGENCY_HOME_DOMAIN, portField :=omit} v_urnUrl.components.urn.namespaceId := PX_IMS_SUT_EMERGENCY_SERVICE_namespaceId; v_urnUrl.components.urn.namespaceSpecificString := PX_IMS_SUT_EMERGENCY_SERVICE_namespaceSpecificString; } case (c_serviceProfile_EMERGENCY_INVALID) { p_sipUrl.scheme := c_urnScheme; p_sipUrl.components.urn.namespaceId := PX_IMS_SUT_EMERGENCY_SERVICE_INVALID_namespaceId; p_sipUrl.components.urn.namespaceId := PX_IMS_SUT_EMERGENCY_SERVICE_INVALID_namespaceSpecificString; v_urnUrl.components.urn.namespaceId := PX_IMS_SUT_EMERGENCY_SERVICE_INVALID_namespaceId; v_urnUrl.components.urn.namespaceSpecificString := PX_IMS_SUT_EMERGENCY_SERVICE_INVALID_namespaceSpecificString; } // following setting is used for the assignment of the Path header field case (c_interfaceProfile_IMS_SUT_PCSCF1) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:="", password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_PCSCF1_HOME_DOMAIN, portField :=PX_IMS_SUT_PCSCF1_PORT} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:="", password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_PCSCF1_HOME_DOMAIN, portField :=PX_IMS_SUT_PCSCF1_PORT} } // following setting is used in relation to the route headers list elements case (c_interfaceSIPURL_IMS_SUT_PCSCF1_domain) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:="", password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_PCSCF1_HOME_DOMAIN, portField :=PX_IMS_SUT_PCSCF1_PORT} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:="", password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_PCSCF1_HOME_DOMAIN, portField :=PX_IMS_SUT_PCSCF1_PORT} } case (c_interfaceSIPURL_IMS_SUT_PCSCF1_ip) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:="", password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_PCSCF1_IPADDR, portField :=PX_IMS_SUT_PCSCF1_PORT} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:="", password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_PCSCF1_IPADDR, portField :=PX_IMS_SUT_PCSCF1_PORT} } case (c_conferenceProfile_factoryURI) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_CONF_FACTORY_NAME, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_CONF_HOME_DOMAIN, portField := omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_CONF_FACTORY_NAME, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_CONF_HOME_DOMAIN, portField := omit} } }; return(p_sipUrl) if(p_user == c_serviceProfile_EMERGENCY or p_user == c_serviceProfile_EMERGENCY_INVALID) {return(v_urnUrl)} else {return(v_sipUrl)} } Loading Loading @@ -903,6 +999,17 @@ module LibIms_Steps } } /* * * @desc retrieves user DomainPort value of the interface profile * @param p_interface identifies the selected interface * @return DomainPort template */ function f_get_userDomainPort (in SipUserProfile p_userProfile) runs on ImsComponent return /*template*/ HostPort { return {p_userProfile.homeDomain, p_userProfile.currPort} } /* * * @desc retrieves HostPort value of the interface profile Loading Loading @@ -1151,9 +1258,10 @@ module LibIms_Steps * @param p_cSeq_s cseq parameter * @param p_register register template */ function f_IMS_preamble_withRegistration (in integer p_userprofile, inout CSeq p_cSeq_s, template REGISTER_Request p_register) runs on ImsComponent function f_IMS_preamble_withRegistration (in integer p_userprofile, in integer p_interface, inout CSeq p_cSeq_s, template REGISTER_Request p_register) runs on ImsComponent { f_init_interfaceprofile(p_interface); //Variables & defaults initialization f_IMS_preamble_woRegistration(p_userprofile, p_cSeq_s); Loading @@ -1175,9 +1283,9 @@ module LibIms_Steps * @param p_userprofile user profile of call * @param p_cSeq_s cseq parameter */ function f_IMS_preamble_withRegistrationBasic (in integer p_userprofile, inout CSeq p_cSeq_s) runs on ImsComponent function f_IMS_preamble_withRegistrationBasic (in integer p_userprofile,in integer p_interface, inout CSeq p_cSeq_s) runs on ImsComponent { f_init_interfaceprofile(p_interface); //Variables & defaults initialization f_IMS_preamble_woRegistration(p_userprofile, p_cSeq_s); Loading @@ -1187,6 +1295,32 @@ module LibIms_Steps f_Subscription(p_cSeq_s, m_SUBSCRIBE_Request_UE(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via, vc_contact, vc_route_REG)); } /* * * @desc Sets variables and default initialization for user profile and handle registration and authentication with MD5 * (basic registration template) * @param p_userprofile user profile of call * @param p_cSeq_s cseq parameter */ function f_IMS_preamble_AS (in integer p_userprofile, in integer p_interface, inout CSeq p_cSeq_s) runs on ImsComponent { // avoid deregistration in default behavior vc_DeregDone := true; vc_boo_route := true; vc_boo_recordRoute := true; vc_cSeq := p_cSeq_s; //Defaults vc_def_catchSyncStop := activate(a_Sip_catchSyncStop()); vc_default := activate (a_altstep_AS()); //Preamble f_init_interfaceprofile(p_interface); f_init_userprofile(p_userprofile); // assignment of PIXIT values to component variable vc_sdp_local := valueof(m_SDP_bandwidth(valueof(m_media_dynPT(PX_SIP_SDP_dyn, PX_SIP_SDP_encoding)), vc_userprofile)); vc_contact := valueof(m_Contact(m_SipUrl_contactIpaddr(vc_userprofile))); } } // end group preambles group postambles { Loading @@ -1202,6 +1336,18 @@ module LibIms_Steps f_terminate_component(); } /* * * @desc Sets variables and default initialization for user profile and handle deregistration on AS as TS * @param p_cSeq_s cseq parameter */ function f_IMS_postamble_AS_withDeRegistration (boolean p_deRegistration) runs on ImsComponent { if(p_deRegistration == true) {f_awaitingREGISTER_sendReply(mw_REGISTER_Request_Base,true);} f_terminate_component(); } function f_SIP_postamble_IMS1_withoutRegistration () runs on ImsComponent {f_terminate_component()}; Loading Loading @@ -1556,5 +1702,48 @@ module LibIms_Steps f_componentStop(); } } /** * * @desc main default altstep to handle unexpected messages and timeout * @verdict fail for all unexpected branches */ altstep a_altstep_AS() runs on SipComponent { var Response v_response; var Request v_request; [] any timer.timeout { setverdict(fail); all timer.stop; } // allow repeated INVITEs [vc_ignore_invite] SIPP.receive(mw_INVITE_Request_Base) { repeat } //handle REGISTER requests [] SIPP.receive(mw_REGISTER_Request_Base)-> value v_request sender vc_sent_label { f_setHeadersOnReceiptOfREGISTER(v_request); //vc_contact := vc_request.msgHeader.contact; f_sendResponse(m_Response_Contact(c_statusLine200,vc_callId, vc_cSeq,vc_caller_From, vc_caller_To, vc_via, vc_contact)); repeat; } // according to SIP chap.8.1.3.2 [] SIPP.receive(mw_Response_Base(c_statusLine183,vc_callId, vc_cSeq)) { repeat; } // any [] SIPP.receive { setverdict(fail); all timer.stop; } } } } // module LibIms_Steps No newline at end of file ttcn/LibIms_Templates.ttcn +54 −3 Original line number Diff line number Diff line Loading @@ -245,6 +245,14 @@ group HeaderFieldTemplates{ {id:=c_orig_ioi, paramValue := p_homeDomain}} }; template PChargingVector m_pChargingVector_accessNetwInfo(charstring p_homeDomain) := { fieldName := P_CHARGING_VECTOR_E, chargeParams := {{id:=c_icid, paramValue :=c_icid_value}, {id:=c_term_ioi, paramValue := p_homeDomain}, {id:=c_access_network_charging_info, paramValue := "192.1.1.10"}} }; template PChargingVector mw_pChargingVector(template charstring p_id, template charstring p_paramValue) := { fieldName := P_CHARGING_VECTOR_E, Loading Loading @@ -453,8 +461,8 @@ group HeaderFieldTemplates{ template SemicolonParam_List mw_challenge := superset(mw_ck,mw_ik); // template SemicolonParam_List mw_challenge := {mw_ck,mw_ik}; template GenericParam mw_ck := {"ck",*}; template GenericParam mw_ik := {"ik",*} template GenericParam mw_ck := {"ck"}; template GenericParam mw_ik := {"ik"} /* Loading Loading @@ -1311,6 +1319,15 @@ group modified_templates { group request_send { template ACK_Request m_ACK_Request_AS (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Route p_route, template RecordRoute p_recordRoute ) modifies m_ACK_Request_Base := { msgHeader := { route := p_route, recordRoute := p_recordRoute } } template ACK_Request m_ACK_Request_IMS (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Route p_route) modifies m_ACK_Request_Base := Loading @@ -1321,6 +1338,20 @@ group request_send { } } template ACK_Request m_ACK_Request_sdp_IMS (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via,template MessageBody p_mb, template Route p_route) modifies m_ACK_Request_Base := { msgHeader := { contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication}, route := p_route }, messageBody := p_mb } template BYE_Request m_BYE_Request_IMS ( SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Route p_route) Loading Loading @@ -2825,6 +2856,16 @@ group response_send messageBody := p_mb } template Response m_Response_18XonINVITE_AS (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, Contact p_contact, template RecordRoute p_recordRoute ) modifies m_Response_Base:= { msgHeader := { contact := p_contact, recordRoute := p_recordRoute } } template Response m_Response_18XonINVITE_UE (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, Contact p_contact ) modifies m_Response_Base:= { Loading Loading @@ -3539,6 +3580,16 @@ group response_receive } } template Response mw_Response_PchargingFunctionAddr(template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template PChargingFunctionAddresses p_chargingFunctionAddresses) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { pChargingFunctionAddresses := p_chargingFunctionAddresses } } } // end response_receive }//end modified_templates Loading Loading
ttcn/LibIms_Steps.ttcn +260 −71 Original line number Diff line number Diff line Loading @@ -24,9 +24,70 @@ module LibIms_Steps import from LibIms_SIPTypesAndValues all; group externalfunctions { } }//end group externalfunctions group parameterOperations { /** * * @desc functions add new via parameter * @param p_message (request) SIP message to be used to prepair via header * @param p_userprofile user profile */ function f_addNewViaParameter(in Request p_message, in integer p_userprofile) runs on ImsComponent { var integer v_intVia; var integer i := 0; if (ispresent(p_message.msgHeader.via)) { v_intVia := sizeof(p_message.msgHeader.via.viaBody); while (i < v_intVia) { p_message.msgHeader.via.viaBody[v_intVia] := p_message.msgHeader.via.viaBody[v_intVia-1]; v_intVia := v_intVia - 1; } vc_branch := c_branchCookie & f_getRndTag(); p_message.msgHeader.via.viaBody[0] := valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile)); vc_via := p_message.msgHeader.via; } } /** * * @desc functions add new via parameter * @param p_message (request) SIP message to be used to prepair via header * @param p_userprofile user profile */ function f_addNewRecordRouteAndRemoveRoutParameter(in Request p_message) runs on ImsComponent { var integer v_intRoute,v_intRecordRoute; var integer i := 1; var integer j := 0; var RouteBody v_route1; var Route v_newRoute; v_newRoute.fieldName := ROUTE_E; if (ispresent(p_message.msgHeader.route)) { v_intRoute := sizeof(p_message.msgHeader.route.routeBody); v_route1 := p_message.msgHeader.route.routeBody[0]; while (i < v_intRoute) { v_newRoute.routeBody[i-1] := p_message.msgHeader.route.routeBody[i]; i := i + 1; } vc_route := v_newRoute; } if (ispresent(p_message.msgHeader.recordRoute)) { v_intRecordRoute := sizeof(p_message.msgHeader.recordRoute.routeBody); while (j < v_intRecordRoute) { p_message.msgHeader.recordRoute.routeBody[v_intRecordRoute] := p_message.msgHeader.recordRoute.routeBody[v_intRecordRoute-1]; v_intRecordRoute := v_intRecordRoute - 1; } p_message.msgHeader.recordRoute.routeBody[0] := v_route1; vc_recordRoute := p_message.msgHeader.recordRoute; } } }//end group parameterOperations group fieldOperations { /* Loading Loading @@ -68,20 +129,29 @@ module LibIms_Steps }// end f_setHeadersCANCEL /** * * @desc sets headers for forward request from AS in case if AS acts as Proxy * @param p_proxyMode true = proxyMode, false = B2BMode */ function f_setHeadersForwardRequestFromAS (inout CSeq p_cSeq_s) runs on ImsComponent function f_setHeadersForwardRequestFromAS (inout CSeq p_cSeq_s, boolean p_proxyMode) runs on ImsComponent { var Request v_request; v_request := vc_request; vc_via := v_request.msgHeader.via; // TODO via header need to be adapted due to standards vc_route := v_request.msgHeader.route; // TODO route header need to be adapted due to standards if (p_proxyMode) { vc_requestUri2 := v_request.requestLine.requestUri; vc_to := v_request.msgHeader.toField; vc_contact := v_request.msgHeader.contact; f_addNewViaParameter(v_request, c_userProfile_AS1); f_addNewRecordRouteAndRemoveRoutParameter(v_request); } else { //B2Bmode vc_contact := valueof(m_Contact(m_SipUrl_contactIpaddr(vc_userprofile))); vc_callId := { fieldName:=CALL_ID_E, callid:=f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr }; } }// end function f_setHeadersForwardRequest /** Loading Loading @@ -266,12 +336,16 @@ module LibIms_Steps * @param p_cSeq_s current cSeq * @param p_orginatingSide true in case of Re-INVITE is send from the orgination endpoint otherwise false. */ function f_setHeadersReINVITE (inout CSeq p_cSeq_s, in boolean p_orginatingSide) runs on ImsComponent function f_setHeadersReINVITE (inout CSeq p_cSeq_s, in boolean p_orginatingSide, in integer p_to_user) runs on ImsComponent { var integer v_tmp; f_setHeadersGeneral(p_cSeq_s, "INVITE"); // cseq, contact, branch, via vc_reqHostPort := vc_requestUri.components.sip.hostPort; vc_requestUri := f_initSipUrl(p_to_user); if(p_orginatingSide) { vc_to := vc_caller_To; vc_from := vc_caller_From; Loading @@ -281,6 +355,11 @@ module LibIms_Steps vc_from := vc_callee_From; } v_tmp := str2int(vc_sdp_local.origin.session_id); vc_sdp_local.origin.session_id := int2str(v_tmp + 1); v_tmp := str2int(vc_sdp_local.origin.session_version); vc_sdp_local.origin.session_version := int2str(v_tmp + 1); }// end function f_setHeadersReINVITE /** Loading Loading @@ -696,7 +775,16 @@ module LibIms_Steps case (c_userProfile_AS1) { //variant c_userProfile_AS1 vc_userprofile.currPort := PX_IMS_TS_AS1_PORT; // via, route(Isc interface of TS) vc_userprofile.currIpaddr := PX_IMS_TS_AS1_IPADDR; // via, route vc_userprofile.homeDomain := PX_IMS_TS_AS1_HOME_DOMAIN; // via, route vc_userprofile.contactPort := PX_IMS_TS_AS1_PORT; // contact (simulated UE) vc_userprofile.contactIpaddr := PX_IMS_TS_AS1_IPADDR; // contact vc_userprofile.bearerIpaddr := PX_IMS_SUT_UE1_BEARER_IPADDR; vc_userprofile.homeDomain := PX_IMS_TS_AS1_HOME_DOMAIN; // via, routevc_userprofile.publUsername := PX_IMS_SUT_UE4_PUBLIC_USER; // From, To (register) vc_userprofile.publUsername := "as1"; vc_userprofile.qop := ""; // Authorization vc_userprofile.privUsername := ""; // Authorization vc_userprofile.passwd := ""; // Authorization vc_userprofile.registrarDomain := ""; // Authorization } case (c_userProfile_AS2) { //variant c_userProfile_AS2 Loading Loading @@ -753,7 +841,7 @@ module LibIms_Steps function f_initSipUrl(in integer p_user) runs on ImsComponent return SipUrl { var SipUrl p_sipUrl := { var SipUrl v_sipUrl := { scheme := c_sipScheme, // contains "sip" components := { sip:= { userInfo := omit, Loading @@ -761,88 +849,96 @@ module LibIms_Steps urlParameters := omit, headers := omit}; var SipUrl v_urnUrl := { scheme := c_urnScheme, // contains "urn" components := { urn:= { namespaceId := "service", namespaceSpecificString := "sos"}}, urlParameters := omit, headers := omit}; select(p_user){ case (c_userProfile_UE1atSUThome) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE1_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE1_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE1_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE1_HOME_DOMAIN, portField :=omit} } case (c_userProfile_UE2atSUThome) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE2_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE2_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE2_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE2_HOME_DOMAIN, portField :=omit} } case (c_userProfile_UE3atSUThome) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE3_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE3_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE3_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE3_HOME_DOMAIN, portField :=omit} } case (c_userProfile_UE4atSUThome) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE4_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE4_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE4_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_UE4_HOME_DOMAIN, portField :=omit} } case (c_userProfile_IBCFwithHomeUE) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_IMS1UE_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_IMS1UE_HOME_DOMAIN, portField :=omit} } case (c_userProfile_ICSCFwithHomeUE) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_IMS1UE_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_IMS1UE_HOME_DOMAIN, portField :=omit} } case (c_userProfile_PCSCFwithHomeUE) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_PCSCF_IPADDR, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_PCSCF_IPADDR, portField :=omit} } case (c_userProfile_SCSCFwithHomeUE) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE4_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_SCSCF_HOME_DOMAIN, portField :=PX_IMS_TS_SCSCF_PORT} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE4_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_SCSCF_HOME_DOMAIN, portField :=PX_IMS_TS_SCSCF_PORT} } case (c_userProfile_SCSCFwithHomeUE_domain) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE4_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_SCSCF_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_UE4_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_SCSCF_HOME_DOMAIN, portField :=omit} } case (c_userProfile_AS1) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_AS1_IPADDR, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_AS1_IPADDR, portField :=omit} } case (c_userProfile_ECSCFwithHomeUE) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_ECSCF_IPADDR, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_IMS1UE_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_ECSCF_IPADDR, portField :=omit} } case (c_userProfile_ISUP) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_ISUP_PUBLIC_USER, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_ISUP_HOME_DOMAIN, portField :=omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_TS_ISUP_PUBLIC_USER, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_TS_ISUP_HOME_DOMAIN, portField :=omit} } case (c_serviceProfile_EMERGENCY) { p_sipUrl.scheme := c_urnScheme; p_sipUrl.components.urn.namespaceId := PX_IMS_SUT_EMERGENCY_SERVICE_namespaceId; p_sipUrl.components.urn.namespaceId := PX_IMS_SUT_EMERGENCY_SERVICE_namespaceSpecificString; //p_sipUrl.hostPort := {host := PX_IMS_SUT_EMERGENCY_HOME_DOMAIN, portField :=omit} v_urnUrl.components.urn.namespaceId := PX_IMS_SUT_EMERGENCY_SERVICE_namespaceId; v_urnUrl.components.urn.namespaceSpecificString := PX_IMS_SUT_EMERGENCY_SERVICE_namespaceSpecificString; } case (c_serviceProfile_EMERGENCY_INVALID) { p_sipUrl.scheme := c_urnScheme; p_sipUrl.components.urn.namespaceId := PX_IMS_SUT_EMERGENCY_SERVICE_INVALID_namespaceId; p_sipUrl.components.urn.namespaceId := PX_IMS_SUT_EMERGENCY_SERVICE_INVALID_namespaceSpecificString; v_urnUrl.components.urn.namespaceId := PX_IMS_SUT_EMERGENCY_SERVICE_INVALID_namespaceId; v_urnUrl.components.urn.namespaceSpecificString := PX_IMS_SUT_EMERGENCY_SERVICE_INVALID_namespaceSpecificString; } // following setting is used for the assignment of the Path header field case (c_interfaceProfile_IMS_SUT_PCSCF1) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:="", password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_PCSCF1_HOME_DOMAIN, portField :=PX_IMS_SUT_PCSCF1_PORT} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:="", password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_PCSCF1_HOME_DOMAIN, portField :=PX_IMS_SUT_PCSCF1_PORT} } // following setting is used in relation to the route headers list elements case (c_interfaceSIPURL_IMS_SUT_PCSCF1_domain) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:="", password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_PCSCF1_HOME_DOMAIN, portField :=PX_IMS_SUT_PCSCF1_PORT} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:="", password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_PCSCF1_HOME_DOMAIN, portField :=PX_IMS_SUT_PCSCF1_PORT} } case (c_interfaceSIPURL_IMS_SUT_PCSCF1_ip) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:="", password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_PCSCF1_IPADDR, portField :=PX_IMS_SUT_PCSCF1_PORT} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:="", password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_PCSCF1_IPADDR, portField :=PX_IMS_SUT_PCSCF1_PORT} } case (c_conferenceProfile_factoryURI) { p_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_CONF_FACTORY_NAME, password:=omit}; p_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_CONF_HOME_DOMAIN, portField := omit} v_sipUrl.components.sip.userInfo := {userOrTelephoneSubscriber:=PX_IMS_SUT_CONF_FACTORY_NAME, password:=omit}; v_sipUrl.components.sip.hostPort := {host := PX_IMS_SUT_CONF_HOME_DOMAIN, portField := omit} } }; return(p_sipUrl) if(p_user == c_serviceProfile_EMERGENCY or p_user == c_serviceProfile_EMERGENCY_INVALID) {return(v_urnUrl)} else {return(v_sipUrl)} } Loading Loading @@ -903,6 +999,17 @@ module LibIms_Steps } } /* * * @desc retrieves user DomainPort value of the interface profile * @param p_interface identifies the selected interface * @return DomainPort template */ function f_get_userDomainPort (in SipUserProfile p_userProfile) runs on ImsComponent return /*template*/ HostPort { return {p_userProfile.homeDomain, p_userProfile.currPort} } /* * * @desc retrieves HostPort value of the interface profile Loading Loading @@ -1151,9 +1258,10 @@ module LibIms_Steps * @param p_cSeq_s cseq parameter * @param p_register register template */ function f_IMS_preamble_withRegistration (in integer p_userprofile, inout CSeq p_cSeq_s, template REGISTER_Request p_register) runs on ImsComponent function f_IMS_preamble_withRegistration (in integer p_userprofile, in integer p_interface, inout CSeq p_cSeq_s, template REGISTER_Request p_register) runs on ImsComponent { f_init_interfaceprofile(p_interface); //Variables & defaults initialization f_IMS_preamble_woRegistration(p_userprofile, p_cSeq_s); Loading @@ -1175,9 +1283,9 @@ module LibIms_Steps * @param p_userprofile user profile of call * @param p_cSeq_s cseq parameter */ function f_IMS_preamble_withRegistrationBasic (in integer p_userprofile, inout CSeq p_cSeq_s) runs on ImsComponent function f_IMS_preamble_withRegistrationBasic (in integer p_userprofile,in integer p_interface, inout CSeq p_cSeq_s) runs on ImsComponent { f_init_interfaceprofile(p_interface); //Variables & defaults initialization f_IMS_preamble_woRegistration(p_userprofile, p_cSeq_s); Loading @@ -1187,6 +1295,32 @@ module LibIms_Steps f_Subscription(p_cSeq_s, m_SUBSCRIBE_Request_UE(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via, vc_contact, vc_route_REG)); } /* * * @desc Sets variables and default initialization for user profile and handle registration and authentication with MD5 * (basic registration template) * @param p_userprofile user profile of call * @param p_cSeq_s cseq parameter */ function f_IMS_preamble_AS (in integer p_userprofile, in integer p_interface, inout CSeq p_cSeq_s) runs on ImsComponent { // avoid deregistration in default behavior vc_DeregDone := true; vc_boo_route := true; vc_boo_recordRoute := true; vc_cSeq := p_cSeq_s; //Defaults vc_def_catchSyncStop := activate(a_Sip_catchSyncStop()); vc_default := activate (a_altstep_AS()); //Preamble f_init_interfaceprofile(p_interface); f_init_userprofile(p_userprofile); // assignment of PIXIT values to component variable vc_sdp_local := valueof(m_SDP_bandwidth(valueof(m_media_dynPT(PX_SIP_SDP_dyn, PX_SIP_SDP_encoding)), vc_userprofile)); vc_contact := valueof(m_Contact(m_SipUrl_contactIpaddr(vc_userprofile))); } } // end group preambles group postambles { Loading @@ -1202,6 +1336,18 @@ module LibIms_Steps f_terminate_component(); } /* * * @desc Sets variables and default initialization for user profile and handle deregistration on AS as TS * @param p_cSeq_s cseq parameter */ function f_IMS_postamble_AS_withDeRegistration (boolean p_deRegistration) runs on ImsComponent { if(p_deRegistration == true) {f_awaitingREGISTER_sendReply(mw_REGISTER_Request_Base,true);} f_terminate_component(); } function f_SIP_postamble_IMS1_withoutRegistration () runs on ImsComponent {f_terminate_component()}; Loading Loading @@ -1556,5 +1702,48 @@ module LibIms_Steps f_componentStop(); } } /** * * @desc main default altstep to handle unexpected messages and timeout * @verdict fail for all unexpected branches */ altstep a_altstep_AS() runs on SipComponent { var Response v_response; var Request v_request; [] any timer.timeout { setverdict(fail); all timer.stop; } // allow repeated INVITEs [vc_ignore_invite] SIPP.receive(mw_INVITE_Request_Base) { repeat } //handle REGISTER requests [] SIPP.receive(mw_REGISTER_Request_Base)-> value v_request sender vc_sent_label { f_setHeadersOnReceiptOfREGISTER(v_request); //vc_contact := vc_request.msgHeader.contact; f_sendResponse(m_Response_Contact(c_statusLine200,vc_callId, vc_cSeq,vc_caller_From, vc_caller_To, vc_via, vc_contact)); repeat; } // according to SIP chap.8.1.3.2 [] SIPP.receive(mw_Response_Base(c_statusLine183,vc_callId, vc_cSeq)) { repeat; } // any [] SIPP.receive { setverdict(fail); all timer.stop; } } } } // module LibIms_Steps No newline at end of file
ttcn/LibIms_Templates.ttcn +54 −3 Original line number Diff line number Diff line Loading @@ -245,6 +245,14 @@ group HeaderFieldTemplates{ {id:=c_orig_ioi, paramValue := p_homeDomain}} }; template PChargingVector m_pChargingVector_accessNetwInfo(charstring p_homeDomain) := { fieldName := P_CHARGING_VECTOR_E, chargeParams := {{id:=c_icid, paramValue :=c_icid_value}, {id:=c_term_ioi, paramValue := p_homeDomain}, {id:=c_access_network_charging_info, paramValue := "192.1.1.10"}} }; template PChargingVector mw_pChargingVector(template charstring p_id, template charstring p_paramValue) := { fieldName := P_CHARGING_VECTOR_E, Loading Loading @@ -453,8 +461,8 @@ group HeaderFieldTemplates{ template SemicolonParam_List mw_challenge := superset(mw_ck,mw_ik); // template SemicolonParam_List mw_challenge := {mw_ck,mw_ik}; template GenericParam mw_ck := {"ck",*}; template GenericParam mw_ik := {"ik",*} template GenericParam mw_ck := {"ck"}; template GenericParam mw_ik := {"ik"} /* Loading Loading @@ -1311,6 +1319,15 @@ group modified_templates { group request_send { template ACK_Request m_ACK_Request_AS (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Route p_route, template RecordRoute p_recordRoute ) modifies m_ACK_Request_Base := { msgHeader := { route := p_route, recordRoute := p_recordRoute } } template ACK_Request m_ACK_Request_IMS (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Route p_route) modifies m_ACK_Request_Base := Loading @@ -1321,6 +1338,20 @@ group request_send { } } template ACK_Request m_ACK_Request_sdp_IMS (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via,template MessageBody p_mb, template Route p_route) modifies m_ACK_Request_Base := { msgHeader := { contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication}, route := p_route }, messageBody := p_mb } template BYE_Request m_BYE_Request_IMS ( SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Route p_route) Loading Loading @@ -2825,6 +2856,16 @@ group response_send messageBody := p_mb } template Response m_Response_18XonINVITE_AS (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, Contact p_contact, template RecordRoute p_recordRoute ) modifies m_Response_Base:= { msgHeader := { contact := p_contact, recordRoute := p_recordRoute } } template Response m_Response_18XonINVITE_UE (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, Contact p_contact ) modifies m_Response_Base:= { Loading Loading @@ -3539,6 +3580,16 @@ group response_receive } } template Response mw_Response_PchargingFunctionAddr(template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template PChargingFunctionAddresses p_chargingFunctionAddresses) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { pChargingFunctionAddresses := p_chargingFunctionAddresses } } } // end response_receive }//end modified_templates Loading