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
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;
import from LibSip_SimpleMsgSummaryTypes all;
import from LibSip_MessageBodyTypes all;
import from NoTargetNamespace language "XSD" all
with {
extension "File:../xsd/Ims3gpp.xsd"
}
import from urn_ietf_params_xml_ns_conference_info language "XSD" all
with {
extension "File:../xsd/CONF.xsd"
}
import from http_uri_etsi_org_ngn_params_xml_simservs_pstn language "XSD" all
with {
extension "File:../xsd/PSTN.xsd"
}
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 {
extension "File:../xsd/MCID.xsd"
}
import from urn_ietf_params_xml_ns_resource_lists language "XSD" all
with {
extension "File:../xsd/ResourceList.xsd"
}
import from http_uri_etsi_org_ngn_params_xml_comm_div_info language "XSD" all
with {
extension "File:../xsd/CDIVN.xsd"
}
import from urn_3gpp_ns_cw_1_0 language "XSD" all
with {
extension "File:../xsd/cw.xsd"
}
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:=false; //* 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(template GenericParam p_genericParam) :=
superset(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 ReasonValue m_ReasonValueSIP
(template charstring p_cause, template charstring p_text) :=
{
token := "SIP",
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"
components := {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"
components := {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"
components := {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"
components := {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
}}},
Loading
Loading full blame…