Newer
Older
* @author STF 346, STF366, STF368, STF369, STF450, STF471
* @version $Id$
* @desc This module defines SIP Templates for message, header, and
* structured types. <br>
* 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
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;
import from LibSip_SimpleMsgSummaryTypes all;
import from NoTargetNamespace language "XSD" all
with {
import from urn_ietf_params_xml_ns_conference_info language "XSD" all
with {
import from http_uri_etsi_org_ngn_params_xml_simservs_pstn language "XSD" all
with {
import from http_uri_etsi_org_ngn_params_xml_simservs_xcap language "XSD" all
with {
extension "File:../xsd/SupplementaryServices.xsd";
import from http_uri_etsi_org_ngn_params_xml_simservs_mcid language "XSD" all
with {
import from urn_ietf_params_xml_ns_resource_lists language "XSD" all
with {
import from http_uri_etsi_org_ngn_params_xml_comm_div_info language "XSD" all
with {
}
import from urn_3gpp_ns_cw_1_0 language "XSD" all
template(value) Addr_Union m_AddrUnion_NameAddr(template(value) NameAddr p_nameAddr) := {nameAddr := p_nameAddr}
template(value) Addr_Union m_AddrUnion_DisplayAndSipUrl(
template(value) charstring p_displayName,
template(value) SipUrl p_addrSpec
) := {
nameAddr := m_CallingAddr(p_displayName, p_addrSpec)
}
template(value) NameAddr m_NameAddr(
template(omit) charstring p_displayName := omit,
template(value) SipUrl p_addrSpec
) := {
displayName := p_displayName,
addrSpec := p_addrSpec
template(value) charstring p_displayName,
template(value) SipUrl p_addrSpec
) := m_NameAddr(p_displayName, p_addrSpec);
template(present) SipUrl p_addrSpec := ?
) := {
displayName := p_displayName,
addrSpec := p_addrSpec
template(present) CommaParam_List mw_digestResponse(
template(present) GenericParam p_genericParam := ?
) := superset(p_genericParam);
template(value) SemicolonParam_List m_ReasonParams(
template(omit) charstring p_cause := omit,
m_Cause(p_cause), m_Text(p_text)
}
template(present) SemicolonParam_List mw_ReasonParams(
template charstring p_cause,
template charstring p_text
) := {
mw_Cause_base(p_cause), mw_Text(p_text)
}
template(value) ReasonValue m_ReasonValue_Base := {
template(present) ReasonValue mw_ReasonValue_Base := {
template(value) charstring p_cause,
template(value) charstring p_text
) modifies m_ReasonValue_Base := {
reasonParams := m_ReasonParams(p_cause, p_text)
template(present) ReasonValue mw_ReasonValue_param(
template charstring p_cause,
template charstring p_text
) modifies mw_ReasonValue_Base := {
reasonParams := mw_ReasonParams(p_cause, p_text)
template(value) charstring p_cause,
template(value) charstring p_text
) modifies m_ReasonValue_param := {
token := "Q.850"
template charstring p_cause,
template charstring p_text
) modifies mw_ReasonValue_param := {
token := "Q.850"
}
template(value) charstring p_cause,
template(value) charstring p_text
) modifies m_ReasonValue_param := {
token := "SIP"
}
template charstring p_cause,
template charstring p_text
) modifies mw_ReasonValue_param := {
token := "SIP"
}
template(present) RouteBody mw_routeBody(
template(present) SipUrl p_sipurl := ?
) := {
template(value) SentProtocol m_SentProtocol(
template(value) charstring p_protocol
) := {
protocolName := c_sipName,
protocolVersion := c_sipVersion,
userOrTelephoneSubscriber := "", //* charstring
password :=
omit //* optional charstring
host := omit, //* hostname, IPv4 or IPv6 as a charstring
portField :=
omit //* p_userprofile.currPort - optional integer
template(value) SipUrl m_SipUrl_currDomain_Base(
template(value) SipUserProfile p_userprofile
) modifies m_BasicSipUrl := {
components := {
sip := {
userInfo := {
userOrTelephoneSubscriber := p_userprofile.publUsername
}
}
}
}
template(value) SipUrl m_SipUrl_currDomain(
template(value) SipUserProfile p_userprofile
) modifies m_SipUrl_currDomain_Base := {
components := {
sip := {
hostPort := {
host :=
p_userprofile
.homeDomain //* hostname, IPv4 or IPv6 as a charstring
template(value) SipUrl m_SipUrl_contactIpaddr(
template(value) SipUserProfile p_userprofile
) modifies m_SipUrl_currDomain_Base := {
host := p_userprofile.contactIpaddr, //* hostname, IPv4 or IPv6 as a charstring
portField :=
p_userprofile
.contactPort //* optional integer
template(value) SipUrl m_SipUrl_contactIpaddrAndCpc(
template(value) SipUserProfile p_userprofile
) modifies m_SipUrl_contactIpaddr := {
components := {
sip := {
userInfo := {
userOrTelephoneSubscriber :=
p_userprofile.publUsername & "; cpc=" &
PX_SIP_ISUP_CPC_VALUE //* charstring
template(value) SipUrl m_SipUrl_currIpaddr(
template(value) SipUserProfile p_userprofile
) modifies m_SipUrl_currDomain_Base := {
host := p_userprofile.currIpaddr, //* hostname, IPv4 or IPv6 as a charstring
portField :=
p_userprofile
.currPort //* optional integer
template(value) SipUrl m_SipUrl_Anonymous modifies m_BasicSipUrl := {
userOrTelephoneSubscriber :=
"Anonymous" //* charstring
host :=
"Anonymous.invalid" //* hostname, IPv4 or IPv6 as a charstring
}
}
}
}
// TODO: this temlate is possibly incorrectly defined, or "p_urlParameters" parameter name is incorrect, since it is assigned to "headers"
template(value) SipUrl m_SipUrl_NumberHostHeader(
template(value) charstring p_number,
template(value) charstring p_host,
template(omit) AmpersandParam_List p_urlParameters := omit
) modifies m_BasicSipUrl := {
components := {
sip := {
userInfo := {userOrTelephoneSubscriber := p_number},
hostPort := {host := p_host}
urlParameters := p_urlParameters
}
template(value) SipUrl m_SipUrl_NumberHostParam(
template(value) charstring p_number,
template(value) charstring p_host,
template(omit) AmpersandParam_List p_urlParameters := omit
components := {sip := {hostPort := {portField := c_defaultSipPort}}}
template(value) SipUrl m_SipUrl_NumberHostParam_woPort(
template(value) charstring p_number,
template(value) charstring p_host,
template(omit) AmpersandParam_List p_urlParameters := omit
components := {sip := {hostPort := {portField := omit}}}
scheme := (c_telScheme),
components := {tel := {subscriber := ""}},
urlParameters := omit,
template(value) SipUrl m_TelUrl_publUser(
template(value) SipUserProfile p_userprofile
) modifies m_BasicTelUrl := {
scheme := c_telScheme,
components := {tel := {subscriber := ?}},
urlParameters := *,
template(present) SipUrl mw_TelSip_unavailableInvalidUri := (mw_TelSip_unavailableInvalidUri1, mw_TelSip_unavailableInvalidUri2);
template(present) SipUrl mw_TelSip_unavailableInvalidUri1 modifies mw_SipUrl := {
userOrTelephoneSubscriber := "unavailable",
password :=
omit // TODO STF471: shall be omit or *. If *, remove them die to modifies mw_BasicSipUrl
urlParameters := omit, // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
headers :=
omit // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
template(present) SipUrl mw_TelSip_unavailableInvalidUri2 modifies mw_TelUrl := {
components := {tel := {subscriber := "unavailable"}},
urlParameters := omit, // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
headers :=
omit // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
template(present) SipUrl mw_TelSip_unavailableUri(
template(value) charstring p_host
) := (mw_TelSip_unavailableUri1, mw_TelSip_unavailableUri2(p_host));
template(present) SipUrl mw_TelSip_unavailableUri1 modifies mw_TelUrl := {
components := {tel := {subscriber := "unavailable"}},
urlParameters := omit, // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
headers :=
omit // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
template(present) SipUrl mw_TelSip_unavailableUri2(
template(value) charstring p_host
) modifies mw_SipUrl := {
userOrTelephoneSubscriber := "unavailable",
password :=
omit // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
},
urlParameters := omit, // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
headers :=
omit // TODO STF471: shall be *. If *, remove them die to modifies mw_BasicSipUrl
template(present) SipUrl mw_SipUrl_Number(
template(present) charstring p_number := ?
) modifies mw_SipUrl := {
template(present) SipUrl mw_TelSipUrl_Number(
template(present) charstring p_number := ?
) := (mw_SipUrl_Number(p_number), mw_TelSipUrl_Number2(p_number));
template(present) SipUrl mw_TelSipUrl_Number1(
template(present) charstring p_number := ?
) := mw_SipUrl_Number(p_number);
template(present) SipUrl mw_TelSipUrl_Number2(
template(present) charstring p_number := ?
) modifies mw_TelUrl := {
components := {
tel := {
subscriber := p_number
}
}
}
template(present) SipUrl mw_SipUrl_Host(
template charstring p_host
) modifies mw_SipUrl := {
template(present) charstring p_user := ?,
host :=
p_host //* hostname, IPv4 or IPv6 as a charstring
template(present) SipUrl mw_SipUrl_Anonymous modifies mw_SipUrl := {
components := {
sip := {
userInfo := {
userOrTelephoneSubscriber := pattern "[a,A][n,N][o,O][n,N][y,Y][m,M][o,O][u,U][s,s]", //* charstring
password :=
omit // TODO STF471: shall be omit or *. If *, remove them die to modifies mw_BasicSipUrl
host :=
pattern
"[a,A]nonymous.invalid" //* hostname, IPv4 or IPv6 as a charstring
template(present) SipUrl mw_SipUrl_urlParam(
template SemicolonParam_List p_urlParameters
) modifies mw_SipUrl := {
urlParameters := p_urlParameters
}
template(present) ContactAddress mw_ContactAddress := {
template(present) HostPort mw_hostPort(
template charstring p_host,
template integer p_portField
) := {
host := p_host,
in template(present) integer p_statusCode := ?,
in template(present) charstring p_reasonPhrase := ?
template(present) StatusLine mw_statusLine1xx modifies mw_statusLine_any := {statusCode := (100 .. 199)}
template(present) StatusLine mw_statusLine2xx modifies mw_statusLine_any := {statusCode := (200 .. 299)}
template(present) StatusLine mw_statusLine3xx modifies mw_statusLine_any := {statusCode := (300 .. 399)}
template(present) StatusLine mw_statusLine4xx modifies mw_statusLine_any := {statusCode := (400 .. 499)}
template(present) StatusLine mw_statusLine5xx modifies mw_statusLine_any := {statusCode := (500 .. 599)}
template(present) StatusLine mw_statusLine6xx modifies mw_statusLine_any := {statusCode := (600 .. 699)}
template(present) StatusLine mw_statusLineFinal modifies mw_statusLine_any := {statusCode := (200 .. 699)}
template(present) NameAddr mw_NameAddr_DispName_User_Host(
template(present) charstring p_user := ?,
displayName := p_dn,
addrSpec := {
scheme := c_sipScheme, //* contains "sip"
components := {
sip := {
userInfo := {
userOrTelephoneSubscriber := p_user,
password := *
},
host := p_host, //* hostname, IPv4 or IPv6 as a charstring
template(present) charstring p_user := ?,
nameAddr := mw_NameAddr_DispName_User_Host(p_dn, p_user, p_host)
}
template(present) charstring p_user := ?,
addrSpecUnion := mw_SipUrl_User_Host(p_user, p_host)
}
template(value) LibSip_SIPTypesAndValues.Allow m_Allow(
template(value) Method_List p_methods
) := {
template(present) LibSip_SIPTypesAndValues.Allow mw_Allow(
template(value) charstring p_method
) := {
template(value) GenericParam m_Cause(
template(omit) charstring p_cause := omit
) := {
template(present) GenericParam mw_Cause_base(
template charstring p_cause
) := {
template(present) GenericParam mw_Cause(
template(value) charstring p_cause
) := {
template(value) Authorization m_Authorization(
template(value) Credentials p_credentials
) := {
fieldName := AUTHORIZATION_E,
body := {p_credentials}
template(value) Authorization m_Authorization_digest(
template(value) CommaParam_List p_commaParam_List
) := {
fieldName := AUTHORIZATION_E,
body := {{digestResponse := p_commaParam_List}}
template(present) Authorization mw_Authorization_digest(
template(present) CommaParam_List p_commaParam_List := ?
) := {
fieldName := AUTHORIZATION_E,
body := {{digestResponse := p_commaParam_List}}
template(value) Authorization m_add_Authorization_digest(
template(value) Authorization p_auth,
template(value) CommaParam_List p_commaParam_List
) := {
fieldName := AUTHORIZATION_E,
body := {{digestResponse := f_merge_CommaParam_List(p_auth.body[0].digestResponse, p_commaParam_List)}}
// TODO: STF471 this template contains matching symbol, but name suggests it is send template
template(present) Authorization m_Authorization_other := {
fieldName := AUTHORIZATION_E,
body := {{otherResponse := ?}}
template(present) Authorization mw_Authorization_other := {
fieldName := AUTHORIZATION_E,
body := {{otherResponse := ?}}
template(value) Contact m_Contact(
template(value) SipUrl p_sipUrl
) := {
template(value) Contact m_Contact_profile(
template(value) SipUserProfile p_userprofile
) := {
contactBody := {
contactAddresses := {
{
addressField := {addrSpecUnion := m_SipUrl_contactIpaddr(p_userprofile)},
contactParams := omit
}
}
} //* end
//* contactBody
} //* end m_Contact
template(value) Contact m_Contact_profile_expires(
template(value) SipUserProfile p_userprofile,
template(value) charstring p_expires
) := {
contactAddresses := {
{
addressField := {addrSpecUnion := m_SipUrl_contactIpaddr(p_userprofile)},
contactParams := {
{
"expires",
p_expires
}
}
}
}
} //* end contactBody
} //* end m_Contact
template(value) From m_From(
template(value) NameAddr p_nameAddr,
template(value) charstring p_tag_str
) := {
addressField := {nameAddr := p_nameAddr}, //* end addressField
template(value) From m_From_Anonymous(
template(value) charstring p_tag_str
) := {
fieldName := FROM_E,
addressField := {
nameAddr :=
m_NameAddr(
"Anonymous",
//* optional charstring
m_SipUrl_Anonymous //* SipUrl
)
}, //* end addressField
template(value) From m_From_SipUrl(
template(value) SipUrl p_sipUrl
) := {
fieldName := FROM_E,
addressField := {
nameAddr :=
m_NameAddr(
omit,
//* optional charstring
p_sipUrl //* SipUrl
)
}, //* end addressField
template(value) Event m_Event_refer modifies m_Event_base := {eventType := "refer"}
template(value) Event m_Event_conference modifies m_Event_base := {eventType := "conference"}
template(value) Event m_Event_presence modifies m_Event_base := {eventType := "presence"}
template(value) Event m_Event_reg modifies m_Event_base := {eventType := "reg"}
template(value) Event m_Event_cdiv modifies m_Event_base := {eventType := "comm-div-info"}
template(value) Event m_Event_mcid := m_Event_cdiv;
template(value) Expires m_Expires_base := {
fieldName := EXPIRES_E,
deltaSec := ""
}
template(value) Expires m_Expires_600000 modifies m_Expires_base := {deltaSec := "600000"}
template(value) Expires m_Expires(
template(value) charstring p_deltaSec
) modifies m_Expires_base := {
deltaSec := p_deltaSec
}
template(present) Expires mw_Expires(
template(present) charstring p_deltaSec := ?
) := {
fieldName := EXPIRES_E,
deltaSec := p_deltaSec
}
template(value) HistoryInfo m_HistoryInfo(
template(value) HistoryInfo_List p_HistoryInfo_List
) := {
fieldName := HISTORY_INFO_E,
historyInfoList := p_HistoryInfo_List
template(present) HistoryInfo mw_HistoryInfo(
template(present) HistoryInfo_List p_HistoryInfo_List := ?
) := {
fieldName := HISTORY_INFO_E,
historyInfoList := p_HistoryInfo_List
template(value) HistoryInfoEntry m_HistoryInfoEntry(
template(value) SipUrl p_Url,
template(omit) IntegerList p_index := omit,
template(omit) SemicolonParam_List p_paramlist := omit
) := {
nameAddr := m_NameAddr(omit, p_Url),
hiIndex := p_index,
hiExtention := p_paramlist
template(present) SipUrl p_Url := ?,
template IntegerList p_index,
template SemicolonParam_List p_paramlist
) := {
nameAddr := mw_NameAddr(*, p_Url),
hiIndex := p_index,
hiExtention := p_paramlist
template(value) PAssertedID m_PAssertedID(
template(value) Addr_Union p_pAssertedIDValue
) := {
fieldName := P_ASSERTED_ID_E,
pAssertedIDValueList := {p_pAssertedIDValue}
template(value) PAssertedID m_PAssertedID_2x(
template(value) Addr_Union p_pAssertedIDValue,
template(value) Addr_Union p_pAssertedIDValue2
) modifies m_PAssertedID := {
pAssertedIDValueList := {p_pAssertedIDValue, p_pAssertedIDValue2}
}
template(present) PAssertedID mw_PAssertedID(
template(present) PAssertedIDValue p_pAssertedIDValue := ?
) := {
fieldName := P_ASSERTED_ID_E,
pAssertedIDValueList := {p_pAssertedIDValue}
template(present) PAssertedIDValue mw_PAssertedIDValue(
template(present) SipUrl p_SipUrl := ?
) := {
template(value) PPreferredID m_PPreferredID(
template(value) Addr_Union p_pPreferredIDValue
) := {
fieldName := P_PREFERRED_ID_E,
pPreferredIDValueList := {p_pPreferredIDValue}
template(value) Privacy m_Privacy(
template(value) PrivacyValue p_privacy
) := {
fieldName := PRIVACY_E,
privValueList := {p_privacy}
template(present) Privacy mw_Privacy_Base(
template(present) charstring p_value := ?
) := {
template(present) Privacy mw_Privacy_id := mw_Privacy_Base("id");
template(present) Privacy mw_Privacy_user := mw_Privacy_Base("user");
template(value) RAck m_RAck(
integer p_responseNum,
integer p_seqNumber,
charstring p_method
) := {
fieldName := RACK_E,
responseNum := p_responseNum,
seqNumber := p_seqNumber,
template(value) Reason m_Reason(
template(value) integer p_cause
) := {
fieldName := REASON_E,
reasonValues := {m_ReasonValue(int2str(valueof(p_cause)), "dummy")}
template(value) Reason m_Reason21 := {
fieldName := REASON_E,
reasonValues := {m_ReasonValue(int2str(21), "call reject")}
template(present) Reason mw_Reason(
template(value) charstring p_cause
) modifies mw_Reason_Base := {
reasonValues := {mw_ReasonValue(p_cause, ?)}
}
template(present) Reason mw_ReasonSIP(
template(value) charstring p_cause
) modifies mw_Reason_Base := {
reasonValues := {mw_ReasonValueSIP(p_cause, ?)}
}
template(value) RecordRoute m_recordRoute_currIpAddr(
template(value) SipUserProfile p_userprofile
) := {
fieldName := RECORD_ROUTE_E,
routeBody := {
{
nameAddr := {
displayName := omit,
addrSpec := {
scheme := c_sipScheme, //* contains "sip"
urlParameters := omit,
headers := omit
}
},
rrParam := omit
}
}
}
// TODO STF471 addition
template(value) RecordRoute m_recordRoute_currIpAddr_params(
template(value) SipUserProfile p_userprofile,
template(value) SemicolonParam_List p_urlParameters
) := {
fieldName := RECORD_ROUTE_E,
routeBody := {
{
nameAddr := {
displayName := omit,
addrSpec := {
scheme := c_sipScheme, //* contains "sip"
urlParameters := p_urlParameters,
headers := omit
}
},
rrParam := omit
}
}
}
template(value) RouteBody m_routeBody_currIpAddr(
template(value) SipUserProfile p_userprofile
) := {
nameAddr := {
displayName := omit,
addrSpec := {
scheme := c_sipScheme, //* contains "sip"