/* * @author STF 346, STF366, STF368, STF369 * @version $Id: LibSip_Templates.ttcn 380 2009-07-23 14:59:16Z rennoch $ * @desc This module defines SIP Templates for message, header, and * structured types.
* Note that any changes made to the definitions in this module * may be overwritten by future releases of this library * End users are encouraged to contact the distributers of this * module regarding their modifications or additions * @remark Any additions to the templates shall follow the design rules * and always modify base templates only; * Existing templates shall not be changed or removed - * change requests shall be made to http://t-ort.etsi.org */ module LibSip_Templates { //LibSip import from LibSip_SIPTypesAndValues all; import from LibSip_SDPTypes all; import from LibSip_Interface all; import from LibSip_PIXITS all; import from LibSip_XMLTypes all; group ModuleParameters { modulepar boolean MB_LENGTH_FROM_ENCVAL:=true; //* to get length of message body from ecoded value modulepar boolean USE_FX_FOR_XML_LENGTH:=true; //* To use external functions for calculation of XML message/body length }//* group ModuleParameters group SubFields { template Addr_Union m_AddrUnion_NameAddr(template NameAddr p_nameAddr) := { nameAddr := p_nameAddr } template Addr_Union m_AddrUnion_DisplayAndSipUrl(template charstring p_displayName, template SipUrl p_addrSpec) := { nameAddr := m_CallingAddr(p_displayName, p_addrSpec) } template NameAddr m_CallingAddr(template charstring p_displayName, template SipUrl p_addrSpec) := { displayName := p_displayName, addrSpec := p_addrSpec } template CommaParam_List mw_digestResponse(in GenericParam p_genericParam) := { *,p_genericParam,* //* c_Integrity_protected_yes } template SemicolonParam_List m_cpc := {{"cpc",PX_SIP_ISUP_CPC_VALUE}}; template SemicolonParam_List m_ReasonParams (template charstring p_cause, template charstring p_text) := {m_Cause(p_cause),m_Text(p_text)}; template ReasonValue m_ReasonValue (template charstring p_cause, template charstring p_text) := { token := "Q.850", reasonParams := m_ReasonParams(p_cause,p_text) }; template RouteBody mw_routeBody (template SipUrl p_sipurl):= { nameAddr := { displayName := *, addrSpec := p_sipurl }, rrParam := * } template SentProtocol m_SentProtocol (charstring p_protocol) := {protocolName := c_sipName, protocolVersion:= c_sipVersion, transport:= p_protocol}; template SipUrl m_SipUrl_currDomain(in SipUserProfile p_userprofile) := //* SIP-URL of the test system on SIP side { scheme := c_sipScheme, //* contains "sip" userInfo := //* optional { userOrTelephoneSubscriber := p_userprofile.publUsername,//* charstring password := omit //* optional charstring }, hostPort := { host := p_userprofile.homeDomain, //* hostname, IPv4 or IPv6 as a charstring portField := omit //* p_userprofile.currPort //* optional integer }, urlParameters := omit, headers := omit } template SipUrl m_SipUrl_contactIpaddr(in SipUserProfile p_userprofile) := //* SIP-URL of the test system on SIP side { scheme := c_sipScheme, //* contains "sip" userInfo := //* optional { userOrTelephoneSubscriber := p_userprofile.publUsername,//* charstring password := omit //* optional charstring }, hostPort := { host := p_userprofile.contactIpaddr, //* hostname, IPv4 or IPv6 as a charstring portField := p_userprofile.contactPort //* optional integer }, urlParameters := omit, headers := omit } template SipUrl m_SipUrl_contactIpaddrAndCpc(in SipUserProfile p_userprofile) := //* SIP-URL of the test system on SIP side { scheme := c_sipScheme, //* contains "sip" userInfo := //* optional { userOrTelephoneSubscriber := p_userprofile.publUsername & "; cpc=" & PX_SIP_ISUP_CPC_VALUE,//* charstring password := omit //* optional charstring }, hostPort := { host := p_userprofile.contactIpaddr, //* hostname, IPv4 or IPv6 as a charstring portField := p_userprofile.contactPort //* optional integer }, urlParameters := omit, headers := omit } template SipUrl m_SipUrl_currIpaddr(in SipUserProfile p_userprofile) := //* SIP-URL of the test system on SIP side { scheme := c_sipScheme, //* contains "sip" userInfo := //* optional { userOrTelephoneSubscriber := p_userprofile.publUsername,//* charstring password := omit //* optional charstring }, hostPort := { host := p_userprofile.currIpaddr, //* hostname, IPv4 or IPv6 as a charstring portField := p_userprofile.currPort //* optional integer }, urlParameters := omit, headers := omit } template SipUrl m_SipUrl_Anonymous := //* SIP-URL with a calles party number { scheme := c_sipScheme, //* contains "sip" userInfo := //* optional { userOrTelephoneSubscriber := "Anonymous",//* charstring password := omit //* optional charstring }, hostPort := { host := "Anonymous.invalid", //* hostname, IPv4 or IPv6 as a charstring portField := omit //* optional integer }, urlParameters := omit, headers := omit }; template SipUrl m_TelUrl_publUser(in SipUserProfile p_userprofile) := //* SIP-URL of the test system on SIP side { scheme := c_telScheme, //* contains "tel" userInfo := //* optional { userOrTelephoneSubscriber := p_userprofile.publUsername,//* charstring password := omit //* optional charstring }, hostPort := { host := omit, //* hostname, IPv4 or IPv6 as a charstring portField := omit //* p_userprofile.currPort //* optional integer }, urlParameters := omit, headers := omit } template SipUrl mw_TelSip_unavailableInvalidUri := { scheme := (c_telScheme,c_sipScheme), userInfo := {userOrTelephoneSubscriber:="unavailable", password:=omit}, hostPort := {host:="anonymous.invalid", portField:=c_defaultSipPort}, urlParameters := omit, headers := omit }; template SipUrl mw_TelSip_unavailableUri (charstring p_host):= { scheme := (c_telScheme,c_sipScheme), userInfo := {userOrTelephoneSubscriber:="unavailable", password:=omit}, hostPort := {host:=p_host, portField:=c_defaultSipPort}, urlParameters := omit, headers := omit }; template SipUrl mw_SipUrl_Number(charstring p_number) := //* SIP-URL with a calling party number { scheme := c_sipScheme, //* contains "sip" userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*}, hostPort := ?, urlParameters := *, headers := * }; template SipUrl mw_TelSipUrl_Number(template charstring p_number) := //* SIP-URL with a calling party number { scheme := (c_telScheme,c_sipScheme), //* contains "sip" or "tel" userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*}, //* nat or int format hostPort := ?, urlParameters := *, headers := * }; template SipUrl mw_SipUrl_Host(charstring p_host) := //* SIP-URL with a calling party number { scheme := c_sipScheme, //* contains "sip" userInfo:= {userOrTelephoneSubscriber:=?, password:=*}, hostPort := {host:=p_host, portField:=*}, urlParameters := *, headers := * }; template SipUrl mw_SipUrl_NumberHost(charstring p_number, charstring p_host) := //* SIP-URL with a calling party number { scheme := c_sipScheme, //* contains "sip" userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*}, hostPort := {host:=p_host, portField:=*}, urlParameters := *, headers := * }; template SipUrl mw_SipUrl_NumberHostParam(charstring p_number, charstring p_host, template SemicolonParam_List p_urlParameters) := //* SIP-URL with a calling party number { scheme := c_sipScheme, //* contains "sip" userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*}, hostPort := {host:=p_host, portField:=*}, urlParameters := p_urlParameters, headers := * }; template SipUrl m_SipUrl_NumberHostParam(charstring p_number, charstring p_host, template SemicolonParam_List p_urlParameters) := //* SIP-URL with a calling party number { scheme := c_sipScheme, //* contains "sip" userInfo:= {userOrTelephoneSubscriber:=p_number, password:=omit}, hostPort := {host:=p_host, portField:=c_defaultSipPort}, urlParameters := p_urlParameters, headers := omit }; template SipUrl mw_SipUrl_Anonymous := //* SIP-URL with a calles party number { scheme := c_sipScheme, //* contains "sip" userInfo := //* optional { userOrTelephoneSubscriber := "Anonymous",//* charstring password := omit //* optional charstring }, hostPort := { host := "anonymous.invalid", //* hostname, IPv4 or IPv6 as a charstring portField := * //* optional integer }, urlParameters := *, headers := * }; template SipUrl mw_SipUrl_urlParam(template SemicolonParam_List p_urlParameters) := //* SIP-URL with a calling party number { scheme := c_sipScheme, //* contains "sip" userInfo:= *, hostPort := *, urlParameters := p_urlParameters, headers := * }; template ContactAddress mw_ContactAddress := { addressField := ?, contactParams := * }; template HostPort mw_hostPort(template charstring p_host, template integer p_portField) := { host := p_host, portField := p_portField }; template StatusLine mw_statusLine1xx := {sipVersion := c_sipNameVersion, statusCode := (100..199), reasonPhrase := ?}; template StatusLine mw_statusLine4xx := {sipVersion := c_sipNameVersion, statusCode := (400..499), reasonPhrase := ?}; template StatusLine mw_statusLineFinal := {sipVersion := c_sipNameVersion, statusCode := (200..699), reasonPhrase := ?}; template NameAddr mw_NameAddr_DispName_User_Host(template charstring p_dn, template charstring p_user, template charstring p_host) := { displayName := p_dn, addrSpec := { scheme := c_sipScheme, //* contains "sip" userInfo := {userOrTelephoneSubscriber :=p_user, password := *}, hostPort := { host := p_host, //* hostname, IPv4 or IPv6 as a charstring portField := * //* optional integer }, urlParameters := {m_UserPhone}, headers := * } } template Addr_Union mw_AddrUnion_Nameaddr(template charstring p_dn, template charstring p_user, template charstring p_host):= { nameAddr:=mw_NameAddr_DispName_User_Host(p_dn,p_user,p_host) } template SipUrl mw_SipUrl_User_Host(template charstring p_user, template charstring p_host) := { scheme := c_sipScheme, //* contains "sip" userInfo := {userOrTelephoneSubscriber :=p_user, password := *}, hostPort := { host := p_host, //* hostname, IPv4 or IPv6 as a charstring portField := * //* optional integer }, urlParameters := {m_UserPhone}, headers := * } template Addr_Union mw_AddrUnion_SipUrl(template charstring p_user, template charstring p_host):= { addrSpecUnion:=mw_SipUrl_User_Host(p_user,p_host) } } //* end group Subfields group HeaderFieldTemplates { template Allow m_Allow (template Method_List p_methods) := { fieldName := ALLOW_E, methods := p_methods } template Allow mw_Allow (charstring p_method) := { fieldName := ALLOW_E, methods := superset(p_method) } template GenericParam m_Cause (template charstring p_cause):= {id:="cause", paramValue:=p_cause} template Authorization m_Authorization (template Credentials p_Credentials):= { fieldName := AUTHORIZATION_E, body := {p_Credentials} } template Authorization m_Authorization_digest (template CommaParam_List p_CommaParam_List):= { fieldName := AUTHORIZATION_E, body := {{digestResponse := p_CommaParam_List}} } template Authorization m_add_Authorization_digest (in Authorization p_auth, template CommaParam_List p_CommaParam_List):= { fieldName := AUTHORIZATION_E, body := {{digestResponse := f_merge_CommaParam_List(p_auth.body[0].digestResponse,valueof(p_CommaParam_List))}} } template Authorization m_Authorization_other := { fieldName := AUTHORIZATION_E, body := {{otherResponse := ?}} } template Contact m_Contact(template SipUrl p_sipUrl) := { fieldName := CONTACT_E, contactBody := { contactAddresses := { { addressField := { addrSpecUnion := p_sipUrl}, contactParams := omit } } } //* end contactBody }//* end m_Contact template Contact m_Contact_profile(in SipUserProfile p_userprofile) := { fieldName := CONTACT_E, contactBody := { contactAddresses := { { addressField := { addrSpecUnion := m_SipUrl_contactIpaddr(p_userprofile)}, contactParams := omit } } } //* end contactBody }//* end m_Contact template Contact m_Contact_profile_expires(in SipUserProfile p_userprofile, in charstring p_expires) := { fieldName := CONTACT_E, contactBody := { contactAddresses := { { addressField := { addrSpecUnion := m_SipUrl_contactIpaddr(p_userprofile)}, contactParams := {{"expires",p_expires}} } } } //* end contactBody }//* end m_Contact template From m_From(template NameAddr p_nameAddr, charstring p_tag_str) := { fieldName := FROM_E, addressField := {nameAddr := p_nameAddr},//* end addressField fromParams := {{id := c_tagId, paramValue := p_tag_str}} }; template From m_From_Anonymous(charstring p_tag_str) := { fieldName := FROM_E, addressField := {nameAddr := { displayName := "Anonymous", //* optional charstring addrSpec := m_SipUrl_Anonymous //* SipUrl }},//* end addressField fromParams := {{id := c_tagId, paramValue := p_tag_str}} }; template From m_From_SipUrl(template SipUrl p_sipUrl) := { fieldName := FROM_E, addressField := {nameAddr := { displayName := omit, //* optional charstring addrSpec := p_sipUrl //* SipUrl }},//* end addressField fromParams := omit }; template Event m_Event_refer := { fieldName := EVENT_E, eventType := "refer", eventParams := omit }; template Event m_Event_conference := { fieldName := EVENT_E, eventType := "conference", eventParams := omit }; template Event m_Event_presence := { fieldName := EVENT_E, eventType := "presence", eventParams := omit }; template Event m_Event_reg := { fieldName := EVENT_E, eventType := "reg", eventParams := omit }; template Expires m_Expires_600000 := { fieldName := EXPIRES_E, deltaSec := "600000" }; template Expires m_Expires (charstring p_deltaSec):= { fieldName := EXPIRES_E, deltaSec := p_deltaSec }; template PAssertedID m_PAssertedID(template Addr_Union p_pAssertedIDValue) := { fieldName := P_ASSERTED_ID_E, pAssertedIDValueList := {p_pAssertedIDValue} }; template HistoryInfo mw_HistoryInfo(template HistoryInfo_List p_HistoryInfo_List) := { fieldName := HISTORY_INFO_E, historyInfoList := p_HistoryInfo_List }; template HistoryInfoEntry mw_HistoryInfoEntry(template SipUrl p_Url, template IntegerList p_index, template SemicolonParam_List p_paramlist) := { nameAddr := {displayName:=*, addrSpec:= p_Url}, hiIndex := p_index, hiExtention := p_paramlist } template HistoryInfo m_HistoryInfo(template HistoryInfo_List p_HistoryInfo_List) := { fieldName := HISTORY_INFO_E, historyInfoList := p_HistoryInfo_List }; template HistoryInfoEntry m_HistoryInfoEntry(template SipUrl p_Url, template IntegerList p_index, template SemicolonParam_List p_paramlist) := { nameAddr := {displayName:=omit, addrSpec:= p_Url}, hiIndex := p_index, hiExtention := p_paramlist } template PAssertedID m_PAssertedID_2x(template Addr_Union p_pAssertedIDValue1, template Addr_Union p_pAssertedIDValue2) := { fieldName := P_ASSERTED_ID_E, pAssertedIDValueList := {p_pAssertedIDValue1, p_pAssertedIDValue2} }; template PAssertedID mw_PAssertedID(template PAssertedIDValue p_pAssertedIDValue) := { fieldName := P_ASSERTED_ID_E, pAssertedIDValueList := {p_pAssertedIDValue} }; template PAssertedIDValue mw_PAssertedIDValue(template SipUrl p_SipUrl) := { addrSpecUnion := p_SipUrl }; template PPreferredID m_PPreferredID(template Addr_Union p_pPreferredIDValue) := { fieldName := P_PREFERRED_ID_E, pPreferredIDValueList := {p_pPreferredIDValue} }; template Privacy m_Privacy(PrivacyValue p_privacy) := { fieldName := PRIVACY_E, privValueList := {p_privacy} }; template RAck m_RAck(integer p_responseNum, integer p_seqNumber, charstring p_method) := { fieldName := RACK_E, responseNum := p_responseNum, seqNumber := p_seqNumber, method := p_method }; template Reason m_Reason(integer p_cause) := { fieldName := REASON_E, reasonValues := {m_ReasonValue(int2str(p_cause),"dummy")} }; template Reason m_Reason21 := { fieldName := REASON_E, reasonValues := {m_ReasonValue(int2str(21),"call reject")} }; template RecordRoute m_recordRoute_currIpAddr (in SipUserProfile p_userprofile):= { fieldName := RECORD_ROUTE_E, routeBody := {{nameAddr := {displayName := omit, addrSpec := {scheme := c_sipScheme, //* contains "sip" userInfo := omit, hostPort := {host:=p_userprofile.currIpaddr, portField:= p_userprofile.currPort}, urlParameters := omit, headers := omit} }, rrParam := omit} }}; template ReferredBy m_ReferredBy_SipUrl(template SipUrl p_sipUrl) := { fieldName := REFERRED_BY_E, nameAddr :={displayName := omit, addrSpec:=p_sipUrl}, referredbyIdParams := omit } template ReferTo m_ReferTo_SipUrl(template SipUrl p_sipUrl, charstring p_method) := { fieldName := REFER_TO_E, nameAddr :={displayName := omit, addrSpec:=p_sipUrl}, referToParams := {{id:="method",paramValue :=p_method}} } template Replaces m_Replaces( charstring p_callId, charstring p_toTag, charstring p_fromTag ) := { fieldName := REPLACES_E, replacesParams := { {id := p_callId, paramValue := omit}, {id := "to-tag", paramValue := p_toTag}, {id := "from-tag", paramValue := p_fromTag} } } template Require m_Require_replaces := { fieldName := REQUIRE_E, optionsTags := {c_replaces} }; template Require m_Require_100rel := { fieldName := REQUIRE_E, optionsTags := {c_tag100rel} }; template Require m_Require_prec := { fieldName := REQUIRE_E, optionsTags := {c_tagPrecond} }; template Supported m_Supported_fromChange := { fieldName:=SUPPORTED_E, optionsTags:={c_tagFromChange} } template Supported m_Supported_prec := { fieldName:=SUPPORTED_E, optionsTags:={c_tagPrecond} } template Supported m_Supported_100rel := { fieldName:=SUPPORTED_E, optionsTags:={c_tag100rel} } template Supported m_Supported_100rel_prec := { fieldName:=SUPPORTED_E, optionsTags:={c_tag100rel, c_tagPrecond} } template GenericParam m_Text (template charstring p_text):= {id:="text", paramValue:=p_text} template GenericParam m_UserPhone := { id := "user", paramValue := "phone" } template GenericParam m_UserToUserEncodingHex := { id := "encoding", paramValue := "hex" } template UserToUser m_UserToUserData(template charstring p_U2UData):= { fieldName := USER_TO_USER_E, uuiData := p_U2UData, uuiParam := m_UserToUserEncodingHex } template To m_To(template SipUrl p_sipUrl) := { fieldName := TO_E, addressField := {nameAddr := { displayName := "ETSI Tester", //* optional charstring addrSpec := p_sipUrl //* SipUrl }},//* end addressField toParams := omit }; template To m_To_SipUrl(SipUrl p_sipUrl) := { fieldName := TO_E, addressField := {nameAddr := { displayName := omit, //* optional charstring addrSpec := p_sipUrl //* SipUrl }},//* end addressField toParams := omit }; template To mw_To_NameAddr_SipUrl(template charstring p_dn, template charstring p_user, template charstring p_host) := { fieldName := TO_E, addressField := (mw_AddrUnion_Nameaddr(p_dn,p_user,p_host),mw_AddrUnion_SipUrl(p_user,p_host)), toParams := * } template From mw_From(template SipUrl p_sipUrl) := { fieldName := FROM_E, addressField := { addrSpecUnion := p_sipUrl}, fromParams:= * } template From mw_From_NameAddr_SipUrl(template charstring p_dn, template charstring p_user, template charstring p_host) := { fieldName := FROM_E, addressField := (mw_AddrUnion_Nameaddr(p_dn,p_user,p_host),mw_AddrUnion_SipUrl(p_user,p_host)), fromParams := * } template ViaBody m_ViaBody_currIpaddr(charstring branch_val,in SipUserProfile p_userprofile) := { sentProtocol := m_SentProtocol(PX_SIP_TRANSPORT), sentBy:={host:=p_userprofile.currIpaddr, portField:= p_userprofile.currPort}, viaParams:={{id :=c_branchId,paramValue :=branch_val}} } template ViaBody mw_ViaBody_interface(template HostPort p_hostport) := { sentProtocol := m_SentProtocol(PX_SIP_TRANSPORT), sentBy:={host:=p_hostport.host, portField:= p_hostport.portField}, viaParams:=* } template Via mw_Via(template ViaBody p_viabody) := { fieldName := VIA_E, viaBody:= ? //* superset(p_viabody) } template CallId mw_CallId_any := { fieldName := CALL_ID_E, callid := ? } template Privacy mw_Privacy_id := { fieldName := PRIVACY_E, privValueList := {*,"id",*} }; template Privacy mw_Privacy_user := { fieldName := PRIVACY_E, privValueList := {*,"user",*} }; template Reason mw_Reason(integer p_cause) := { fieldName := REASON_E, reasonValues := {m_ReasonValue(int2str(p_cause),?)} }; template Require mw_Require_not_100rel := { fieldName := REQUIRE_E, optionsTags := superset(complement(c_tag100rel)) }; template Require mw_require_100rel := { fieldName := REQUIRE_E, optionsTags := superset(c_tag100rel) }; template RecordRoute mw_recordroute (template RouteBody p_routeBody):= { fieldName := RECORD_ROUTE_E, routeBody := ? //* superset(p_routeBody) }; template Route mw_route (template RouteBody_List p_routeBody):= { fieldName := ROUTE_E, routeBody := p_routeBody }; template Supported mw_Supported_100rel_prec := { fieldName:=SUPPORTED_E, optionsTags:= superset(c_tag100rel, c_tagPrecond) } template Supported mw_Supported_100rel := { fieldName:=SUPPORTED_E, optionsTags:= superset(c_tag100rel) } template Supported mw_Supported_fromChange := { fieldName:=SUPPORTED_E, optionsTags:= superset(c_tagFromChange) } template UserToUser mw_UserToUserData(template charstring p_U2UData):= { fieldName := USER_TO_USER_E, uuiData := p_U2UData, uuiParam := ? } template Contact mw_Contact_conference := { fieldName := CONTACT_E, contactBody := { contactAddresses := { { addressField := ?,//MRO contactParams := {{"isfocus",*}} } } } } template AlertInfo m_AlertInfo(charstring p_urn) := { fieldName := ALERT_INFO_E, alertInfoBody := {{p_urn, omit}} } template AlertInfo mw_AlertInfo(template charstring p_urn) := { fieldName := ALERT_INFO_E, alertInfoBody := superset({p_urn, omit}) } } //* end of group HeaderFieldTemplates group MessageTemplates { group dummy_templates { group dummy_parameter_send { template RequestLine m_requestLine_dummy(Method p_method) := { method := p_method, requestUri := c_empty_RequestUri, sipVersion := c_sipNameVersion } template MessageHeader m_msgHeader_dummy := { accept := omit, acceptContact := omit, acceptEncoding := omit, acceptLanguage := omit, alertInfo := omit, allow := omit, allowEvents := omit, //* RFC3265 authenticationInfo := omit, authorization := omit, callId := c_empty_CallId, callInfo := omit, contact := omit, contentDisposition := omit, contentEncoding := omit, contentLanguage := omit, contentLength := {fieldName := CONTENT_LENGTH_E, len:= 0}, contentType := omit, //* if message body present m, else not present cSeq := c_empty_cSeq, date := omit, errorInfo := omit, event := omit, //* RFC3265 expires := omit, fromField := c_empty_From, historyInfo := omit, //* RFC4244 inReplyTo := omit, maxForwards := c_maxForwards70, mimeVersion := omit, minExpires := omit, minSE := omit, //* RFC4028 organization := omit, pAccessNetworkInfo := omit, //* RFC3455 pAssertedID := omit, pAssertedService := omit, pAssociatedURI := omit, path := omit, //* RFC3327 pCalledPartyID := omit, //* RFC3455 pChargingFunctionAddresses := omit, //* RFC3455 pChargingVector := omit, //* RFC3455 pEarlyMedia := omit, //* RFC5009 pMediaAuthorization := omit, //* RFC3313 pPreferredID := omit, priority := omit, privacy := omit, proxyAuthenticate := omit, proxyAuthorization := omit, proxyRequire := omit, pVisitedNetworkID := omit, //* RFC3455 rAck := omit, rSeq := omit, reason := omit, recordRoute := omit, referredBy := omit, //* RFC3892 - REFER method referTo := omit, //* RFC3515 - REFER method replaces := omit, //* RFC3891 replyTo := omit, require := omit, retryAfter := omit, route := omit, securityClient := omit, //* RFC3329 securityServer := omit, //* RFC3329 securityVerify := omit, //* RFC3329 server := omit, serviceRoute := omit, //* RFC3608 sessionExpires := omit, //* RFC4028 subject := omit, subscriptionState := omit, //* RFC3265 supported := omit, timestamp := omit, toField := c_empty_To, unsupported := omit, userToUser := omit, userAgent := omit, via := c_empty_Via, warning := omit, wwwAuthenticate := omit, undefinedHeader_List := omit } } //* group dummy_parameter_send group dummy_parameter_receive { template RequestLine mw_requestLine_dummy(Method p_method) := { method := p_method, requestUri := ?, sipVersion := c_sipNameVersion } template MessageHeader mw_msgHeader_dummy := { accept := *, acceptContact := *, acceptEncoding := *, acceptLanguage := *, alertInfo := *, allow := *, allowEvents := *, //* RFC3265 authenticationInfo := *, authorization := *, callId := ?, callInfo := *, contact := *, contentDisposition := *, contentEncoding := *, contentLanguage := *, contentLength := ?, contentType := *, cSeq := ?, date := *, errorInfo := *, event := *, //* RFC3265 expires := *, fromField := ?, historyInfo := *, //* RFC4244 inReplyTo := *, maxForwards := ?, mimeVersion := *, minExpires := *, minSE := *, //* RFC4028 organization := *, pAccessNetworkInfo := *, //* RFC3455 pAssertedID := *, pAssertedService := *, pAssociatedURI := *, path := *, //* RFC3327 pCalledPartyID := *, //* RFC3455 pChargingFunctionAddresses := *, //* RFC3455 pChargingVector := *, //* RFC3455 pEarlyMedia := *, //* RFC5009 pMediaAuthorization := *, //* RFC3313 pPreferredID := *, priority := *, privacy := *, proxyAuthenticate := *, proxyAuthorization := *, proxyRequire := *, pVisitedNetworkID := *, //* RFC3455 rAck := *, rSeq := *, reason := *, recordRoute := *, referredBy := *, //* RFC3892 - REFER method referTo := *, //* RFC3515 - REFER method replaces := *, //* RFC 3891 replyTo := *, require := *, retryAfter := *, route := *, securityClient := *, //* RFC3329 securityServer := *, //* RFC3329 securityVerify := *, //* RFC3329 server := *, serviceRoute := *, //* RFC3608 sessionExpires := *, //* RFC4028 subject := *, subscriptionState := *, //* RFC3265 supported := *, timestamp := *, toField := ?, unsupported := *, userToUser := *, userAgent := *, via := ?, warning := *, wwwAuthenticate := *, undefinedHeader_List := * } }//* end group dummy_parameter_receive group dummy_request_templates_send { template ACK_Request m_ACK_Dummy := { requestLine := m_requestLine_dummy(ACK_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } template BYE_Request m_BYE_Dummy := { requestLine := m_requestLine_dummy(BYE_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } template CANCEL_Request m_CANCEL_Dummy := { requestLine := m_requestLine_dummy(CANCEL_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } template INFO_Request m_INFO_Dummy := { requestLine := m_requestLine_dummy(INFO_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } template INVITE_Request m_INVITE_Dummy := { requestLine := m_requestLine_dummy(INVITE_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } template MESSAGE_Request m_MESSAGE_Dummy := { requestLine := m_requestLine_dummy(MESSAGE_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } template NOTIFY_Request m_NOTIFY_Dummy := { requestLine := m_requestLine_dummy(NOTIFY_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } template PRACK_Request m_PRACK_Dummy := { requestLine := m_requestLine_dummy(PRACK_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } template PUBLISH_Request m_PUBLISH_Dummy := { requestLine := m_requestLine_dummy(PUBLISH_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } template REGISTER_Request m_REGISTER_Dummy := { requestLine := m_requestLine_dummy(REGISTER_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } template REFER_Request m_REFER_Dummy := { requestLine := m_requestLine_dummy(REFER_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } template SUBSCRIBE_Request m_SUBSCRIBE_Dummy := { requestLine := m_requestLine_dummy(SUBSCRIBE_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } template UPDATE_Request m_UPDATE_Dummy := { requestLine := m_requestLine_dummy(UPDATE_E), msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } }//* end group dummy_request_templates_send group dummy_request_templates_receive{ template ACK_Request mw_ACK_Dummy := { requestLine := mw_requestLine_dummy(ACK_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } template BYE_Request mw_BYE_Dummy := { requestLine := mw_requestLine_dummy(BYE_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } template CANCEL_Request mw_CANCEL_Dummy := { requestLine := mw_requestLine_dummy(CANCEL_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } template INFO_Request mw_INFO_Dummy := { requestLine := mw_requestLine_dummy(INFO_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } template INVITE_Request mw_INVITE_Dummy := { requestLine := mw_requestLine_dummy(INVITE_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } template MESSAGE_Request mw_MESSAGE_Dummy := { requestLine := mw_requestLine_dummy(MESSAGE_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } template NOTIFY_Request mw_NOTIFY_Dummy := { requestLine := mw_requestLine_dummy(NOTIFY_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } template PRACK_Request mw_PRACK_Dummy := { requestLine := mw_requestLine_dummy(PRACK_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } template PUBLISH_Request mw_PUBLISH_Dummy := { requestLine := mw_requestLine_dummy(PUBLISH_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } template REFER_Request mw_REFER_Dummy := { requestLine := mw_requestLine_dummy(REFER_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } template REGISTER_Request mw_REGISTER_Dummy := { requestLine := mw_requestLine_dummy(REGISTER_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } template SUBSCRIBE_Request mw_SUBSCRIBE_Dummy := { requestLine := mw_requestLine_dummy(SUBSCRIBE_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } template UPDATE_Request mw_UPDATE_Dummy := { requestLine := mw_requestLine_dummy(UPDATE_E), msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } }//* end group dummy_request_templates_receive group dummy_response_templates_send{ template Response m_Response_Dummy := { statusLine := c_statusLine100, msgHeader := m_msgHeader_dummy, messageBody := omit, payload := omit } } //* group dummy_response_templates_send group dummy_response_templates_receive{ template Response mw_Response_Dummy := { statusLine := ?, msgHeader := mw_msgHeader_dummy, messageBody := *, payload := * } } //* group dummy_response_templates_receive } group base_templates{ group request_send { template ACK_Request m_ACK_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via) modifies m_ACK_Dummy := { requestLine := { requestUri := p_requestUri }, msgHeader := { callId := p_callId, cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "ACK"}, fromField := p_from, toField := p_to, via := p_via } } template BYE_Request m_BYE_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via) modifies m_BYE_Dummy := { requestLine := { requestUri := { hostPort:= p_requestUri.hostPort } }, msgHeader := { callId := p_callId, cSeq := p_cSeq, fromField := p_from, toField := p_to, via := p_via } } template CANCEL_Request m_CANCEL_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via) modifies m_CANCEL_Dummy := { requestLine := { requestUri := { hostPort:= p_requestUri.hostPort } }, msgHeader := { callId := p_callId, cSeq := p_cSeq, fromField := p_from, toField := p_to, via := p_via } } template INFO_Request m_INFO_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via) modifies m_INFO_Dummy := { requestLine := { requestUri := { hostPort:= p_requestUri.hostPort } }, msgHeader := { callId := p_callId, cSeq := p_cSeq, fromField := p_from, toField := p_to, via := p_via } } template INVITE_Request m_INVITE_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, Contact p_contact) modifies m_INVITE_Dummy := { requestLine := { requestUri := p_requestUri }, msgHeader := { callId := p_callId, contact := p_contact, cSeq := p_cSeq, fromField := p_from, toField := p_to, via := p_via } } template MESSAGE_Request m_MESSAGE_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via) modifies m_MESSAGE_Dummy := { requestLine := { requestUri := p_requestUri }, msgHeader := { callId := p_callId, cSeq := p_cSeq, fromField := p_from, toField := p_to, via := p_via } } template NOTIFY_Request m_NOTIFY_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via) modifies m_NOTIFY_Dummy := { requestLine := { requestUri := { hostPort:= p_requestUri.hostPort } }, msgHeader := { callId := p_callId, //* contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, //* contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication}, cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "NOTIFY"}, fromField := p_from, toField := p_to, via := p_via }//* , //* messageBody := p_mb } template PRACK_Request m_PRACK_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, RAck p_RAck) modifies m_PRACK_Dummy := { requestLine := { requestUri := { hostPort:= p_requestUri.hostPort } }, msgHeader := { callId := p_callId, cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "PRACK"}, fromField := p_from, rAck := p_RAck, toField := p_to, via := p_via }, messageBody := omit } //* in reality PUBLISH request contain xml in content template PUBLISH_Request m_PUBLISH_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Event p_event, template RAck p_RAck, template MessageBody p_mb) modifies m_PUBLISH_Dummy := { requestLine := { requestUri := { hostPort:= p_requestUri.hostPort } }, msgHeader := { callId := p_callId, contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication}, cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "PUBLISH"}, event := p_event, fromField := p_from, toField := p_to, via := p_via }, messageBody := p_mb } template REFER_Request m_REFER_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, Contact p_contact, From p_from, template To p_to, Via p_via, template ReferTo p_referTo, template ReferredBy p_referredBy) modifies m_REFER_Dummy := { requestLine := { requestUri := p_requestUri }, msgHeader := { callId := p_callId, contact := p_contact, cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "REFER"}, fromField := p_from, referTo := p_referTo, referredBy := p_referredBy, toField := p_to, via := p_via } } template REFER_Request m_REFER_Request_replaces ( SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, Contact p_contact, From p_from, template To p_to, Via p_via, template ReferTo p_referTo, template ReferredBy p_referredBy, template Replaces p_replaces, template Require p_require ) modifies m_REFER_Request_Base := { msgHeader := { replaces := p_replaces, require := p_require } } template REGISTER_Request m_REGISTER_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, Contact p_contact, template Authorization p_authorization) modifies m_REGISTER_Dummy := { requestLine := { requestUri := p_requestUri }, msgHeader := { authorization := p_authorization, callId := p_callId, contact := p_contact, cSeq := p_cSeq, fromField := p_from, toField := p_to, via := p_via } } template SUBSCRIBE_Request m_SUBSCRIBE_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via) modifies m_SUBSCRIBE_Dummy := { requestLine := { requestUri := { hostPort:= p_requestUri.hostPort } }, msgHeader := { callId := p_callId, cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "SUBSCRIBE"}, fromField := p_from, toField := p_to, via := p_via } } template UPDATE_Request m_UPDATE_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, Contact p_contact, template MessageBody p_mb) modifies m_UPDATE_Dummy := { requestLine := { requestUri := { hostPort:= p_requestUri.hostPort } }, msgHeader := { callId := p_callId, contact := p_contact, contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication}, cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "UPDATE"}, fromField := p_from, toField := p_to, via := p_via }, messageBody := p_mb } } //* end of group message_send group request_receive { template ACK_Request mw_ACK_Request_Base (template CallId p_callId) modifies mw_ACK_Dummy := { msgHeader := { callId := p_callId } } template BYE_Request mw_BYE_Request_Base(template CallId p_callId) modifies mw_BYE_Dummy := { msgHeader := { callId := p_callId } } template CANCEL_Request mw_CANCEL_Request_Base (template CallId p_callId) modifies mw_CANCEL_Dummy := { msgHeader := { callId := p_callId } } template INFO_Request mw_INFO_Request_Base(template CallId p_callId) modifies mw_INFO_Dummy := { msgHeader := { callId := p_callId } } template INVITE_Request mw_INVITE_Request_Base modifies mw_INVITE_Dummy := { requestLine := { method := INVITE_E } } template MESSAGE_Request mw_MESSAGE_Request_Base(template CallId p_callId) modifies mw_MESSAGE_Dummy := { msgHeader := { callId := p_callId, contact := omit } } template NOTIFY_Request mw_NOTIFY_Request_Base (template CallId p_callId) modifies mw_NOTIFY_Dummy := { msgHeader := { callId := p_callId } } template PRACK_Request mw_PRACK_Request_Base(template CallId p_callId) modifies mw_PRACK_Dummy := { msgHeader := { callId := p_callId } } template PUBLISH_Request mw_PUBLISH_Request_Base(template CallId p_callId) modifies mw_PUBLISH_Dummy := { msgHeader := { callId := p_callId } } template REFER_Request mw_REFER_Request_Base (CallId p_callId) modifies mw_REFER_Dummy := { msgHeader := { callId := p_callId } } template REFER_Request mw_REFER_Request(CallId p_callId, SipUrl p_requestUri, SipUrl p_referredBy) modifies mw_REFER_Request_Base := { requestLine := {requestUri := p_requestUri}, msgHeader := { callId := p_callId, referredBy := { fieldName := REFERRED_BY_E, nameAddr := {displayName := *, addrSpec := p_referredBy}, referredbyIdParams := * } } } template INVITE_Request mw_INVITE_Request(template Require p_require, SipUrl p_referredBy) modifies mw_INVITE_Request_Base := { msgHeader := { require := p_require, referredBy := { fieldName := REFERRED_BY_E, nameAddr := {displayName := *, addrSpec := p_referredBy}, referredbyIdParams := * } } } template REGISTER_Request mw_REGISTER_Request_Base modifies mw_REGISTER_Dummy := { requestLine := { method := REGISTER_E } } template SUBSCRIBE_Request mw_SUBSCRIBE_Request_Base modifies mw_SUBSCRIBE_Dummy := { requestLine := { method := SUBSCRIBE_E } } template UPDATE_Request mw_UPDATE_Request_Base(template CallId p_callId) modifies mw_UPDATE_Dummy := { msgHeader := { callId := p_callId } } } //* end group request_receive group response_send { template Response m_Response_Base (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via) modifies m_Response_Dummy:= { statusLine := p_statusLine, msgHeader := { callId := p_callId, cSeq := p_cSeq, fromField := p_from, maxForwards := omit, toField := p_to, via := p_via }, messageBody := omit, payload := omit } } //* end group response_send group response_receive { template Response mw_Response_Base (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq) modifies mw_Response_Dummy:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { callId := p_callId, contentLength := *, cSeq := p_cSeq, fromField := ?, maxForwards := *, toField := ?, via := ? } } } //* end group message_receive } //* end group full_templates group modified_templates { group request_send { template ACK_Request m_ACK_Request_route (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, Route p_route) modifies m_ACK_Request_Base := { msgHeader := { route := p_route } } template ACK_Request m_ACK_Request_sdp (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via,template MessageBody p_mb ) 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} }, messageBody := p_mb } template BYE_Request m_BYE_Request_cause (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, integer p_cause) modifies m_BYE_Request_Base := { msgHeader := { reason := m_Reason(p_cause) //* PIXIT value } } template INVITE_Request m_INVITE_Request_sdp (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, Contact p_contact, template MessageBody p_mb) modifies m_INVITE_Request_Base := { msgHeader := { contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication} }, messageBody := p_mb } template INVITE_Request m_INVITE_Request_ResourceList (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, Contact p_contact, template MessageBody p_mb) modifies m_INVITE_Request_Base := { msgHeader := { contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := "application/resource-lists+xml"}, contentDisposition := { fieldName := CONTENT_DISPOSITION_E, dispositionType := "recipient-list", dispositionParams := omit }, require := { fieldName := REQUIRE_E, optionsTags := {"recipient-list-invite"} } }, messageBody := p_mb } template REGISTER_Request m_REGISTER_Request_expires (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, Contact p_contact, template Authorization p_authorization, charstring p_expires) modifies m_REGISTER_Request_Base := { msgHeader := { authorization := p_authorization, expires := { fieldName := EXPIRES_E, deltaSec := p_expires } } } template NOTIFY_Request m_NOTIFY_Request_sipfrag ( SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, charstring p_state, charstring p_sipfrag ) modifies m_NOTIFY_Request_Base := { requestLine := { method := NOTIFY_E, requestUri := { hostPort:= p_requestUri.hostPort } }, msgHeader := { contentLength := {fieldName := CONTENT_LENGTH_E, len:= lengthof(p_sipfrag)}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := "message/sipfrag"}, subscriptionState := { fieldName := SUBSCRIPTION_STATE_E, subState := p_state, substateParams := omit }, event := m_Event_refer }, messageBody := { sipfrag := p_sipfrag } } } //* end group request_send group request_receive { template BYE_Request mw_BYE_Request_Reason(template CallId p_callId, integer p_cause) modifies mw_BYE_Request_Base := { msgHeader := { reason := mw_Reason(p_cause) } } template BYE_Request mw_BYE_Request_UserToUser(template CallId p_callId) modifies mw_BYE_Request_Base := { msgHeader := { userToUser := ? } } template INVITE_Request mw_INVITE_Request_RequestURI (template SipUrl p_sipUrl) modifies mw_INVITE_Dummy := { requestLine := { requestUri := p_sipUrl, sipVersion := c_sipNameVersion } } template INFO_Request mw_INFO_Request_MB (template CallId p_callId, template MessageBody p_mb) modifies mw_INFO_Request_Base := { messageBody := p_mb } template INVITE_Request mw_INVITE_Request_expires modifies mw_INVITE_Request_Base := { msgHeader := {expires := ?} } template INVITE_Request mw_INVITE_Request_callid(CallId p_callid) modifies mw_INVITE_Request_Base := { msgHeader := {callId := p_callid} } template INVITE_Request mw_INVITE_Request_MB (template CallId p_callId, template MessageBody p_mb) modifies mw_INVITE_Request_Base := { msgHeader := {callId := p_callId}, messageBody := p_mb } template INVITE_Request mw_INVITE_Request_noPaccessNetworkInfo (template CallId p_callId) modifies mw_INVITE_Request_Base := { msgHeader := { pAccessNetworkInfo := omit} } template INVITE_Request mw_INVITE_Request_PaccessNetworkInfo (template CallId p_callId) modifies mw_INVITE_Request_Base := { msgHeader := { pAccessNetworkInfo := ?} } template REGISTER_Request mw_REGISTER_Request_ISC (template PAccessNetworkInfo p_access , template PVisitedNetworkID p_visited )modifies mw_REGISTER_Request_Base := { msgHeader := { pAccessNetworkInfo := p_access, pVisitedNetworkID := p_visited } } template UPDATE_Request mw_UPDATE_Request_SDP(template CallId p_callId, template MessageBody p_mb) modifies mw_UPDATE_Dummy := { messageBody := p_mb } template NOTIFY_Request mw_NOTIFY_Request_MB (template CallId p_callId, template MessageBody p_mb) modifies mw_NOTIFY_Request_Base := { messageBody := p_mb } } //* end group request_receive group response_send { template Response m_Response_AlertInfo ( StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, AlertInfo p_alertInfo ) modifies m_Response_Base:= { msgHeader := { alertInfo := p_alertInfo } } template Response m_Response_ext (StatusLine p_statusLine, 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_Response_Base:= { msgHeader :={ route := p_route, //f_route(), recordRoute := p_recordroute //f_recordroute() } } template Response m_Response_mbody (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Route p_route, template RecordRoute p_recordroute, MessageBody p_mb) modifies m_Response_ext:= { msgHeader := { contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication} }, messageBody := p_mb } template Response m_Response_PAsserted_Privacy (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Route p_route, template RecordRoute p_recordroute, template PAssertedID p_pAssertedID, template Privacy p_privacy) modifies m_Response_ext:= { msgHeader := { pAssertedID := p_pAssertedID, privacy := p_privacy } } template Response mw_Response_PAsserted_Privacy_Supported (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template PAssertedID p_pAssertedID, template Privacy p_privacy, template Supported p_supported) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { pAssertedID := p_pAssertedID, privacy := p_privacy, supported := p_supported } } template Response m_Response_PAsserted_Privacy_mbody (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Route p_route, template RecordRoute p_recordroute, template PAssertedID p_pAssertedID, template Privacy p_privacy, MessageBody p_mb) modifies m_Response_ext:= { msgHeader := { contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication}, pAssertedID := p_pAssertedID, privacy := p_privacy }, messageBody := p_mb } } //* end group response_send group response_receive { template Response mw_Response_Expires (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template DeltaSec p_deltaSec) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { expires := {fieldName := EXPIRES_E, deltaSec := p_deltaSec} } } template Response mw_Response_PAsserted_Privacy (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template PAssertedID p_pAssertedID, template Privacy p_privacy) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { pAssertedID := p_pAssertedID, privacy := p_privacy } } template Response mw_Response_Reason (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, integer p_cause) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { reason := mw_Reason(p_cause) } } template Response mw_Response_RecordRoute (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template RecordRoute p_recordRoute) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { recordRoute := p_recordRoute } } template Response mw_Response_Via (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template Via p_via) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { via := p_via } } template Response mw_Response_Contact (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template Contact p_contact) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { contact := p_contact } } template Response mw_Response_AlertInfo ( template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template AlertInfo p_alertInfo ) modifies mw_Response_Base:= { statusLine := { sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ? }, msgHeader := { alertInfo := p_alertInfo } } template Response mw_Response_HistoryInfo (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template HistoryInfo p_historyInfo) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { historyInfo:=p_historyInfo } } template Response mw_Response_messageBody ( template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template Require p_require, template MessageBody p_mb ) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { require := p_require }, messageBody := p_mb } template Response mw_Response_Require (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template Require p_require) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { require := p_require } } template Response mw_Response_Require_ifpresent (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template Require p_require) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { require := p_require ifpresent } } template Response mw_Response_Supported (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq, template Supported p_supported) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { supported := p_supported } } template Response mw_Response_UserToUser (template StatusLine p_statusLine, template CallId p_callId, template CSeq p_cSeq) modifies mw_Response_Base:= { statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?}, msgHeader := { userToUser := ? } } } //* end group response_receive } //* end group modified_templates } //* end group MessageTemplates group SDP_Templates { group SDP_Messages { group base_templates { template SDP_Message m_SDP(SDP_media_desc p_media, in SipUserProfile p_userprofile) := { protocol_version := 0, //* v=0 origin := { user_name := "voicesession", session_id := "30000", session_version := "0", net_type := c_in, addr_type := c_ip4, addr := p_userprofile.contactIpaddr }, //* o=voicesession 12345 12345 IN IP4 172.27.1.219 session_name := "Voice Session", //* s=Voice Session information := omit, uri := omit, emails := omit, phone_numbers := omit, connection := { net_type := c_in, addr_type := c_ip4, conn_addr := { addr:= p_userprofile.bearerIpaddr, ttl:=omit, num_of_addr:=omit } }, //* c=IN IP4 172.27.1.219 bandwidth := omit, times := { { time_field := { "0", "0" }, time_repeat:=omit } }, //* t=0 0 timezone_adjustments := omit, key := omit, attributes := omit, media_list := {p_media} }; template SDP_Message m_SDP_mediaList(SDP_media_desc_list p_media_list, in SipUserProfile p_userprofile) := { protocol_version := 0, //* v=0 origin := { user_name := "voicesession", session_id := "30000", session_version := "0", net_type := c_in, addr_type := c_ip4, addr := p_userprofile.contactIpaddr }, //* o=voicesession 12345 12345 IN IP4 172.27.1.219 session_name := "Voice Session", //* s=Voice Session information := omit, uri := omit, emails := omit, phone_numbers := omit, connection := { net_type := c_in, addr_type := c_ip4, conn_addr := { addr:= p_userprofile.bearerIpaddr, ttl:=omit, num_of_addr:=omit } }, //* c=IN IP4 172.27.1.219 bandwidth := omit, times := { { time_field := { "0", "0" }, time_repeat:=omit } }, //* t=0 0 timezone_adjustments := omit, key := omit, attributes := omit, media_list := p_media_list }; template SDP_Message m_SDP_media_attr_preconditions(SDP_media_desc p_media, in SipUserProfile p_userprofile, SDP_attribute_list p_attribute_list) modifies m_SDP := { media_list := { { media_field := { media := c_audio, ports := { port_number := 8500, num_of_ports:=omit }, transport := c_rtpAvp, fmts := { "0" } }, //* m=audio 8500 RTP/AVP 0 information := omit, connections := omit, bandwidth := omit, key := omit, attributes := p_attribute_list }} } template SDP_Message m_SDP_attribute(SDP_media_desc p_media, in SipUserProfile p_userprofile, SDP_attribute loc_attribute) modifies m_SDP := { attributes := {loc_attribute} }; template SDP_Message mw_SDP := { protocol_version := 0, //* v=0 origin := ?, session_name := ?, information := omit, uri := omit, emails := omit, phone_numbers := omit, connection := ?, bandwidth := omit, times := { { time_field := { "0", "0" }, time_repeat:=omit } }, //* t=0 0 timezone_adjustments := omit, key := omit, attributes := omit, media_list := ? }; }//* end group base_templates group modified_templates{ template SDP_Message m_SDP_bandwidth(SDP_media_desc p_media, in SipUserProfile p_userprofile) modifies m_SDP := { bandwidth := {{PX_SIP_SDP_b_modifier, PX_SIP_SDP_b_bandwidth}} }; template SDP_Message m_SDP_unacceptable(SDP_media_desc p_media, in SipUserProfile p_userprofile) modifies m_SDP := { protocol_version := 1, //* v=1 unacceptable version of SDP bandwidth := {{PX_SIP_SDP_b_modifier, PX_SIP_SDP_b_bandwidth}} }; template SDP_Message m_SDP_encrypted(SDP_media_desc p_media, in SipUserProfile p_userprofile) modifies m_SDP := { protocol_version := 1, //* v=1 unacceptable version of SDP bandwidth := {{PX_SIP_SDP_b_modifier, PX_SIP_SDP_b_bandwidth}} }; }//* end group modified_templates } //* end group SDP_Messages group SDP_Fields { template SDP_media_desc m_media(template SDP_media_field p_mf) := { media_field := p_mf, information := omit, connections := omit, bandwidth := omit, key := omit, attributes := omit }; template SDP_media_desc m_mediaFieldBandwdthAttributes(template SDP_media_field p_mf, template SDP_bandwidth p_bw, template SDP_attribute_list p_attributes) := { media_field := p_mf, information := omit, connections := omit, bandwidth := p_bw, key := omit, attributes := p_attributes }; template SDP_media_desc m_media_dynPT(charstring p_PT, charstring p_encod) := { media_field := { media := c_audio,//* "audio", ports := { port_number := 8500, num_of_ports:=omit }, transport := c_rtpAvp,//* "RTP/AVP", fmts := { p_PT } }, //* m=audio 8500 RTP/AVP 8 information := omit, connections := omit, bandwidth := omit, key := omit, attributes := { { rtpmap := { attr_value := p_PT & " " & p_encod } } } //* a=rtpmap:8 PCMA/8000 }; template SDP_media_desc m_media_unsupported := { media_field := { media := "video", ports := { port_number := 11500, num_of_ports:=omit }, transport := "RTP/AVP", fmts := { "99" } }, //* m=audio 8500 RTP/AVP 0 information := omit, connections := omit, bandwidth := omit, key := omit, attributes := { { rtpmap := { attr_value := "99 X-Experimental/180000"} }} }; template SDP_bandwidth m_bandwidth(template charstring loc_m, template integer loc_b) := { modifier:=loc_m, bandwidth:=loc_b }; template SDP_bandwidth m_bandwidth_as_64:= { modifier:="AS", bandwidth:=64 } template SDP_bandwidth mw_bandwidth_rs:= { modifier:="RS", bandwidth:=? } template SDP_bandwidth mw_bandwidth_rr:= { modifier:="RR", bandwidth:=? } template SDP_media_field m_media_field(charstring p_media, integer p_portNum, charstring p_transport, charstring p_fmts) := { media := p_media, ports := { port_number := p_portNum, num_of_ports:=omit }, transport := p_transport, fmts := { p_fmts } } template SDP_media_field mw_media_PCMU := { media := c_audio, ports := { port_number := ?, num_of_ports:=* }, transport := c_rtpAvp, fmts := { "0" } } template SDP_media_field mw_media_PCMA := { media := c_audio, ports := { port_number := 8500, num_of_ports:=omit }, transport := c_rtpAvp, fmts := { "8" } } template SDP_media_field mw_media_PCMA_U_DPT := { media := c_audio, ports := { port_number := ?, num_of_ports:=* }, transport := c_rtpAvp, fmts := { * } } template SDP_media_field mw_media_T38 := { media := c_image, ports := { port_number := ?, num_of_ports:=* }, transport := pattern "*ptl", //* udptl,tcptl fmts := { "t38" } } template SDP_media_field mw_media_G722 := { media := c_audio, ports := { port_number := ?, num_of_ports:=* }, transport := "RTP/AVP", fmts := { "9" } } template SDP_media_field mw_media_AMR_DPT := { media := c_audio, ports := { port_number := ?, num_of_ports:=* }, transport := c_rtpAvp, fmts := { * } } template SDP_attribute m_attribute_sendonly := {sendonly:={}}; template SDP_attribute mw_attribute_sendonly := {sendonly:={}};//MRO template SDP_attribute m_attribute_recvonly := {recvonly:={}}; template SDP_attribute mw_attribute_recvonly := {recvonly:={}};//MRO template SDP_attribute m_attribute_sendrecv := {sendrecv:={}}; template SDP_attribute mw_attribute_sendrecv := {sendrecv:={}};//MRO template SDP_attribute m_attribute_inactive := {inactive:={}}; template SDP_attribute mw_attribute_inactive := {inactive:={}};//MRO template SDP_attribute mw_attribute_sendonly_inactive := (mw_attribute_sendonly,mw_attribute_inactive); template SDP_attribute mw_attribute_sendrecv_recvonly_omit := (mw_attribute_sendrecv,mw_attribute_recvonly,omit); template SDP_attribute m_attribute_AMR_DPT := { rtpmap := { attr_value := /*pattern "**/PX_SIP_SDP_dyn & " AMR" }}; template SDP_attribute m_attribute_CLEARMODE_DPT := {rtpmap := { attr_value := /*pattern "**/PX_SIP_SDP_dyn & " CLEARMODE/8000" }}; template SDP_attribute m_attribute_G722 := { rtpmap := { attr_value := "9 G722/8000" }}; template SDP_attribute m_attribute_PCMU := { rtpmap := { attr_value := "0 PCMU/8000" }}; template SDP_attribute m_attribute_PCMU_DPT := { rtpmap := { attr_value := /*pattern "**/PX_SIP_SDP_dyn & " PCMU/8000" }}; template SDP_attribute m_attribute_PCMA := { rtpmap := { attr_value := "8 PCMA/8000" }}; template SDP_attribute m_attribute_PCMA_DPT := { rtpmap := { attr_value := /*pattern "**/PX_SIP_SDP_dyn & " PCMA/8000" }}; template SDP_attribute m_attribute_T38 := { unknown := { name:=?, attr_value := pattern "*t38*" }}; template SDP_attribute m_attribute_curr (charstring p_preconditionType, charstring p_statusType, charstring p_direction):= { curr:={preconditionType := p_preconditionType, statusType := p_statusType, direction := p_direction} }; template SDP_attribute mw_attribute_curr := { curr := ? }; template SDP_attribute m_attribute_des (charstring p_preconditionType, charstring p_strength, charstring p_statusType, charstring p_direction):= { des:={preconditionType := p_preconditionType, strength := p_strength, statusType := p_statusType, direction := p_direction} }; template SDP_attribute mw_attribute_des := { des := ? }; template SDP_attribute m_attribute_conf (charstring p_preconditionType, charstring p_statusType, charstring p_direction):= { conf:={preconditionType := p_preconditionType, statusType := p_statusType, direction := p_direction} }; } //* end group SDP_Fields } //* end group SDP_Templates group MessageBodies { template MessageBody m_MBody_SDP(template SDP_Message p_SDP):= { sdpMessageBody := p_SDP }; template MessageBody m_MBody_XML(template XmlBody p_xmlBody):= { xmlBody := p_xmlBody }; template MessageBody m_MBody_longPlainText:= { textplain := c_longMessageContent_1300Bytes }; template MessageBody m_mBody_plainText(charstring p_plaitext):= { textplain := p_plaitext }; template MessageBody m_MBody_sipfrag(charstring p_sipfrag) := { sipfrag := p_sipfrag } template MessageBody m_MBody_MIMESdpXml(template SDP_Message p_sdp, template XmlBody p_xmlBody):= { mimeMessageBody := {boundary:="PX_SIP_MIME_Boundary", mimeEncapsulatedList:= { {content_type:="PX_SIP_SDP_ContentType", content_disposition:=omit, mime_encapsulated_part:={sdpMessageBody := p_sdp}}, {content_type:="PX_SIP_ISUP_ContentType", content_disposition:=omit, mime_encapsulated_part:={xmlBody := p_xmlBody}} } } } template MessageBody mw_MBody_SDP(template SDP_Message p_SDP):= { sdpMessageBody := p_SDP }; template MessageBody mw_MBody_XML(template XmlBody p_xmlBody):= { xmlBody := p_xmlBody }; template MessageBody mw_MBody_MIMESdpXml(template SDP_Message p_sdp, template XmlBody p_xmlBody):= { mimeMessageBody := {boundary:=?, mimeEncapsulatedList:= { {content_type:=?, content_disposition:=*, mime_encapsulated_part:={sdpMessageBody := p_sdp}}, {content_type:=?, content_disposition:=*, mime_encapsulated_part:={xmlBody := p_xmlBody}} } } } template MessageBody mw_MBody_MIME_Ims3gpp( template charstring p_disposition, template Ims_3gpp p_ims3gpp ):= { mimeMessageBody := {boundary:=?, mimeEncapsulatedList:= { *, { content_type:= c_ims3gppAplication, content_disposition:= p_disposition, mime_encapsulated_part :={ xmlBody := { ims3gpp := p_ims3gpp } } }, * } } } template MessageBody mw_MBody_MIME_Ims3gppCW( template charstring p_disposition, template Ims_3gpp p_ims3gpp ):= { mimeMessageBody := {boundary:=?, mimeEncapsulatedList:= { *, { content_type:= c_ims3gppCwApplication, content_disposition:= p_disposition, mime_encapsulated_part :={ xmlBody := { ims3gpp := p_ims3gpp } } }, * } } } } /* * * @desc group TemplatePreparationFunctions contain functions which are used for templates */ group TemplatePreparationFunctions { group MessageBody_Calculation{ /** * * @desc Calculation of Message Body length * @param p_mb_par contain message body part * @return message body length */ function f_MessageBodyLength(MessageBody p_mb_par) return integer { var integer v_result:=0; if (MB_LENGTH_FROM_ENCVAL){ //by default it is set to true v_result:= lengthof(encvalue(p_mb_par))/8; // length in bypes, let get length of encoded value } else{ // assume SDP_Message ONLY in the message body if (ischosen(p_mb_par.sdpMessageBody)) { v_result := f_SDPlength(p_mb_par.sdpMessageBody); }; // assume XML_Body ONLY in the message body if (ischosen(p_mb_par.xmlBody)) { v_result := f_XMLBody_Length(p_mb_par.xmlBody, USE_FX_FOR_XML_LENGTH ); }; //assume XML_Message ONLY in the message body if (ischosen(p_mb_par.xmlMessage)) { v_result := f_XMLlength(p_mb_par.xmlMessage, USE_FX_FOR_XML_LENGTH ); }; // assume MIME_Message in the message body if (ischosen(p_mb_par.mimeMessageBody)) { v_result := f_MIMElength(p_mb_par.mimeMessageBody); }; //assume sipfrag in the message body if (ischosen(p_mb_par.sipfrag)) { v_result := f_TextPlainLength(p_mb_par); //same function due to same type with textplain }; //assume textplain in the message body if (ischosen(p_mb_par.textplain)) { v_result := f_TextPlainLength(p_mb_par); }; } return v_result } group SDP_Len_calculation { /** * * @desc Calculation of SDP length * @param p_mb contain sdp message * @return sdp_lenght */ function f_SDPlength(SDP_Message p_mb) return integer { var integer v_result:=2; //* due to empty line beginning of message body var charstring v_auxstring; v_result := 2+c_CRlen + lengthof(int2str(p_mb.protocol_version)); //* "v=" v_result := v_result + 2+c_CRlen + lengthof(p_mb.origin.user_name & " " & p_mb.origin.session_id & " " & p_mb.origin.session_version & " " & p_mb.origin.net_type & " " & p_mb.origin.addr_type & " " & p_mb.origin.addr ); //* "o=" v_result := v_result + 2+c_CRlen + lengthof(p_mb.session_name); //* "s=" if (ispresent(p_mb.information)) {v_auxstring:=p_mb.information; v_result := v_result + 2+c_CRlen + lengthof(v_auxstring);}; //* "i= " if (ispresent(p_mb.uri)) {v_auxstring:=p_mb.uri; v_result := v_result + 2+c_CRlen + lengthof(v_auxstring);}; //* "u=" if (ispresent(p_mb.emails)) { for (var integer i:=0; i\n len=39*/ //* 2 3 1 1 1 1 2 1*/ v_result:=2+3+lengthof(" version=")+1+lengthof(p_mh.version)+1; //\n return v_result } //* f_XMLHeaderLength /** * * @desc Calculation of XML body length * @param p_mb contain XML body * @return xml_length */ function f_XMLBody_Length(XmlBody p_mb, boolean p_ext_func) return integer { var integer v_result:=0; if ( p_ext_func){ v_result := fx_calculateXMLBodyLen(p_mb); }else{ // assume ConferenceInfo ONLY in the XML message body if (ischosen(p_mb.conferenceInfo)) { v_result := f_XMLBody_ConferenceInfo_Length(p_mb.conferenceInfo); }; // assume CUG ONLY in the XML message body if (ischosen(p_mb.cug)) { v_result := f_XMLBody_Cug_Length(p_mb.cug); }; // assume MCID ONLY in the XML message body if (ischosen(p_mb.mcid)) { v_result := f_XMLBody_Mcid_Length(p_mb.mcid); }; // assume PSTNTransit ONLY in the XML message body if (ischosen(p_mb.pstnTransit)) { v_result := f_XMLBody_PSTNTransit_Length(p_mb.pstnTransit); }; // assume Simservs ONLY in the XML message body if (ischosen(p_mb.simservs)) { v_result := f_XMLBody_Simservs_Length(p_mb.simservs); }; // assume CDIV ONLY in the XML message body if (ischosen(p_mb.cdivn)) { v_result := f_XMLBody_CDIV_Length(p_mb.cdivn); }; // assume ICB ONLY in the XML message body if (ischosen(p_mb.icb)) { v_result := f_XMLBody_ICB_Length(p_mb.icb); }; // assume OCB ONLY in the XML message body if (ischosen(p_mb.ocb)) { v_result := f_XMLBody_OCB_Length(p_mb.ocb); }; // assume ResourceLists ONLY in the XML message body if (ischosen(p_mb.resourceLists)) { v_result := f_XMLBody_ResourceList_Length(p_mb.resourceLists); }; // assume Ims3GPP ONLY in the XML message body if (ischosen(p_mb.ims3gpp)) { v_result := f_XMLBody_Ims3GPP_Length(p_mb.ims3gpp); }; /** Add aditional checks regarding to new variants, * also implement appropriate function for calculation */ } return v_result } //* f_XMLBodyLength group XMLBodies_calculation{ /** * * @desc Calculation of XML ConferenceInfo element length * @param p_mb contain XML ConfInfo body * @return xml_length */ function f_XMLBody_ConferenceInfo_Length(Conference_info p_mb) return integer { var integer v_result:=0; //TODO: write function body return v_result } //* f_XMLBody_ConferenceInfo_Length /** * * @desc Calculation of XML CUG element length * @param p_mb contain XML CUG body * @return xml_length */ function f_XMLBody_Cug_Length(Cug p_mb) return integer { var integer v_result:=0; //TODO: write function body return v_result } //* f_XMLBody_Cug_Length /** * * @desc Calculation of XML MCID element length * @param p_mb contain XML MCID body * @return xml_length */ function f_XMLBody_Mcid_Length(Mcid p_mb) return integer { var integer v_result:=0; if (ischosen(p_mb.choice.request)){ } if (ischosen(p_mb.choice.response)){ } return v_result } //* f_XMLBody_Mcid_Length /** * * @desc Calculation of XML PSTNTransit element length * @param p_mb contain XML PSTNTransit body * @return xml_length */ function f_XMLBody_PSTNTransit_Length(PSTN_transit p_mb) return integer { var integer v_result:=0; //TODO: write function body return v_result } //* f_XMLBody_PSTNTransit_Length /** @desc Calculation of XML Simservs element length * @param p_mb contain XML Simservs body * @return xml_length */ function f_XMLBody_Simservs_Length(Simservs p_mb) return integer { var integer v_result:=0; //TODO: write function body return v_result } //* f_XMLBody_Simservs_Length /** @desc Calculation of XML CDIV element length * @param p_mb contain XML CDIV body * @return xml_length */ function f_XMLBody_CDIV_Length(Comm_div_info p_mb) return integer { var integer v_result:=0; //TODO: write function body return v_result } //* f_XMLBody_CDIV_Length /** @desc Calculation of XML ICB length * @param p_mb contain XML ICB body * @return xml_length */ function f_XMLBody_ICB_Length(Incoming_communication_barring p_mb) return integer { var integer v_result:=0; //TODO: write function body return v_result } //* f_XMLBody_ICB_Length /** @desc Calculation of XML OCB length * @param p_mb contain XML OCB body * @return xml_length */ function f_XMLBody_OCB_Length(Outgoing_communication_barring p_mb) return integer { var integer v_result:=0; //TODO: write function body return v_result } //* f_XMLBody_OCB_Length /** @desc Calculation of XML ResourceList length * @param p_mb contain XML ResourceList body * @return xml_length */ function f_XMLBody_ResourceList_Length(Resource_lists p_mb) return integer { var integer v_result:=0; //TODO: write function body return v_result } //* f_XMLBody_ResourceList_Length /** @desc Calculation of XML Ims3GPP length * @param p_mb contain XML Ims3GPP body * @return xml_length */ function f_XMLBody_Ims3GPP_Length(Ims_3gpp p_mb) return integer { var integer v_result:=0; //TODO: write function body return v_result } //* f_XMLBody_Ims3GPP_Length } //* XMLBodies_calculation }//* group XMLlen_calculation group MIME_Len_calculation{ /** * * @desc Calculation of MIME length * @param p_mb contain MIME message * @return xml_length */ function f_MIMElength(MIME_Message p_mb) return integer { var integer v_result:=2; //0d0a v_result := v_result + lengthof(p_mb.boundary) + 2/*0d0a*/; for (var integer i:=0; i