1,5 → 1,5 |
/** |
* @author STF 346, STF366, STF368, STF369, STF450, STF471 |
* @author STF 346, STF366, STF368, STF369, STF450, STF471, STF160 |
* @version $Id$ |
* @desc This module defines message, header, structured and simple SIP |
* types as well constants used by LipSip constructs. <br> |
13,7 → 13,7 |
*/ |
module LibSip_SIPTypesAndValues { |
import from LibSip_MessageBodyTypes all; |
import from LibSip_PIXITS all; |
import from LibSip_Common all; |
|
group Constants { |
group SimpleConstants { |
74,9 → 74,6 |
// XML name resource-list |
const charstring c_xmlresourcelistApplication := "application/resource-lists+xml"; |
|
// MIME name application |
const charstring c_mimeMultipart := "multipart/mixed;boundary=""" & PX_SIP_MIME_BOUNDARY & """"; |
|
// IMS 3GPP name application |
const charstring c_ims3gppApplication := "application/3gpp-ims+xml"; |
|
104,8 → 101,7 |
// text content of 1300 bytes for messages with message body |
const charstring c_longMessageContent_1300Bytes := |
"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & |
"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & oct2char('0D'O) & oct2char('0A'O); |
// CRLF |
"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & oct2char('0D'O) & oct2char('0A'O); // CRLF |
// Default SIP port number : 5060 |
const integer c_defaultSipPort := 5060; |
|
148,8 → 144,7 |
const PrivacyValue c_privacy_session := "session"; |
|
// |
const charstring c_AT := "@"; |
// MRO |
const charstring c_AT := "@"; // MRO |
const charstring c_SP := oct2char('20'O); |
const charstring c_SLASH := oct2char('2F'O); |
const charstring c_LT := oct2char('3C'O); |
270,8 → 265,7 |
headers := omit |
}; |
|
const To c_empty_To := { |
// value of To header |
const To c_empty_To := { // value of To header |
fieldName := TO_E, |
addressField := { |
nameAddr := { |
546,35 → 540,10 |
UNKNOWN_METHOD_E |
} |
|
type union GenValue { |
charstring tokenOrHost, |
charstring quotedString |
} |
|
// [20.1, 20.3, 20.4, 20.7, 20.9, 20.10, 20.11, 20.18, 20.20, 20.27, 20.28, 20.30, 20.31, |
// 20.33, 20.34, 20.39, 20.42, 20.44 ] |
type record GenericParam { |
charstring id, |
GenValue paramValue optional |
} |
|
// [? ] |
type set of GenericParam SemicolonParam_List; |
|
// [? ] |
type set of GenericParam AmpersandParam_List; |
|
// [? ] |
type set of GenericParam CommaParam_List; |
|
type set length (1..infinity) of charstring Charstring_List; |
|
// [20.10, 20.20, 20.30, 20.31, 20.34, 20.39, 20.42, 20.43 ] |
type record HostPort { |
charstring host optional, |
// hostname, IPv4 or IPv6 |
integer portField |
optional // represented as an integer |
charstring host optional, // hostname, IPv4 or IPv6 |
integer portField optional // represented as an integer |
} |
|
// [20.10, 20.20, 20.30, 20.31, 20.34, 20.39 ] |
597,41 → 566,30 |
* @member urlParameters Contains either SIP or TEL URL parameters, separated by semicolons, e.g. transport=tcp or user=phone |
* @member headers Additional information added after the parameters, e.g. priority=urgent |
*/ |
type record SipUriComponents { |
// sip-uri acc. to RFC 3261 cl. 19.1 |
type record SipUriComponents { // sip-uri acc. to RFC 3261 cl. 19.1 |
UserInfo userInfo optional, |
HostPort hostPort |
} |
|
type record TelUriComponents { |
// tel-uri acc. to RFC 3966 |
type record TelUriComponents { // tel-uri acc. to RFC 3966 |
charstring subscriber |
} |
|
type record UrnUriComponents { |
// urn-uri acc. to RFC 2141 |
charstring namespaceId, |
// e.g. "service" as acc. to RFC 5031 |
charstring |
namespaceSpecificString // e.g. "sos" |
type record UrnUriComponents { // urn-uri acc. to RFC 2141 |
charstring namespaceId, // e.g. "service" as acc. to RFC 5031 |
charstring namespaceSpecificString // e.g. "sos" |
} |
|
type union UriComponents { |
SipUriComponents sip, |
// scheme: "sip" or sips" |
TelUriComponents tel, |
// scheme: "tel" |
UrnUriComponents urn, |
// scheme: "urn" |
charstring |
other // scheme: none of the above schemes |
SipUriComponents sip, // scheme: "sip" or sips" |
TelUriComponents tel, // scheme: "tel" |
UrnUriComponents urn, // scheme: "urn" |
charstring other // scheme: none of the above schemes |
} |
|
type record SipUrl { |
charstring scheme, |
// e.g "sip" or "tel" |
UriComponents components, |
// corresponding to the scheme |
charstring scheme, // e.g "sip" or "tel" |
UriComponents components, // corresponding to the scheme |
SemicolonParam_List urlParameters optional, |
AmpersandParam_List headers optional |
} |
647,8 → 605,7 |
|
// [20.4 ] |
type record AlertInfoBody { |
charstring url, |
// any URI |
charstring url, // any URI |
SemicolonParam_List genericParams optional |
} |
|
663,8 → 620,7 |
|
// [20.9 ] |
type record CallInfoBody { |
charstring url, |
// any URI |
charstring url, // any URI |
SemicolonParam_List infoParams optional |
} |
|
678,8 → 634,15 |
} |
|
// [20.10, 20.20, 20.30, 20.31, 20.34, 20.39 ] |
type union DisplayName |
{ |
charstring token, |
charstring quotedString |
} |
|
// [20.10, 20.20, 20.30, 20.31, 20.34, 20.39 ] |
type record NameAddr { |
charstring displayName optional, |
DisplayName displayName optional, |
SipUrl addrSpec |
} |
|
686,8 → 649,7 |
// [20.10, 20.20, 20.31, 20.39 ] |
type union Addr_Union { |
NameAddr nameAddr, |
SipUrl |
addrSpecUnion // STS: "Union" added to filed name to avoid dangerous name equivalence with 2nd NameAddr field |
SipUrl addrSpecUnion // STS: "Union" added to filed name to avoid dangerous name equivalence with 2nd NameAddr field |
} |
|
// [20.10 ] |
697,8 → 659,7 |
} |
|
// [20.10 ] |
type set of ContactAddress ContactAddress_List; |
// 1 or more elements |
type set of ContactAddress ContactAddress_List; // 1 or more elements |
// [20.10 ] |
type union ContactBody { |
charstring wildcard, |
721,12 → 682,10 |
type record of Credentials CredentialsList; |
|
// [20.19, 20.23, 20.33 ] |
type charstring DeltaSec; |
// an external operation can handle this field |
type charstring DeltaSec; // an external operation can handle this field |
// [20.18 ] |
type record ErrorInfoBody { |
charstring uri, |
// any URI |
charstring uri, // any URI |
SemicolonParam_List genericParams optional |
} |
|
751,7 → 710,6 |
// [20.5 ] |
type set of charstring Method_List; |
|
|
// [20.29, 20.32, 20.37, 20.40 ] |
type charstring OptionTag; |
|
758,7 → 716,6 |
// [20.29, 20.32, 20.37, 20.40 ] |
type set of OptionTag OptionTag_List; |
|
|
// [20.7, 20.27, 20.28, 20.44 ; RFC2616 14.33, 14.47; RFC2617 1.2 ] |
type record OtherAuth { |
charstring authScheme, |
794,10 → 751,8 |
|
// [20.38 ] |
type record TimeValue { |
integer majorDigit, |
// represented as an integer |
integer minorDigit |
optional // represented as an integer |
integer majorDigit, // represented as an integer |
integer minorDigit optional // represented as an integer |
} |
|
// [20.42 ] |
818,8 → 773,7 |
|
// [20.43 ] |
type record WarningValue { |
integer warnCode, |
// represented as an integer |
integer warnCode, // represented as an integer |
WarnAgent warnAgent, |
charstring warnText |
} |
893,8 → 847,7 |
// [20.7 RFC2617 3.2.2 ] |
type record Authorization { |
FieldName fieldName (AUTHORIZATION_E) , |
CredentialsList |
body // changed from Credentials to allow multiple Authorization headers |
CredentialsList body // changed from Credentials to allow multiple Authorization headers |
} |
|
// [20.8 ] |
937,8 → 890,7 |
// [20.14 ] |
type record ContentLength { |
FieldName fieldName (CONTENT_LENGTH_E) , |
integer |
len // this field is represented as an integer |
integer len // this field is represented as an integer |
} |
|
// [20.15 ] |
950,8 → 902,7 |
// [20.16 ] |
type record CSeq { |
FieldName fieldName (CSEQ_E) , |
integer seqNumber, |
// this field is represented as an integer |
integer seqNumber, // this field is represented as an integer |
charstring method |
} |
|
995,8 → 946,7 |
// [20.22 ] |
type record MaxForwards { |
FieldName fieldName (MAX_FORWARDS_E) , |
integer |
forwards // this field is represented as an integer |
integer forwards // this field is represented as an integer |
} |
|
// [20.23 ] |
1008,10 → 958,8 |
// [20.24 RFC2616 19.4.1 ] |
type record MimeVersion { |
FieldName fieldName (MIME_VERSION_E) , |
integer majorNumber, |
// this field is represented as an integer |
integer |
minorNumber // this field is represented as an integer |
integer majorNumber, // this field is represented as an integer |
integer minorNumber // this field is represented as an integer |
} |
|
// [20.25 ] |
1201,8 → 1149,7 |
PMediaAuthorization_List pMediaAuthorizations |
} |
|
type charstring PMediaAuthValue; |
// HEXDIG "0"-"9", "A"-"F" |
type charstring PMediaAuthValue; // HEXDIG "0"-"9", "A"-"F" |
type record of PMediaAuthValue PMediaAuthorization_List; |
|
|
1569,6 → 1516,7 |
Event event optional, |
// 3265/7.2 |
Expires expires optional, |
FeatureCaps featureCaps optional, // 6809 |
From fromField, |
Geolocation geolocation optional, |
// 6442 |
1780,7 → 1728,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
// Note: the introduction of the following specific types is to enable better means for logging |
// on the other side the generic type is useful for functions dealing with multiple SIP message types |
1789,7 → 1737,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
type record INVITE_Request { |
RequestLine requestLine, |
1796,7 → 1744,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
type record OPTIONS_Request { |
RequestLine requestLine, |
1803,7 → 1751,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
type record BYE_Request { |
RequestLine requestLine, |
1810,7 → 1758,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
type record CANCEL_Request { |
RequestLine requestLine, |
1817,7 → 1765,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
type record ACK_Request { |
RequestLine requestLine, |
1824,7 → 1772,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
// [3262/7.1 ] |
type record PRACK_Request { |
1832,7 → 1780,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
// [3265/7.1 ] |
type record NOTIFY_Request { |
1840,7 → 1788,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
// [3265/7.1 ] |
type record SUBSCRIBE_Request { |
1848,7 → 1796,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
// [3903/11.1 ] |
type record PUBLISH_Request { |
1856,7 → 1804,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
// [3311/7 ] |
type record UPDATE_Request { |
1864,7 → 1812,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
type record REFER_Request { |
RequestLine requestLine, |
1871,7 → 1819,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
type record MESSAGE_Request { |
RequestLine requestLine, |
1878,7 → 1826,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
type record INFO_Request { |
RequestLine requestLine, |
1885,7 → 1833,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
type union RequestUnion { |
REGISTER_Request Register, |
1901,7 → 1849,7 |
UPDATE_Request Update, |
REFER_Request Refer, |
MESSAGE_Request Message |
} |
} with { encode "SIPCodec"} |
|
} // end group RequestTypes |
|
1919,7 → 1867,7 |
MessageHeader msgHeader, |
MessageBody messageBody optional, |
Payload payload optional |
} |
} with { encode "SIPCodec"} |
|
} // end group ResponseTypes |
|