Compare Revisions

The credentials to download the source code are:
 Username: svnusers
 Password: svnusers

Ignore whitespace Rev 636 → Rev 637

/tags/v3.0.0/ttcn/LibSip_Common.ttcn
0,0 → 1,39
/**
* @author STF160, STF471
* @version $Id: LibSip_Common.ttcn 488 2014-09-18 10:17:19Z rennoch $
* @desc This module provides the common definitions for SIP messages.
* This module is part of LibSipV3.
*/
module LibSip_Common {
 
type set length (1..infinity) of charstring Charstring_List;
// [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 union GenValue {
charstring tokenOrHost,
charstring quotedString
}
 
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;
//------------------------------------------------------------------------------
}
with {
encode "LibSip V3";
} // end module LibSip_Common
/tags/v3.0.0/ttcn/LibSip_MessageBodyTypes.ttcn
31,8 → 31,7
}
 
type record MIME_Message {
charstring boundary,
// len:
charstring boundary, // len:
MimeEncapsulatedList mimeEncapsulatedList
}
 
42,19 → 41,13
} // group MIMETypes
 
type union MessageBody {
SDP_Message sdpMessageBody,
// if there is only SDP part
SDP_Message sdpMessageBody, // if there is only SDP part
// XMLMessage xmlMessage, // if there is XML message (with header and body)
XmlBody xmlBody,
// if there is XML body
MIME_Message mimeMessageBody,
// if there is SDP and encapsulated ISUP part
charstring sipfrag,
// if content-Type is message/sipfrag (cp. NOTIFY, cp TS124147 A.4.3.1.2)
charstring textplain,
// if content type is text/plain (for testing long messages)
SimpleMsgSummary simpleMsgSummary,
// RFC 3842
XmlBody xmlBody, // if there is XML body
MIME_Message mimeMessageBody, // if there is SDP and encapsulated ISUP part
charstring sipfrag, // if content-Type is message/sipfrag (cp. NOTIFY, cp TS124147 A.4.3.1.2)
charstring textplain, // if content type is text/plain (for testing long messages)
SimpleMsgSummary simpleMsgSummary, // RFC 3842
octetstring smsMessage // encoded SMS message 3GPP 23.040, 24.011
}
}
/tags/v3.0.0/ttcn/LibSip_SDPTypes.ttcn
11,7 → 11,7
* @remark Adding of new attributes types is ok; Adding of new optional attributes in @see SDP_attribute type is ok; Existing attribute types shall not be changed or removed - change requests shall be made to http://t-ort.etsi.org
*/
module LibSip_SDPTypes {
import from LibSip_SIPTypesAndValues all;
import from LibSip_Common all;
group Constants {
group SimpleConstants {
// SDP net_type
/tags/v3.0.0/ttcn/LibSip_SIPTypesAndValues.ttcn
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
 
/tags/v3.0.0/ttcn/LibSip_Steps.ttcn
16,6 → 16,7
import from LibSip_Interface all;
import from LibSip_PIXITS all;
import from LibSip_XMLTypes all;
import from LibSip_Common all;
 
group externalfunctions {
 
/tags/v3.0.0/ttcn/LibSip_Templates.ttcn
19,6 → 19,7
import from LibSip_XMLTypes all;
import from LibSip_SimpleMsgSummaryTypes all;
import from LibSip_MessageBodyTypes all;
import from LibSip_Common all;
 
import from NoTargetNamespace language "XSD" all
with {
65,7 → 66,7
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) DisplayName p_displayName,
template(value) SipUrl p_addrSpec
) := {
nameAddr := m_CallingAddr(p_displayName, p_addrSpec)
72,7 → 73,7
}
 
template(value) NameAddr m_NameAddr(
template(omit) charstring p_displayName := omit,
template(omit) DisplayName p_displayName := omit,
template(value) SipUrl p_addrSpec
) := {
displayName := p_displayName,
80,12 → 81,12
}
 
template(value) NameAddr m_CallingAddr(
template(value) charstring p_displayName,
template(value) DisplayName p_displayName,
template(value) SipUrl p_addrSpec
) := m_NameAddr(p_displayName, p_addrSpec);
 
template(present) NameAddr mw_NameAddr(
template charstring p_displayName,
template DisplayName p_displayName,
template(present) SipUrl p_addrSpec := ?
) := {
displayName := p_displayName,
539,7 → 540,7
template(present) StatusLine mw_statusLineFinal modifies mw_statusLine_any := {statusCode := (200 .. 699)}
 
template(present) NameAddr mw_NameAddr_DispName_User_Host(
template charstring p_dn,
template DisplayName p_dn,
template(present) charstring p_user := ?,
template charstring p_host
) := {
565,7 → 566,7
}
 
template(present) Addr_Union mw_AddrUnion_Nameaddr(
template charstring p_dn,
template DisplayName p_dn,
template(present) charstring p_user := ?,
template charstring p_host
) := {
723,7 → 724,7
addressField := {
nameAddr :=
m_NameAddr(
"Anonymous",
{token:="Anonymous"},
//* optional charstring
m_SipUrl_Anonymous //* SipUrl
)
1133,7 → 1134,7
addressField := {
nameAddr :=
m_NameAddr(
"ETSI Tester",
{token:="ETSI Tester"},
//* optional charstring
p_sipUrl //* SipUrl
)
1153,7 → 1154,7
}
 
template(present) To mw_To_NameAddr_SipUrl(
template charstring p_dn,
template DisplayName p_dn,
template(present) charstring p_user := ?,
template charstring p_host
) := {
1179,7 → 1180,7
}
 
template(present) From mw_From_NameAddr_SipUrl(
template charstring p_dn,
template DisplayName p_dn,
template(present) charstring p_user := ?,
template charstring p_host
) := {
1372,6 → 1373,7
errorInfo := omit,
event := omit, //* RFC3265
expires := omit,
featureCaps := omit,
fromField := c_empty_From,
geolocation := omit,
geolocationRouting := omit,
1472,6 → 1474,7
errorInfo := *,
event := *, //* RFC3265
expires := *,
featureCaps := *,
fromField := ?,
geolocation := *,
geolocationRouting := *,