Internet DRAFT - draft-anquetil-megaco-asn1-idl-syntax
draft-anquetil-megaco-asn1-idl-syntax
HTTP/1.1 200 OK
Date: Mon, 08 Apr 2002 22:32:50 GMT
Server: Apache/1.3.20 (Unix)
Last-Modified: Wed, 23 Jun 1999 18:35:18 GMT
ETag: "2e6ecd-92dc-377128e6"
Accept-Ranges: bytes
Content-Length: 37596
Connection: close
Content-Type: text/plain
MEGACO LP. Anquetil
A. Conte
Internet Draft Alcatel
Document: <draft-anquetil-megaco-asn1-idl-syntax-00.txt> June 1999
Category: Informational
MEGACO protocol ASN1/OMG-IDL syntax and API
Status of this Memo
This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC2026 [1].
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts. Internet-Drafts are draft documents valid for a maximum of
six months and may be updated, replaced, or obsoleted by other
documents at any time. It is inappropriate to use Internet- Drafts
as reference material or to cite them other than as "work in
progress."
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
1. Abstract
This draft provides the ASN.1 and the corresponding OMG-IDL generic
command syntax for the MEGACO protocol. It stresses on the use of
OMG-IDL both for syntax and API specifications. As such, a simple
Transactions API is provided using OMG-IDL.
2. Conventions used in this document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
this document are to be interpreted as described in RFC-2119 [2].
3. Draft Objective
As part of the MEGACO working group planned output, an informational
RFC is scheduled for application programming interface for the MC to
MG protocol. This draft tries to contribute to this goal, by
Anquetil, Conte Informational - December 1999 1
MEGACO Protocol ASN1/IDL Syntax and API June 1999
choosing OMG-IDL [3] as specification language, proposing a very
minimal interface to send and receive MEGACOP messages.
4. ASN1 vs. OMG-IDL specifications
This section shortly describes some of the benefits to use OMG-IDL
rather than ASN.1 [4] for specifications.
One of the benefits of OMG-IDL over ASN.1 is that programming
language mapping (say C++ for example) is well defined in OMG-IDL
but is not in ASN.1. Then, if one feeds an ASN.1 compiler with an
ASN.1 specification, the ASN.1 compiler shall produce proprietary
C++ source code, as the mapping from ASN.1 to C++ is not defined.
Actually ASN.1 focuses on interoperability at the binary encoding
level but is not concerned with source code portability. On the
contrary, feeding an OMG-IDL compiler with an OMG-IDL specification
shall produce well-defined C++ source code, presenting the
equivalent OMG-IDL data structures in C++. Furthermore, OMG-IDL
provides language neutral specifications which are not limited to
data structures specifications, but can also be used as direct API
specifications.
Those points are especially relevant from an MG or MGC developper
point of view, as it limits proprietary API specifications, at the
benefit of source code portability between MEGACOP stack providers,
adopting OMG-IDL both for syntax and API specifications.
Actually the use of OMG-IDL for such purposes does not preclude a
text encoding option. In that sense, OMG-IDL is used as a generic
language for API and syntax, the skeleton and proxy stub code
produced by an OMG-IDL compiler being eventually bypassed : send
data directly over some transport protocol (e.g. TCP) with some
proprietary encoding scheme (e.g. text based).
5. Formal Syntax
In the MEGACO protocol draft [5], the syntax specification uses the
augmented Backus-Naur Form (BNF) as described in RFC-2234 [6].
However, such syntax may also be expressed using ASN1 or using OMG-
IDL, according to the automatic translation rules [7] between the
two languages.
Following is expressed the generic command syntax, to differentiate
with the command parameter syntax which is left for further work.
Some of the fields are left as PrintableString or OCTET STRING,
meaning the ABNF parsing shall still be valid, or special binary
values might be defined.
Anquetil, Conte Informational - December 1999 2
MEGACO Protocol ASN1/IDL Syntax and API June 1999
The ASN.1 source code has been compiled using the GNU Snacc compiler
[8], and the OMG-IDL source code using the ORBACUS [9] compiler.
5.1 ASN.1 Syntax
--
-- ASN1 specification of <draft-ietf-megaco-protocol-01.txt>
--
MEGACOP { version(1) }
DEFINITIONS IMPLICIT TAGS ::=
BEGIN
Message ::= SEQUENCE
{
systemId SystemId,
transactions SEQUENCE OF Transaction
}
Transaction ::= CHOICE
{
transactionRequest [0] TransactionRequest,
transactionAccept [1] TransactionAccept,
transactionReject [2] TransactionReject
}
TransactionRequest ::= SEQUENCE
{
transactionId TransactionId,
actions SEQUENCE OF Action
}
TransactionAccept ::= SEQUENCE
{
transactionId TransactionId,
actionAccepts SEQUENCE OF ActionAccept
}
TransactionReject ::= SEQUENCE
{
transactionId TransactionId,
actionRejects SEQUENCE OF ActionReject
}
ActionAccept ::= SEQUENCE
{
contextId ContextId,
commandAccepts SEQUENCE OF CommandAccept
}
CommandAccept ::= SEQUENCE
Anquetil, Conte Informational - December 1999 3
MEGACO Protocol ASN1/IDL Syntax and API June 1999
{
commandName CommandName,
terminationId TerminationId OPTIONAL,
parameters SEQUENCE OF Parameters OPTIONAL
}
ActionReject ::= SEQUENCE
{
contextId ContextId,
commandRejects SEQUENCE OF CommandReject
}
CommandReject ::= SEQUENCE
{
commandName [0] CommandName,
terminationId [1] TerminationId OPTIONAL,
errorMessage [2] ErrorMessage
}
ErrorMessage ::= SEQUENCE
{
errorCode ErrorCode,
errorText ErrorText
}
ErrorCode ::= OCTET STRING(SIZE(3))
ErrorText ::= PrintableString
TransactionId ::= INTEGER -- yields INTEGER32 in IDL --
SystemId ::= SEQUENCE
{
domainName DomainName,
portNumber PortNumber
}
DomainName ::= PrintableString -- parse as RFC821 --
PortNumber ::= OCTET STRING(SIZE(2)) -- room for more than 5 digits
--
Action ::= SEQUENCE
{
contextId ContextId,
commands SEQUENCE OF Command
}
ContextId ::= INTEGER -- with special values definitions --
nullContext ContextId ::= 0
unspecifiedContext ContextId ::= 1
Command ::= SEQUENCE
{
Anquetil, Conte Informational - December 1999 4
MEGACO Protocol ASN1/IDL Syntax and API June 1999
commandName CommandName,
terminationId TerminationId,
parameters Parameters
}
CommandName ::= ENUMERATED
{
add(0),
subtract(1),
modify(2),
move(3),
audit(4),
notify(5),
serviceChange(6)
}
TerminationId ::= PrintableString -- parse naming hierachy as
defined in ABNF --
Parameters ::= SEQUENCE
{
terminationState [0] TerminationState
OPTIONAL,
localTerminationDescriptor [1] LocalTerminationDescriptor
OPTIONAL,
remoteTerminationDescriptor [2] RemoteTerminationDescriptor
OPTIONAL,
eventsDescriptor [3] EventsDescriptor OPTIONAL,
signalDescriptor [4] SignalDescriptor OPTIONAL,
digitMapDescriptor [5] DigitMapDescriptor OPTIONAL,
requestedInfo [6] RequestedInfo OPTIONAL,
serviceChangeMethod [7] ServiceChangeMethod OPTIONAL,
serviceChangeReason [8] ServiceChangeReason OPTIONAL,
serviceChangeDelay [9] ServiceChangeDelay OPTIONAL,
observedEvents [10] ObservedEvents OPTIONAL,
statistics [11] Statistics OPTIONAL,
capabilities [12] Capabilities OPTIONAL,
mgcIdentity [13] MGCIdentity OPTIONAL,
parameterValues [14] SEQUENCE OF ParameterValue
OPTIONAL
}
TerminationState ::= SEQUENCE
{
terminationMode [0] TerminationMode
OPTIONAL,
bufferedEventHandling [1] BufferedEventHandling
OPTIONAL
}
TerminationMode ::= ENUMERATED
{
sendonly(0),
Anquetil, Conte Informational - December 1999 5
MEGACO Protocol ASN1/IDL Syntax and API June 1999
recvonly(1),
sendrecv(2),
inactive(3),
loopback(4),
conttest(5),
outOfService(6)
}
BufferedEventHandling ::= CHOICE
{
loopControl [0] LoopControl,
processControl [2] ProcessControl,
loopProcessControl [3] LoopProcessControl
}
LoopProcessControl ::= SEQUENCE
{
loopControl LoopControl,
processControl ProcessControl
}
LoopControl ::= ENUMERATED
{
step(0),
loop(1)
}
ProcessControl ::= ENUMERATED
{
process(0),
discard(1)
}
LocalTerminationDescriptor ::= TerminationDescriptor
RemoteTerminationDescriptor ::= TerminationDescriptor
EventsDescriptor ::= SEQUENCE OF RequestedEvent
RequestedEvent ::= SEQUENCE
{
eventName [0] EventName,
eventParameters [1] SEQUENCE OF EventParameter
OPTIONAL,
requestedActions [2] RequestedActions
OPTIONAL
}
EventParameter ::= SEQUENCE
{
parameterName ParameterName,
parameterValue ParameterValue
}
Anquetil, Conte Informational - December 1999 6
MEGACO Protocol ASN1/IDL Syntax and API June 1999
ParameterName ::= PrintableString
ParameterValue ::= PrintableString
RequestId ::= INTEGER
RequestedActions ::= SEQUENCE
{
requestedAction [0] RequestedAction,
embeddedSignalEvent [1] EmbeddedSignalEvent
OPTIONAL,
mediaAction [2] MediaAction
OPTIONAL
}
RequestedAction ::= CHOICE
{
tokenAction [0] TokenAction,
digitMapName [1] DigitMapName,
scriptName [2] ScriptName
}
TokenAction ::= OCTET STRING(SIZE(1))
notifyAction TokenAction ::= '01'H
accumulateAction TokenAction ::= '02'H
DigitMapName ::= PrintableString
ScriptName ::= PrintableString
EmbeddedSignalEvent ::= SEQUENCE
{
-- Differentiate EmbbededEventsDescriptor with EventsDescriptor
-- to avoid cycles which are forbidden in IDL (-> maximum is one
-- level of embedding)
eventsDescriptor [0] EmbeddedEventsDescriptor
OPTIONAL,
signalDescriptor [1] SignalDescriptor
OPTIONAL
}
EmbeddedEventsDescriptor ::= SEQUENCE OF EmbeddedRequestedEvent
EmbeddedRequestedEvent ::= SEQUENCE
{
eventName [0] EventName,
eventParameters [1] SEQUENCE OF EventParameter
OPTIONAL
-- no further requestedActions defined (-> maximum is one level
-- of embedding)
}
MediaAction ::= OCTET STRING(SIZE(1))
Anquetil, Conte Informational - December 1999 7
MEGACO Protocol ASN1/IDL Syntax and API June 1999
SignalDescriptor ::= SEQUENCE OF SignalRequest
SignalRequest ::= SEQUENCE
{
eventName EventName,
eventParameters SEQUENCE OF EventParameter
OPTIONAL
}
EventName ::= PrintableString -- parse as defined in ABNF --
DigitMapDescriptor ::= SEQUENCE
{
digitMapName DigitMapName,
digitMapValue DigitMapValue
}
DigitMapValue ::= SEQUENCE
{
longTimer [0] LongTimer
OPTIONAL,
shortTimer [1] ShortTimer
OPTIONAL,
digitMap [2] DigitMap
}
LongTimer ::= INTEGER(1..99)
ShortTimer ::= INTEGER(1..99)
DigitMap ::= PrintableString -- parse as defined in ABNF --
RequestedInfo ::= SEQUENCE OF InfoCode
InfoCode ::= ENUMERATED
{
terminationState(0),
localTermDesc(1),
remoteTermDesc(2),
eventDesc(3),
signalDesc(4),
digitMap(5),
stats(6),
obsrvdEvnts(7)
}
ServiceChangeMethod ::= ENUMERATED
{
graceful(0),
forced(1),
restart(2),
failover(3)
}
Anquetil, Conte Informational - December 1999 8
MEGACO Protocol ASN1/IDL Syntax and API June 1999
ServiceChangeReason ::= PrintableString -- added to ABNF --
ServiceChangeDelay ::= INTEGER
ObservedEvents ::= SEQUENCE
{
requestId RequestId,
observedEvents SEQUENCE OF ObservedEvent
}
ObservedEvent ::= SEQUENCE
{
timeNotation [0] TimeNotation OPTIONAL,
signalRequest [1] SignalRequest
}
TimeNotation ::= INTEGER
-- Meant INTEGER64 but CORBA::Long is 32 bits
-- Alternative is OCTET STRING(SIZE(8))
Statistics ::= SEQUENCE OF StatisticsParameter
StatisticsParameter ::= CHOICE
{
packetsSent [0] PacketsSent,
octetsSent [1] OctetsSent,
packetsReceived [2] PacketsReceived,
octetsReceived [3] OctetsReceived,
packetsLost [4] PacketsLost,
jitter [5] Jitter,
averageLatency [6] AverageLatency
}
-- INTEGER yields CORBA::Long which is 32 bits
-- Alternative is OCTET STRING(SIZE(8))
PacketsSent ::= INTEGER -- INTEGER64 see warning above --
OctetsSent ::= INTEGER -- INTEGER64 see warning above --
PacketsReceived ::= INTEGER -- INTEGER64 see warning above --
OctetsReceived ::= INTEGER -- INTEGER64 see warning above --
PacketsLost ::= INTEGER -- INTEGER32 --
Jitter ::= INTEGER -- INTEGER32 --
AverageLatency ::= INTEGER -- INTEGER32 --
Capabilities ::= PrintableString -- TBD --
MGCIdentity ::= SystemId
TerminationDescriptor ::= PrintableString -- TBD SDP vs. H245 --
END -- end of module --
-- end of file
Anquetil, Conte Informational - December 1999 9
MEGACO Protocol ASN1/IDL Syntax and API June 1999
5.2 OMG-IDL Syntax
#ifndef _MEGaCO_IDL_
#define _MEGaCO_IDL_
#include "ASN1Types.idl"
module MEGACOP
{
//---------------------------------------------------------------
// value definitions:
const ASN1_Integer nullContext = 0;
const ASN1_Integer unspecifiedContext = 1;
const ASN1_Integer version = 1;
interface ConstValues {
ASN1_OctetString notifyAction(); //"'01'H"
ASN1_OctetString accumulateAction(); //"'02'H"
};
//---------------------------------------------------------------
// type definitions:
/* OCTET STRING (SIZE (3)) */
typedef sequence<octet, 3> ErrorCodeType;
/* INTEGER */
typedef ASN1_Integer TransactionId;
/* OCTET STRING (SIZE (2)) */
typedef sequence<octet, 2> PortNumberType;
/* INTEGER */
typedef ASN1_Integer ContextId;
/* ENUMERATED */
enum CommandNameType
{
add, // (original value = 0)
subtract, // (original value = 1)
modify, // (original value = 2)
move, // (original value = 3)
audit, // (original value = 4)
Anquetil, Conte Informational - December 1999 10
MEGACO Protocol ASN1/IDL Syntax and API June 1999
notify, // (original value = 5)
serviceChange // (original value = 6)
};
/* ENUMERATED */
enum TerminationModeType
{
sendonly, // (original value = 0)
recvonly, // (original value = 1)
sendrecv, // (original value = 2)
inactive, // (original value = 3)
loopback, // (original value = 4)
conttest, // (original value = 5)
outOfService // (original value = 6)
};
/* ENUMERATED */
enum LoopControlType
{
step, // (original value = 0)
loop // (original value = 1)
};
/* ENUMERATED */
enum ProcessControlType
{
process, // (original value = 0)
discard // (original value = 1)
};
/* INTEGER */
typedef ASN1_Integer RequestId;
/* OCTET STRING (SIZE (1)) */
typedef sequence<octet, 1> TokenActionType;
/* OCTET STRING (SIZE (1)) */
typedef sequence<octet, 1> MediaActionType;
/* INTEGER (1..99) */
typedef ASN1_Unsigned16 LongTimer;
/* INTEGER (1..99) */
typedef ASN1_Unsigned16 ShortTimer;
/* ENUMERATED */
enum InfoCodeType
{
Anquetil, Conte Informational - December 1999 11
MEGACO Protocol ASN1/IDL Syntax and API June 1999
terminationState, // (original value = 0)
localTermDesc, // (original value = 1)
remoteTermDesc, // (original value = 2)
eventDesc, // (original value = 3)
signalDesc, // (original value = 4)
digitMap, // (original value = 5)
stats, // (original value = 6)
obsrvdEvnts // (original value = 7)
};
/* ENUMERATED */
enum ServiceChangeMethodType
{
graceful, // (original value = 0)
forced, // (original value = 1)
restart, // (original value = 2)
failover // (original value = 3)
};
/* INTEGER */
typedef ASN1_Integer ServiceChangeDelay;
/* INTEGER */
typedef ASN1_Integer TimeNotation;
/* INTEGER */
typedef ASN1_Integer PacketsSent;
/* INTEGER */
typedef ASN1_Integer OctetsSent;
/* INTEGER */
typedef ASN1_Integer PacketsReceived;
/* INTEGER */
typedef ASN1_Integer OctetsReceived;
/* INTEGER */
typedef ASN1_Integer PacketsLost;
/* INTEGER */
typedef ASN1_Integer Jitter;
/* INTEGER */
typedef ASN1_Integer AverageLatency;
Anquetil, Conte Informational - December 1999 12
MEGACO Protocol ASN1/IDL Syntax and API June 1999
/* PrintableString */
typedef PrintableStringType ErrorTextType;
/* PrintableString */
typedef PrintableStringType DomainNameType;
/* PrintableString */
typedef PrintableStringType TerminationIdType;
/* PrintableString */
typedef PrintableStringType ParameterNameType;
/* PrintableString */
typedef PrintableStringType ParameterValueType;
/* PrintableString */
typedef PrintableStringType DigitMapNameType;
/* PrintableString */
typedef PrintableStringType ScriptNameType;
/* PrintableString */
typedef PrintableStringType EventNameType;
/* PrintableString */
typedef PrintableStringType DigitMapType;
/* PrintableString */
typedef PrintableStringType ServiceChangeReasonType;
/* PrintableString */
typedef PrintableStringType CapabilitiesType;
/* PrintableString */
typedef PrintableStringType TerminationDescriptorType;
typedef sequence<ParameterValueType>
ParametersParameterValuesType;
Anquetil, Conte Informational - December 1999 13
MEGACO Protocol ASN1/IDL Syntax and API June 1999
struct ErrorMessageType
{
ErrorCodeType errorCode;
ErrorTextType errorText;
};
struct SystemIdType
{
DomainNameType domainName;
PortNumberType portNumber;
};
struct LoopProcessControlType
{
LoopControlType loopControl;
ProcessControlType processControl;
};
/* TerminationDescriptor */
typedef TerminationDescriptorType LocalTerminationDescriptorType;
/* TerminationDescriptor */
typedef TerminationDescriptorType RemoteTerminationDescriptorType;
struct EventParameterType
{
ParameterNameType parameterName;
ParameterValueType parameterValue;
};
enum RequestedActionTypeChoice
{
tokenActionChoice,
digitMapNameChoice,
scriptNameChoice
};
union RequestedActionType switch (RequestedActionTypeChoice)
{
case tokenActionChoice: TokenActionType tokenAction;
case digitMapNameChoice: DigitMapNameType digitMapName;
case scriptNameChoice: ScriptNameType scriptName;
};
Anquetil, Conte Informational - December 1999 14
MEGACO Protocol ASN1/IDL Syntax and API June 1999
union LongTimerOpt
switch (boolean) {
case TRUE: LongTimer value; };
union ShortTimerOpt
switch (boolean) {
case TRUE: ShortTimer value; };
struct DigitMapValueType
{
LongTimerOpt longTimer;
ShortTimerOpt shortTimer;
DigitMapType digitMap;
};
typedef sequence<InfoCodeType> RequestedInfoType;
enum StatisticsParameterTypeChoice
{
packetsSentChoice,
octetsSentChoice,
packetsReceivedChoice,
octetsReceivedChoice,
packetsLostChoice,
jitterChoice,
averageLatencyChoice
};
union StatisticsParameterType switch
(StatisticsParameterTypeChoice)
{
case packetsSentChoice: PacketsSent packetsSent;
case octetsSentChoice: OctetsSent octetsSent;
case packetsReceivedChoice: PacketsReceived
packetsReceived;
case octetsReceivedChoice: OctetsReceived octetsReceived;
case packetsLostChoice: PacketsLost packetsLost;
case jitterChoice: Jitter jitter;
case averageLatencyChoice: AverageLatency averageLatency;
};
/* SystemId */
typedef SystemIdType MGCIdentityType;
typedef sequence<EventParameterType>
SignalRequestEventParametersType;
Anquetil, Conte Informational - December 1999 15
MEGACO Protocol ASN1/IDL Syntax and API June 1999
typedef sequence<EventParameterType>
EmbeddedRequestedEventEventParametersType;
typedef sequence<EventParameterType>
RequestedEventEventParametersType;
union TerminationIdTypeOpt
switch (boolean) {
case TRUE: TerminationIdType value; };
struct CommandRejectType
{
CommandNameType commandName;
TerminationIdTypeOpt terminationId;
ErrorMessageType errorMessage;
};
enum BufferedEventHandlingTypeChoice
{
loopControlChoice,
processControlChoice,
loopProcessControlChoice
};
union BufferedEventHandlingType switch
(BufferedEventHandlingTypeChoice)
{
case loopControlChoice: LoopControlType loopControl;
case processControlChoice: ProcessControlType
processControl;
case loopProcessControlChoice: LoopProcessControlType
loopProcessControl;
};
union EmbeddedRequestedEventEventParametersTypeOpt
switch (boolean) {
case TRUE: EmbeddedRequestedEventEventParametersType value; };
struct EmbeddedRequestedEventType
{
EventNameType eventName;
EmbeddedRequestedEventEventParametersTypeOpt
eventParameters;
};
union SignalRequestEventParametersTypeOpt
switch (boolean) {
case TRUE: SignalRequestEventParametersType value; };
Anquetil, Conte Informational - December 1999 16
MEGACO Protocol ASN1/IDL Syntax and API June 1999
struct SignalRequestType
{
EventNameType eventName;
SignalRequestEventParametersTypeOpt eventParameters;
};
struct DigitMapDescriptorType
{
DigitMapNameType digitMapName;
DigitMapValueType digitMapValue;
};
union TimeNotationOpt
switch (boolean) {
case TRUE: TimeNotation value; };
struct ObservedEventType
{
TimeNotationOpt timeNotation;
SignalRequestType signalRequest;
};
typedef sequence<StatisticsParameterType> StatisticsType;
typedef sequence<ObservedEventType>
ObservedEventsObservedEventsType;
typedef sequence<CommandRejectType>
ActionRejectCommandRejectsType;
struct ActionRejectType
{
ContextId contextId;
ActionRejectCommandRejectsType commandRejects;
};
union TerminationModeTypeOpt
switch (boolean) {
case TRUE: TerminationModeType value; };
union BufferedEventHandlingTypeOpt
switch (boolean) {
case TRUE: BufferedEventHandlingType value; };
Anquetil, Conte Informational - December 1999 17
MEGACO Protocol ASN1/IDL Syntax and API June 1999
struct TerminationStateType
{
TerminationModeTypeOpt terminationMode;
BufferedEventHandlingTypeOpt bufferedEventHandling;
};
typedef sequence<EmbeddedRequestedEventType>
EmbeddedEventsDescriptorType;
typedef sequence<SignalRequestType> SignalDescriptorType;
struct ObservedEventsType
{
RequestId requestId;
ObservedEventsObservedEventsType observedEvents;
};
typedef sequence<ActionRejectType>
TransactionRejectActionRejectsType;
struct TransactionRejectType
{
TransactionId transactionId;
TransactionRejectActionRejectsType actionRejects;
};
union EmbeddedEventsDescriptorTypeOpt
switch (boolean) {
case TRUE: EmbeddedEventsDescriptorType value; };
union SignalDescriptorTypeOpt
switch (boolean) {
case TRUE: SignalDescriptorType value; };
struct EmbeddedSignalEventType
{
EmbeddedEventsDescriptorTypeOpt eventsDescriptor;
SignalDescriptorTypeOpt signalDescriptor;
};
union EmbeddedSignalEventTypeOpt
switch (boolean) {
case TRUE: EmbeddedSignalEventType value; };
union MediaActionTypeOpt
Anquetil, Conte Informational - December 1999 18
MEGACO Protocol ASN1/IDL Syntax and API June 1999
switch (boolean) {
case TRUE: MediaActionType value; };
struct RequestedActionsType
{
RequestedActionType requestedAction;
EmbeddedSignalEventTypeOpt embeddedSignalEvent;
MediaActionTypeOpt mediaAction;
};
union RequestedEventEventParametersTypeOpt
switch (boolean) {
case TRUE: RequestedEventEventParametersType value; };
union RequestedActionsTypeOpt
switch (boolean) {
case TRUE: RequestedActionsType value; };
struct RequestedEventType
{
EventNameType eventName;
RequestedEventEventParametersTypeOpt eventParameters;
RequestedActionsTypeOpt requestedActions;
};
typedef sequence<RequestedEventType> EventsDescriptorType;
union TerminationStateTypeOpt
switch (boolean) {
case TRUE: TerminationStateType value; };
union LocalTerminationDescriptorTypeOpt
switch (boolean) {
case TRUE: LocalTerminationDescriptorType value; };
union RemoteTerminationDescriptorTypeOpt
switch (boolean) {
case TRUE: RemoteTerminationDescriptorType value; };
union EventsDescriptorTypeOpt
switch (boolean) {
case TRUE: EventsDescriptorType value; };
union DigitMapDescriptorTypeOpt
switch (boolean) {
case TRUE: DigitMapDescriptorType value; };
union RequestedInfoTypeOpt
switch (boolean) {
Anquetil, Conte Informational - December 1999 19
MEGACO Protocol ASN1/IDL Syntax and API June 1999
case TRUE: RequestedInfoType value; };
union ServiceChangeMethodTypeOpt
switch (boolean) {
case TRUE: ServiceChangeMethodType value; };
union ServiceChangeReasonTypeOpt
switch (boolean) {
case TRUE: ServiceChangeReasonType value; };
union ServiceChangeDelayOpt
switch (boolean) {
case TRUE: ServiceChangeDelay value; };
union ObservedEventsTypeOpt
switch (boolean) {
case TRUE: ObservedEventsType value; };
union StatisticsTypeOpt
switch (boolean) {
case TRUE: StatisticsType value; };
union CapabilitiesTypeOpt
switch (boolean) {
case TRUE: CapabilitiesType value; };
union MGCIdentityTypeOpt
switch (boolean) {
case TRUE: MGCIdentityType value; };
union ParametersParameterValuesTypeOpt
switch (boolean) {
case TRUE: ParametersParameterValuesType value; };
struct ParametersType
{
TerminationStateTypeOpt terminationState;
LocalTerminationDescriptorTypeOpt
localTerminationDescriptor;
RemoteTerminationDescriptorTypeOpt
remoteTerminationDescriptor;
EventsDescriptorTypeOpt eventsDescriptor;
SignalDescriptorTypeOpt signalDescriptor;
DigitMapDescriptorTypeOpt digitMapDescriptor;
RequestedInfoTypeOpt requestedInfo;
ServiceChangeMethodTypeOpt serviceChangeMethod;
ServiceChangeReasonTypeOpt serviceChangeReason;
ServiceChangeDelayOpt serviceChangeDelay;
ObservedEventsTypeOpt observedEvents;
StatisticsTypeOpt statistics;
CapabilitiesTypeOpt capabilities;
MGCIdentityTypeOpt mgcIdentity;
ParametersParameterValuesTypeOpt parameterValues;
Anquetil, Conte Informational - December 1999 20
MEGACO Protocol ASN1/IDL Syntax and API June 1999
};
typedef sequence<ParametersType> CommandAcceptParametersType;
union CommandAcceptParametersTypeOpt
switch (boolean) {
case TRUE: CommandAcceptParametersType value; };
struct CommandAcceptType
{
CommandNameType commandName;
TerminationIdTypeOpt terminationId;
CommandAcceptParametersTypeOpt parameters;
};
struct CommandType
{
CommandNameType commandName;
TerminationIdType terminationId;
ParametersType parameters;
};
typedef sequence<CommandType> ActionCommandsType;
typedef sequence<CommandAcceptType>
ActionAcceptCommandAcceptsType;
struct ActionAcceptType
{
ContextId contextId;
ActionAcceptCommandAcceptsType commandAccepts;
};
struct ActionType
{
ContextId contextId;
ActionCommandsType commands;
};
typedef sequence<ActionAcceptType>
TransactionAcceptActionAcceptsType;
typedef sequence<ActionType> TransactionRequestActionsType;
Anquetil, Conte Informational - December 1999 21
MEGACO Protocol ASN1/IDL Syntax and API June 1999
struct TransactionRequestType
{
TransactionId transactionId;
TransactionRequestActionsType actions;
};
struct TransactionAcceptType
{
TransactionId transactionId;
TransactionAcceptActionAcceptsType actionAccepts;
};
enum TransactionTypeChoice
{
transactionRequestChoice,
transactionAcceptChoice,
transactionRejectChoice
};
union TransactionType switch (TransactionTypeChoice)
{
case transactionRequestChoice: TransactionRequestType
transactionRequest;
case transactionAcceptChoice: TransactionAcceptType
transactionAccept;
case transactionRejectChoice: TransactionRejectType
transactionReject;
};
typedef sequence<TransactionType> MessageTransactionSeqType;
struct MessageType
{
SystemIdType systemId;
MessageTransactionSeqType transactionSeq;
};
}; // end of module MEGACOP
#endif /* conditional include of megaco.idl */
6. Transactions API
Anquetil, Conte Informational - December 1999 22
MEGACO Protocol ASN1/IDL Syntax and API June 1999
This very simple transactions API allows to send and receive MEGACOP
messages, as defined in the megaco.idl file (see previous section).
A client entity wishing to send transactions simply needs to
fullfils the corresponding data structures (say in C++ as expressed
by the OMG-IDL to C++ mapping rules).
Conversely a server entity wishing to received transactions, simply
needs to provide an implementation for the i_TransactionsReceiver
interface. It shall get notified through the receive function with
the received transactions as input parameter.
#ifndef _TRANSACTIONS_IDL_
#define _TRANSACTIONS_IDL_
#include "megaco.idl" // see section 5.2
typedef sequence<MEGACOP::TransactionType> Transactions;
interface i_TransactionsSender {
oneway void send(in Transactions transactions);
};
interface i_TransactionsReceiver {
oneway void receive(in Transactions transactions);
};
#endif
8. Security Considerations
Security considerations are believed to be irrelevant to this draft.
9. References
1 Bradner, S., "The Internet Standards Process -- Revision 3", BCP
9, RFC 2026, October 1996.
2 Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", BCP 14, RFC 2119, March 1997
3 "The Common Object Request Broker: Architecture and
Specification", Revision 2.2 February 1998, Chapter 3 "OMG IDL
Syntax and Semantics", http://www.omg.org
4 Recommandation X.208, "Open systems interconnection:
specification of Abstract Syntax Notation (ASN.1)", CCITT Blue
Book, Fascicle VIII.4, ITU, Geneva 1989, pp 57-130
Anquetil, Conte Informational - December 1999 23
MEGACO Protocol ASN1/IDL Syntax and API June 1999
5 Cuervo, F., Huitema, C., Kelly, K., Rosen, B., Sijben, P.,
Zimmerer, E., "MEGACO Protocol", <draft-ietf-megaco-protocol-
01.txt>, April 16, 1999
6 Crocker, D. and Overell, P.(Editors), "Augmented BNF for Syntax
Specifications: ABNF", RFC 2234, Internet Mail Consortium and
Demon Internet Ltd., November 1997
7 "X/Open, Preliminary Specification, Inter-Domain Management:
Specification Translation, Feb 1997"
http://www.opengroup.org/onlinepubs/8349099/toc.htm
8 GNU Snacc can be downloaded from
http://www.fokus.gmd.de/ovma/freeware/snacc/entry.html.
9 ORBACUS source code can be downloaded from http://www.ooc.com/.
It is free for non-commercial use.
10. Acknowledgments
The authors are grateful to the authors of the MEGACO protocol
draft, as well as to the authors of former proposals, who have
contributed to the idea of a distributed call model, which goes
actually far beyond the problem of distributed gateways.
11. Author's Addresses
LP Anquetil, A Conte
Alcatel CRC
Route de Nozay, F-91461 Marcoussis Cedex France
Email: laurent.anquetil@alcatel.fr, alberto.conte@alcatel.fr
Anquetil, Conte Informational - December 1999 24
MEGACO Protocol ASN1/IDL Syntax and API June 1999
Full Copyright Statement
"Copyright (C) The Internet Society (date). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implmentation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph
are included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into
Anquetil, Conte Informational - December 1999 25