tech-invite   World Map     

IETF     RFCs     Groups     SIP     ABNFs    |    3GPP     Specs     Glossaries     Architecture     IMS     UICC    |    search

RFC 2885

 
 
 

Megaco Protocol version 0.8

Part 2 of 6, p. 20 to 54
Prev RFC Part       Next RFC Part

 


prevText      Top      Up      ToC       Page 20 
7. COMMANDS

   The protocol provides commands for manipulating the logical entities
   of the protocol connection model, Contexts and Terminations.
   Commands provide control at the finest level of granularity supported
   by the protocol.  For example, Commands exist to add Terminations to
   a Context, modify Terminations, subtract Terminations from a Context,
   and audit properties of Contexts or Terminations. Commands provide
   for complete control of the properties of Contexts and Terminations.
   This includes specifying which events a Termination is to report,
   which signals/actions are to be applied to a Termination and
   specifying the topology of a Context (who hears/sees whom).

   Most commands are for the specific use of the Media Gateway
   Controller as command initiator in controlling Media Gateways as
   command responders.  The exceptions are the Notify and ServiceChange
   commands: Notify is sent from Media Gateway to Media Gateway
   Controller, and ServiceChange may be sent by either entity.  Below is
   an overview of the commands; they are explained in more detail in
   section 7.2.

   1. Add. The Add command adds a termination to a context.  The Add
      command on the first Termination in a Context is used to create a
      Context.

   2. Modify. The Modify command modifies the properties, events and
      signals of a termination.

Top      Up      ToC       Page 21 
   3. Subtract. The Subtract command disconnects a Termination from its
      Context and returns statistics on the Termination's participation
      in the Context.  The Subtract command on the last Termination in a
      Context deletes the Context.

   4. Move. The Move command atomically moves a Termination to another
      context.

   5. AuditValue. The AuditValue command returns the current state of
      properties, events,  signals and statistics of Terminations.

   6. AuditCapabilities. The AuditCapabilities command returns all the
      possible values for Termination properties, events and signals
      allowed by the Media Gateway.

   7. Notify. The Notify command allows the Media Gateway to inform the
      Media Gateway Controller of the occurrence of events in the Media
      Gateway.

   8. ServiceChange. The ServiceChange Command allows the Media Gateway
      to notify the Media Gateway Controller that a Termination or group
      of Terminations is about to be taken out of service or has just
      been returned to service.   ServiceChange is also used by the MG
      to announce its availability to an MGC (registration), and to
      notify the MGC of impending or completed restart of the MG.  The
      MGC may announce a handover to the MG by sending it a
      ServiceChange command.  The MGC may also use ServiceChange to
      instruct the MG to take a Termination or group of Terminations in
      or out of service.

   These commands are detailed in sections 7.2.1 through 7.2.8

7.1 Descriptors

   The parameters to a command are termed Descriptors. A Descriptor
   consists of a name and a list of items. Some items may have values.
   Many Commands share common Descriptors.  This subsection enumerates
   these Descriptors.  Descriptors may be returned as output from a
   command.  Parameters and parameter usage specific to a given Command
   type are described in the subsection that describes the Command.

7.1.1 Specifying Parameters

   Command parameters are structured into a number of descriptors. In
   general, the text format of descriptors is
   DescriptorName=<someID>{parm=value, parm=value_.}.

Top      Up      ToC       Page 22 
   Parameters may be fully specified, over-specified or under-specified:

   1. Fully specified parameters have a single, unambiguous value that
      the command initiator is instructing the command responder to use
      for the specified parameter.

   2. Under-specified parameters, using the CHOOSE value, allow the
      command responder to choose any value it can support.

   3. Over-specified parameters have a list of potential values.  The
      list order specifies the command initiator's order of preference
      of selection.  The command responder chooses one value from the
      offered list and returns that value to the command initiator.

   Unspecified mandatory parameters (i.e. mandatory parameters not
   specified in a descriptor) result in the command responder retaining
   the previous value for that parameter.  Unspecified optional
   parameters result in the command responder using the default value of
   the parameter.  Whenever a parameter is underspecified or
   overspecified, the descriptor containing the value chosen by the
   responder is included as output from the command.

   Each command specifies the TerminationId the command operates on.
   This TerminationId may be "wildcarded".  When the TerminationId of a
   command is wildcarded, the effect shall be as if the command was
   repeated with each of the TerminationIds matched.

7.1.2 Modem Descriptor

   The Modem descriptor specifies the modem type and parameters, if any,
   required for use in e.g. H.324 and text conversation.  The descriptor
   includes the following modem types: V.18, V.22, V.22bis, V.32,
   V.32bis, V.34, V.90, V.91, Synchronous ISDN, and allows for
   extensions.  By default, no modem descriptor is present in a
   Termination.

7.1.3 Multiplex Descriptor

   In multimedia calls, a number of media streams are carried on a
   (possibly different) number of bearers.  The multiplex descriptor
   associates the media and the bearers. The descriptor includes the
   multiplex type:

    . H.221
    . H.223,
    . H.226,
    . V.76,
    . Possible Extensions

Top      Up      ToC       Page 23 
   and a set of TerminationIDs representing the multiplexed inputs, in
   order.  For example:

       Mux = H.221{ MyT3/1/2, MyT3/2/13, MyT3/3/6, MyT3/21/22}

7.1.4 Media Descriptor

   The Media Descriptor specifies the parameters for all the media
   streams.  These parameters are structured into two descriptors, a
   Termination State Descriptor, which specifies the properties of a
   termination that are not stream dependent, and one or more Stream
   Descriptors each of which describes a single media stream.

   A stream is identified by a StreamID.  The StreamID is used to link
   the streams in a Context that belong together. Multiple streams
   exiting a termination shall be synchronized with each other.  Within
   the Stream Descriptor, there are up to three subsidiary descriptors,
   LocalControl, Local, and Remote. The relationship between these
   descriptors is thus:

   Media Descriptor
        TerminationStateDescriptor
        Stream Descriptor
                LocalControl Descriptor
                Local Descriptor
                Remote Descriptor

   As a convenience a LocalControl, Local, or Remote descriptor may be
   included in the Media Descriptor without an enclosing Stream
   descriptor.  In this case, the StreamID is assumed to be 1.

7.1.5 Termination State Descriptor

   The Termination State Descriptor contains the ServiceStates property,
   the EventBufferControl property and properties of a termination
   (defined in Packages) that are not stream specific.

   The ServiceStates property describes the overall state of the
   termination (not stream-specific).  A Termination can be in one of
   the following states: "test", "out of service", or "in service".  The
   "test" state indicates that the termination is being tested. The
   state "out of service" indicates that the termination cannot be used
   for traffic.  The state "in service" indicates that a termination can
   be used or is being used for normal traffic.  "in service" is the
   default state.

Top      Up      ToC       Page 24 
   Values assigned to Properties may be simple values
   (integer/string/enumeration) or may be underspecified, where more
   than one value is supplied and the MG may make a choice:
    .  Alternative Values: multiple values in a list, one of which must
       be selected
    .  Ranges: minimum and maximum values, any value between min and max
       must be selected, boundary values included
    .  Greater Than/Less Than: value must be greater/less than specified
       value
    .  CHOOSE Wildcard: the MG chooses from the allowed values for the
       property

   The EventBufferControl property  specifies whether events are
   buffered following detection of an event in the Events Descriptor, or
   processed immediately.  See section 7.1.9 for details.

7.1.6 Stream Descriptor

   A Stream descriptor specifies the parameters of a single bi-
   directional stream.  These parameters are structured into three
   descriptors: one that contains termination properties specific to a
   stream and one each for local and remote flows. The Stream Descriptor
   includes a StreamID which identifies the stream.  Streams are created
   by specifying a new StreamID on one of the terminations in a Context.
   A stream is deleted by setting empty Local and Remote descriptors for
   the stream with ReserveGroup and ReserveValue in LocalControl set to
   "false" on all terminations in the context that previously supported
   that stream.

   StreamIDs are of local significance between MGC and MG and they are
   assigned by the MGC.  Within a context, StreamID is a means by which
   to indicate which media flows are interconnected:  streams with the
   same StreamID are connected.

   If a termination is moved from one context to another, the effect on
   the context to which the termination is moved is the same as in the
   case that a new termination were added with the same StreamIDs as the
   moved termination.

7.1.7 LocalControl Descriptor

   The LocalControl Descriptor contains the Mode property, the
   ReserveGroup and ReserveValue properties and properties of a
   termination (defined in Packages) that are stream specific, and are
   of interest between the MG and the MGC.  Values of properties may be
   underspecified as in section 7.1.1.

Top      Up      ToC       Page 25 
   The allowed values for the mode property are send-only, receive-only,
   send/receive, inactive and loop-back.  "Send" and "receive" are with
   respect to the exterior of the context, so that, for example, a
   stream set to mode=sendonly does not pass received media into the
   context.  Signals and Events are not affected by mode.

   The boolean-valued Reserve properties, ReserveValue and ReserveGroup,
   of a Termination indicate what the MG is expected to do when it
   receives a  local and/or remote descriptor.

   If the value of a Reserve property is True, the MG SHALL reserve
   resources for all alternatives specified in the local and/or remote
   descriptors for which it currently has resources available.  It SHALL
   respond with the alternatives for which it reserves resources.  If it
   cannot not support any of the alternatives, it SHALL respond with a
   reply to the MGC that contains empty local and/or remote descriptors.

   If the value of a Reserve property is False, the MG SHALL choose one
   of the alternatives specified in the local descriptor (if present)
   and one of the alternatives specified in the remote descriptor (if
   present).  If the MG has not yet reserved resources to support the
   selected alternative, it SHALL reserve the resources.  If, on the
   other hand, it already reserved resources for the Termination
   addressed (because of a prior exchange with ReserveValue and/or
   ReserveGroup equal to True), it SHALL release any excess resources it
   reserved previously.  Finally, the MG shall send a reply to the MGC
   containing the alternatives for the local and/or remote descriptor
   that it selected.  If the MG does not have sufficient resources to
   support any of the alternatives specified, is SHALL respond with
   error 510 (insufficient resources).

   The default value of ReserveValue and ReserveGroup is False.

   A new setting of the LocalControl Descriptor completely replaces the
   previous setting of that descriptor in the MG.  Thus to retain
   information from the previous setting the MGC must include that
   information in the new setting.  If the MGC wishes to delete some
   information from the existing descriptor, it merely resends the
   descriptor (in a Modify command) with the unwanted information
   stripped out.

7.1.8 Local and Remote Descriptors

   The MGC uses Local and Remote descriptors to reserve and commit MG
   resources for media decoding and encoding for the given Stream(s) and
   Termination to which they apply.  The MG includes these descriptors
   in its response to indicate what it is actually prepared to support.
   The MG SHALL include additional properties and their values in its

Top      Up      ToC       Page 26 
   response if these properties are mandatory yet not present in the
   requests made by the MGC (e.g., by specifying detailed video encoding
   parameters where the MGC only specified the payload type).

   Local refers to the media received by the MG and Remote refers to the
   media sent by the MG.

   When text encoding the protocol, the descriptors consist of session
   descriptions as defined in SDP (RFC2327).  In session descriptions
   sent from the MGC to the MG, the following exceptions to the syntax
   of RFC 2327 are allowed:

    .  the "s=", "t=" and "o=" lines are optional,
    .  the use of CHOOSE is allowed in place of a single parameter
       value, and
    .  the use of alternatives is allowed in place of a single parameter
       value.

   When multiple session descriptions are provided in one descriptor,
   the "v=" lines are required as delimiters; otherwise they are
   optional in session descriptions sent to the MG.  Implementations
   shall accept session descriptions that are fully conformant to
   RFC2327. When binary encoding the protocol the descriptor consists of
   groups of properties (tag-value pairs) as specified in Annex C.  Each
   such group may contain the parameters of a session description.

   Below, the semantics of the local and remote descriptors are
   specified in detail.  The specification consists of two parts.  The
   first part specifies the interpretation of the contents of the
   descriptor.  The second part specifies the actions the MG must take
   upon receiving the local and remote descriptors.  The actions to be
   taken by the MG depend on the values of the ReserveValue and
   ReserveGroup properties of the LocalControl descriptor.

   Either the local or the remote descriptor or both may be

    .  unspecified (i.e., absent),
    .  empty,
    .  underspecified through use of CHOOSE in a property value,
    .  fully specified, or
    .  overspecified through presentation of multiple groups of
       properties and possibly multiple property values in one or more
       of these groups.

   Where the descriptors have been passed from the MGC to the MG, they
   are interpreted according to the rules given in section 7.1.1, with
   the following additional comments for clarification:

Top      Up      ToC       Page 27 
   (a) An unspecified Local or Remote descriptor is considered to be a
   missing mandatory parameter.  It requires the MG to use whatever was
   last specified for that descriptor.  It is possible that there was no
   previously-specified value, in which case the descriptor concerned is
   ignored in further processing of the command.

   (b) An empty Local (Remote) descriptor in a message from the MGC
   signifies a request to release any resources reserved for the media
   flow received (sent).

   (c) If multiple groups of properties are present in a Local or Remote
   descriptor or multiple values within a group, the order of preference
   is descending.

   (d) Underspecified or overspecified properties within a group of
   properties sent by the MGC are requests for  the MG to choose one or
   more values which it can support for each of those properties.  In
   case of an overspecified property, the list of values is in
   descending order of preference.

   Subject to the above rules, subsequent action depends on the values
   of the ReserveValue and ReserveGroup properties in LocalControl.

   If ReserveGroup is true, the MG reserves the resources required to
   support any of the requested property group alternatives that it can
   currently support.  If ReserveValue is true, the MG reserves the
   resources required to support any of the requested property value
   alternatives that it can currently support.

   NOTE -  If a Local or Remote descriptor contains multiple groups of
   properties, and ReserveGroup is true, then the MG is requested to
   reserve resources so that it can decode or encode the media stream
   according to any of the alternatives.  For instance, if the Local
   descriptor contains two groups of properties, one specifying
   packetized G.711 A-law audio and the other G.723.1 audio, the MG
   reserves resources so that it can decode one audio stream encoded in
   either G.711 A-law format or G.723.1 format.  The MG does not have to
   reserve resources to decode two audio streams simultaneously, one
   encoded in G.711 A-law and one in G.723.1.  The intention for the use
   of  ReserveValue is analogous.

   If ReserveGroup is true or ReserveValue is true, then the following
   rules apply.

    .  If the MG has insufficient resources to support all alternatives
       requested by the MGC and the MGC requested resources in both
       Local and Remote,  the MG should reserve resources to support at
       least one alternative each within Local and Remote.

Top      Up      ToC       Page 28 
    .  If the MG has insufficient resources to support at least one
       alternative  within a Local  (Remote) descriptor received from
       the MGC, it shall return an empty Local (Remote) in response.

    .  In its response to the MGC, when the MGC included Local and
       Remote descriptors, the MG SHALL include Local and Remote
       descriptors for all groups of properties and property values it
       reserved resources for.  If the MG is incapable of supporting at
       least one of the alternatives within the Local (Remote)
       descriptor received from the MGC, it SHALL return an empty Local
       (Remote) descriptor.

    .  If the Mode property of the LocalControl descriptor is RecvOnly
       or SendRecv, the MG must be prepared to receive media encoded
       according to any of the alternatives included in its response to
       the MGC.

    .  If ReserveGroup is False and ReserveValue is false, then the MG
       SHOULD apply the following rules to resolve Local and Remote to a
       single alternative each:

    .  The MG chooses the first alternative in Local for which it is
       able to support at least one alternative in Remote.

    .  If the MG is unable to support at least one Local and one Remote
       alternative, it returns Error 510 (Insufficient Resources).

    .  The MG returns its selected alternative in each of Local and
       Remote.

   A new setting of a Local or Remote Descriptor completely replaces the
   previous setting of that descriptor in the MG.  Thus to retain
   information from the previous setting the MGC must include that
   information in the new setting.  If the MGC wishes to delete some
   information from the existing descriptor, it merely resends the
   descriptor (in a Modify command) with the unwanted information
   stripped out.

7.1.9 Events Descriptor

   The EventsDescriptor parameter contains a RequestIdentifier and a
   list of events that the Media Gateway is requested to detect and
   report.  The RequestIdentifier is used to correlate the request with
   the notifications that it may trigger.  Requested events include, for
   example, fax tones, continuity test results, and on-hook and off-hook
   transitions.

Top      Up      ToC       Page 29 
   Each event in the descriptor contains the Event name, an optional
   streamID, an optional KeepActive flag, and optional parameters.  The
   Event name consists of a Package Name (where the event is defined)
   and an EventID. The ALL wildcard may be used for the EventID,
   indicating that all events from the specified package have to be
   detected.  The default streamID is 0, indicating that the event to be
   detected is not related to a particular media stream.  Events can
   have parameters.  This allows a single event description to have some
   variation in meaning without creating large numbers of individual
   events.  Further event parameters are defined in the package.

   The default action of the MG, when it detects an event in the Events
   Descriptor, is to send a Notify command to the MG.  Any other action
   is for further study.

   If the value of the EventBufferControl property equals LockStep,
   following detection of such an event, normal handling of events is
   suspended. Any event which is subsequently detected and occurs in the
   EventBuffer Descriptor is added to the end of the EventBuffer (a FIFO
   queue), along with the time that it was detected.  The MG SHALL wait
   for a new EventsDescriptor to be loaded.  A new EventsDescriptor can
   be loaded either as the result of receiving a command with a new
   EventsDescriptor, or by activating an embedded EventsDescriptor.

   If EventBufferControl equals Off, the MG continues processing based
   on the active EventsDescriptor.

   In the case that an embedded EventsDescriptor being activated, the MG
   continues event processing based on the newly activated
   EventsDescriptor (Note -  for purposes of EventBuffer handling,
   activation of an embedded EventsDescriptor is equivalent to receipt
   of a new EventsDescriptor).

   When the MG receives a command with a new EventsDescriptor, one or
   more events may have been buffered in the EventBuffer in the MG. The
   value of EventBufferControl then determines how the MG treats such
   buffered events.

   Case 1

   If EventBufferControl = LockStep  and the MG receives a new
   EventsDescriptor it will check the FIFO EventBuffer and take the
   following actions:

   1. If the EventBuffer is empty, the MG waits for detection of events
      based on the new EventsDescriptor.

Top      Up      ToC       Page 30 
   2. If the EventBuffer is non-empty, the MG processes the FIFO queue
      starting with the first event:

         a) If the event in the queue is in the events listed in the new
         EventsDescriptor, the default action of the MG is to send a
         Notify command to the MGC and remove the event from the
         EventBuffer.  Any other action is for further study.  The time
         stamp of the Notify shall be the time the event was actually
         detected.  The MG then waits for a new EventsDescriptor. While
         waiting for a new EventsDescriptor, any events matching the
         EventsBufferDescriptor will be placed in  the EventBuffer and
         the event processing will repeat from step 1.

         b) If the event is not in the new EventsDescriptor, the MG
         SHALL discard the event and repeat from step 1.

   Case 2

   If EventBufferControl equals Off and the MG receives a new
   EventsDescriptor, it processes new events with the new
   EventsDescriptor.

   If the MG receives a command instructing it to set the value of
   EventBufferControl to Off, all events in the EventBuffer SHALL be
   discarded.

   The MG may report several events in a single Transaction as long as
   this does not unnecessarily delay the reporting of individual events.

   For procedures regarding transmitting the Notify command, refer to
   the appropriate annex for specific transport considerations.

   The default value of EventBufferControl is Off.

   Note -  Since the EventBufferControl property is in the
   TerminationStateDescriptor, the MG might receive a command that
   changes the EventBufferControl property and does not include an
   EventsDescriptor.

   Normally, detection of an event shall cause any active signals to
   stop.  When KeepActive is specified in the event, the MG shall not
   interrupt any signals active on the Termination on which the event is
   detected.

   An event can include an Embedded Signals descriptor and/or an
   Embedded Events Descriptor which, if present, replaces the current
   Signals/Events descriptor when the event is detected.  It is
   possible, for example, to specify that the dial-tone Signal be

Top      Up      ToC       Page 31 
   generated when an off-hook Event is detected, or that the dial-tone
   Signal be stopped when a digit is detected.  A media gateway
   controller shall not send EventsDescriptors with an event both marked
   KeepActive and containing an embedded SignalsDescriptor.

   Only one level of embedding is permitted.  An embedded
   EventsDescriptor SHALL NOT contain another embedded EventsDescriptor;
   an embedded EventsDescriptor may contain an embedded
   SignalsDescriptor.

   An EventsDescriptor received by a media gateway replaces any previous
   Events Descriptor.  Event notification in process shall complete, and
   events detected after the command containing the new EventsDescriptor
   executes, shall be processed according to the new EventsDescriptor.

7.1.10 EventBuffer Descriptor

   The EventBuffer Descriptor contains a list of events, with their
   parameters if any, that the MG is requested to detect and buffer when
   EventBufferControl equals LockStep (see 7.1.9).

7.1.11 Signals Descriptor

   A SignalsDescriptor is a parameter that contains the set of signals
   that the Media Gateway is asked to apply to a Termination. A
   SignalsDescriptor contains a number of signals and/or sequential
   signal lists.  A SignalsDescriptor may contain zero signals and
   sequential signal lists.  Support of sequential signal lists is
   optional.

   Signals are defined in packages.  Signals shall be named with a
   Package name (in which the signal is defined) and a SignalID.  No
   wildcard shall be used in the SignalID.  Signals that occur in a
   SignalsDescriptor have an optional StreamID parameter (default is 0,
   to indicate that the signal is not related to a particular media
   stream), an optional signal type (see below), an optional duration
   and possibly parameters defined in the package that defines the
   signal.  This allows a single signal to have some variation in
   meaning, obviating the need to create large numbers of individual
   signals.  Finally, the optional parameter "notifyCompletion" allows a
   MGC to indicate that it wishes to be  notified when the signal
   finishes playout.  When the MGC enables the signal completion event
   (see section E.1.2) in an Events Descriptor, that event is detected
   whenever a signal terminates and "notifyCompletion" for that signal
   is set to TRUE.  The signal completion event of section E.1.2 has a
   parameter that indicates how the signal terminated: it played to

Top      Up      ToC       Page 32 
   completion, it was interrupted by an event, it was halted because a
   new SignalsDescriptor arrived, or the signal did not complete for
   some other reason.

   The duration is an integer value that is expressed in hundredths of a
   second.

   There are three types of signals:

    .  on/off - the signal lasts until it is turned off,
    .  timeout - the signal lasts until it is turned off or a specific
       period of time elapses,
    .  brief - the signal duration is so short that it will stop on its
       own unless a new signal is applied that causes it to stop; no
       timeout value is needed.

   If the signal type is specified in a SignalsDescriptor, it overrides
   the default signal type (see Section 12.1.4). If duration is
   specified for an on/off signal, it SHALL be ignored.

   A sequential signal list consists of a signal list identifier, a
   sequence of signals to be played sequentially, and a signal type.

   Only the trailing element of the sequence of signals in a sequential
   signal list may be an on/off signal.  If the trailing element of the
   sequence is an on/off signal, the signal type of the sequential
   signal list shall be on/off as well.  If the sequence of signals in a
   sequential signal list contains signals of type timeout and the
   trailing element is not of type on/off, the type of the sequential
   signal list SHALL be set to timeout.  The duration of a sequential
   signal list with type timeout is the sum of the durations of the
   signals it contains.  If the sequence of signals in a sequential
   signal list contains only signals of type brief, the type of the
   sequential signal list SHALL be set to brief.  A signal list is
   treated as a single signal of the specified type when played out.

   Multiple signals and sequential signal lists in the same
   SignalsDescriptor shall be played simultaneously.

   Signals are defined as proceeding from the termination towards the
   exterior of the Context unless otherwise specified in a package.
   When the same Signal is applied to multiple Terminations within one
   Transaction, the MG should consider using the same resource to
   generate these Signals.

   Production of a Signal on a Termination is stopped by application of
   a new SignalsDescriptor, or detection of an Event on the Termination
   (see section 7.1.9).

Top      Up      ToC       Page 33 
   A new SignalsDescriptor replaces any existing SignalsDescriptor.  Any
   signals applied to the Termination not in the replacement descriptor
   shall be stopped, and new signals are applied, except as follows.
   Signals present in the replacement descriptor and containing the
   KeepActive flagshall be continued if they are currently playing and
   have not already completed.  If a replacement signal descriptor
   contains a signal that is not currently playing and contains the
   KeepActive flag, that signal SHALL be ignored.  If the replacement
   descriptor contains a sequential signal list with the same identifier
   as the existing descriptor, then

    .  the signal type and sequence of signals in the sequential signal
       list in the replacement descriptor shall be ignored, and

    .  the playing of the signals in the sequential signal list in the
       existing descriptor shall not be interrupted.

7.1.12 Audit Descriptor

   The Audit Descriptor specifies what information is to be audited.
   The Audit Descriptor specifies the list of descriptors to be
   returned.  Audit may be used in any command to force the return of a
   descriptor even if the descriptor in the command was not present, or
   had no underspecified parameters.  Possible items in the Audit
   Descriptor are:

         Modem
         Mux
         Events
         Media
         Signals
         ObservedEvents
         DigitMap
         Statistics
         Packages
         EventBuffer

   Audit may be empty, in which case, no descriptors are returned.  This
   is useful in Subtract, to inhibit return of statistics, especially
   when using wildcard.

7.1.13 ServiceChange Descriptor

   The ServiceChangeDescriptor contains the following parameters:

    . ServiceChangeMethod
    . ServiceChangeReason
    . ServiceChangeAddress

Top      Up      ToC       Page 34 
    . ServiceChangeDelay
    . ServiceChangeProfile
    . ServiceChangeVersion
    . ServiceChangeMGCId
    . TimeStamp

   See section 7.2.8.

7.1.14 DigitMap Descriptor

   A DigitMap is a dialing plan resident in the Media Gateway used for
   detecting and reporting digit events received on a Termination.  The
   DigitMap Descriptor contains a DigitMap name and the DigitMap to be
   assigned.  A digit map may be preloaded into the MG by management
   action and referenced by name in an EventsDescriptor, may be defined
   dynamically and subsequently referenced by name, or the actual
   digitmap itself may be specified in the EventsDescriptor. It is
   permissible for a digit map completion event within an Events
   Descriptor to refer by name to a DigitMap which is defined by a
   DigitMap Descriptor within the same command, regardless of the
   transmitted order of the respective descriptors.

   DigitMaps defined in a DigitMapDescriptor can occur in any of the
   standard Termination manipulation Commands of the protocol.  A
   DigitMap, once defined, can be used on all Terminations specified by
   the (possibly wildcarded) TerminationID in such a command.  DigitMaps
   defined on the root Termination are global and can be used on every
   Termination in the MG, provided that a DigitMap with the same name
   has not been defined on the given Termination. When a DigitMap is
   defined dynamically in a DigitMap Descriptor:

    .  A new DigitMap is created by specifying a name that is not yet
       defined.  The value shall be present.

    .  A DigitMap value is updated by supplying a new value for a name
       that is already defined.  Terminations presently using the
       digitmap shall continue to use the old definition; subsequent
       EventsDescriptors specifying the name, including any
       EventsDescriptor in the command containing the DigitMap
       descriptor, shall use the new one.

    .  A DigitMap is deleted by supplying an empty value for a name that
       is already defined.  Terminations presently using the digitmap
       shall continue to use the old definition.

   The collection of digits according to a DigitMap may be protected by
   three timers, viz. a start timer (T), short timer (S), and long timer
   (L).

Top      Up      ToC       Page 35 
   1. The start timer (T) is used prior to any digits having been
      dialed.

   2. If the Media Gateway can determine that at least one more digit is
      needed for a digit string to match any of the allowed patterns in
      the digit map, then the interdigit timer value should be set to a
      long (L) duration (e.g. 16 seconds).

   3. If the digit string has matched one of the patterns in a digit
      map, but it is possible that more digits could be received which
      would cause a match with a different pattern, then instead of
      reporting the match immediately, the MG must apply the short timer
      (S) and wait for more digits.

   The timers are configurable parameters to a DigitMap.  The Start
   timer is started at the beginning of every digit map use, but can be
   overridden.

   The formal syntax of the digit map is described by the DigitMap rule
   in the formal syntax description of the protocol (see Annex A and
   Annex B). A DigitMap, according to this syntax, is defined either by
   a string or by a list of strings. Each string in the list is an
   alternative event sequence, specified either as a sequence of digit
   map symbols or as a regular expression of digit map symbols.  These
   digit map symbols, the digits "0" through "9" and letters "A" through
   a maximum value depending on the signalling system concerned, but
   never exceeding "K", correspond to specified events within a package
   which has been designated in the Events Descriptor on the termination
   to which the digit map is being applied.  (The mapping between events
   and digit map symbols is defined in the documentation for packages
   associated with channel-associated signalling systems such as DTMF,
   MF, or R2.  Digits "0" through "9" MUST be mapped to the
   corresponding digit events within the signalling system concerned.
   Letters should be allocated in logical fashion, facilitating the use
   of range notation for alternative events.)

   The letter "x" is used as a wildcard, designating any event
   corresponding to symbols in the range "0"-"9".  The string may also
   contain explicit ranges and, more generally, explicit sets of
   symbols, designating alternative events any one of which satisfies
   that position of the digit map.  Finally, the dot symbol "." stands
   for zero or more repetitions of the event selector (event, range of
   events, set of alternative events, or wildcard) that precedes it.  As
   a consequence of the third timing rule above, inter-event timing
   while matching the dot symbol uses the short timer by default.

   In addition to these event symbols, the string may contain "S" and
   "L" inter-event timing specifiers and the "Z" duration modifier.  "S"

Top      Up      ToC       Page 36 
   and "L" respectively indicate that the MG should use the short (S)
   timer or the long (L) timer for subsequent events, over-riding the
   timing rules described above. A timer specifier following a dot
   specifies inter-event timing for all events matching the dot as well
   as for subsequent events.  If an explicit timing specifier is in
   effect in one alternative event sequence, but none is given in any
   other candidate alternative, the timer value set by the explicit
   timing specifier must be used.  If all sequences with explicit timing
   controls are dropped from the candidate set, timing reverts to the
   default rules given above.  Finally, if conflicting timing specifiers
   are in effect in different alternative sequences, the results are
   undefined.

   A "Z" designates a long duration event: placed in front of the
   symbol(s) designating the event(s) which satisfy a given digit
   position, it indicates that that position is satisfied only if the
   duration of the event exceeds the long-duration threshold.  The value
   of this threshold is assumed to be provisioned in the MG.

   A digit map is active while the events descriptor which invoked it is
   active and it has not completed.  A digit map completes when:

    .  a timer has expired, or

    .  an alternative event sequence has been matched and no other
       alternative event sequence in the digit map could be matched
       through detection of an additional event (unambiguous match), or

    .  an event has been detected such that a match to a complete
       alternative event sequence of the digit map will be impossible no
       matter what additional events are received.

   Upon completion, a digit map completion event as defined in the
   package providing the events being mapped into the digit map shall be
   generated.  At that point the digit map is deactivated.  Subsequent
   events in the package are processed as per the currently active event
   processing mechanisms.

   Pending completion, successive events shall be processed according to
   the following rules:

   1. The "current dial string", an internal variable, is initially
      empty.  The set of candidate alternative event sequences includes
      all of the alternatives specified in the digit map.

   2. At each step, a timer is set to wait for the next event, based
      either on the default timing rules given above or on explicit
      timing specified in one or more alternative event sequences. If

Top      Up      ToC       Page 37 
      the timer expires and a member of the candidate set of
      alternatives is fully satisfied, a timeout completion with full
      match is reported.  If the timer expires and part or none of any
      candidate alternative is satisfied, a timeout completion with
      partial match is reported.

   3. If an event is detected before the timer expires, it is mapped to
      a digit string symbol and provisionally added to the end of the
      current dial string.  The duration of the event (long or not long)
      is noted if and only if this is relevant in the current symbol
      position (because at least one of the candidate alternative event
      sequences includes the "Z" modifier at this position in the
      sequence).

   4. The current dial string is compared to the candidate alternative
      event sequences.  If and only if a sequence expecting a long-
      duration event at this position is matched (i.e. the event had
      long duration and met the specification for this position), then
      any alternative event sequences not specifying a long duration
      event at this position are discarded, and the current dial string
      is modified by inserting a "Z" in front of the symbol representing
      the latest event.  Any sequence expecting a long-duration event at
      this position but not matching the observed event is discarded
      from the candidate set.   If alternative event sequences not
      specifying a long duration event in the given position remain in
      the candidate set after application of the above rules, the
      observed event duration is treated as irrelevant in assessing
      matches to them.

   5. If exactly one candidate remains, a completion event is generated
      indicating an unambiguous match.  If no candidates remain, the
      latest event is removed from the current dial string and a
      completion event is generated indicating full match if one of the
      candidates from the previous step was fully satisfied before the
      latest event was detected, or partial match otherwise.  The event
      removed from the current dial string will then be reported as per
      the currently active event processing mechanisms.

   6. If no completion event is reported out of step 5 (because the
      candidate set still contains more than one alternative event
      sequence), processing returns to step 2.

   A digit map is activated whenever a new event descriptor is applied
   to the termination or embedded event descriptor is activated, and
   that event descriptor contains a digit map completion event which
   itself contains a digit map parameter.  Each new activation of a
   digit map begins at step 1 of the above procedure, with a clear
   current dial string.  Any previous contents of the current dial

Top      Up      ToC       Page 38 
   string from an earlier activation are lost.  While the digit map is
   activated, detection is enabled for all events defined in the package
   containing the specified digit map completion event.  Normal event
   behaviour (e.g. stopping of signals unless the digit completion event
   has the KeepActive flag enabled) continues to apply for each such
   event detected, except that the events in the package containing the
   specified digit map completion event other than the completion event
   itself are not individually notified.

   Note that if a package contains a digit map completion event, then an
   event specification consisting of the package name with a wildcarded
   ItemID (Property Name) will activate a digit map if the event
   includes a digit map parameter.  Regardless of whether a digit map is
   activated, this form of event specification will cause the individual
   events to be reported to the MGC as they are detected.

   As an example, consider the following dial plan:

      0                             Local operator
      00                            Long distance operator
      xxxx                          Local extension number
                                    (starts with 1-7)
      8xxxxxxx                      Local number
      #xxxxxxx                      Off-site extension
      *xx                           Star services
      91xxxxxxxxxx                  Long distance number
      9011 + up to 15 digits        International number

   If the DTMF detection package described in Annex E (section E.6) is
   used to collect the dialled digits, then the dialling plan shown
   above results in the following digit map:

      (0| 00|[1-7]xxx|8xxxxxxx|Fxxxxxxx|Exx|91xxxxxxxxxx|9011x.)

7.1.15 Statistics Descriptor

   The Statistics parameter provides information describing the status
   and usage of a Termination during its existence within a specific
   Context.  There is a set of standard statistics kept for each
   termination where appropriate (number of octets sent and received for
   example).  The particular statistical properties that are reported
   for a given Termination are determined by the Packages realized by
   the Termination.  By default, statistics are reported when the
   Termination is Subtracted from the Context.  This behavior can be
   overridden by including an empty AuditDescriptor in the Subtract
   command.  Statistics may also be returned from the AuditValue
   command, or any Add/Move/Modify command using the Audit descriptor.

Top      Up      ToC       Page 39 
   Statistics are cumulative; reporting Statistics does not reset them.
   Statistics are reset when a Termination is Subtracted from a Context.

7.1.16 Packages Descriptor

   Used only with the AuditValue command, the PackageDescriptor returns
   a list of Packages realized by the Termination.

7.1.17 ObservedEvents Descriptor

   ObservedEvents is supplied with the Notify command to inform the MGC
   of which event(s) were detected.  Used with the AuditValue command,
   the ObservedEventsDescriptor returns events in the event buffer which
   have not been Notified. ObservedEvents contains the RequestIdentifier
   of the EventsDescriptor that triggered the notification, the event(s)
   detected and the detection time(s).  Detection times are reported
   with a precision of hundredths of a second.  Time is expressed in
   UTC.

7.1.18  Topology Descriptor

   A topology descriptor is used to specify flow directions between
   terminations in a Context.  Contrary to the descriptors in previous
   sections, the topology descriptor applies to a Context instead of a
   Termination.  The default topology of a Context is that each
   termination's transmission is received by all other terminations.
   The Topology Descriptor is optional to implement.

   The Topology Descriptor occurs before the commands in an action.  It
   is possible to have an action containing only a Topology Descriptor,
   provided that the context to which the action applies already exists.

   A topology descriptor consists of a sequence of triples of the form
   (T1, T2, association). T1 and T2 specify Terminations within the
   Context, possibly using the ALL or CHOOSE wildcard.  The association
   specifies how media flows between these two Terminations as follows.

    .  (T1, T2, isolate) means that the Terminations matching T2 do not
       receive media from the Terminations matching T1, nor vice versa.

    .  (T1, T2, oneway) means that the Terminations that match T2
       receive media from the Terminations matching T1, but not vice
       versa.  In this case use of the ALL wildcard such that there are
       Terminations that match both T1 and T2 is not allowed.

    .  (T1, T2, bothway) means that the Terminations matching T2 receive
       media from the Terminations matching T1, and vice versa.  In this
       case it is allowed to use wildcards such that there are

Top      Up      ToC       Page 40 
       Terminations that match both T1 and T2.  However, if there is a
       Termination that matches both, no loopback is introduced;
       loopbacks are created by setting the TerminationMode.  CHOOSE
       wildcards may be used in T1 and T2 as well, under the following
       restrictions:

    .  the action (see section 8) of which the topology descriptor is
       part contains an Add command in which a CHOOSE wildcard is used;

    .  if a CHOOSE wildcard occurs in T1 or T2, then a partial name
       SHALL NOT be specified.

   The CHOOSE wildcard in a topology descriptor matches the
   TerminationID that the MG assigns in the first Add command that uses
   a CHOOSE wildcard in the same action.  An existing Termination that
   matches T1 or T2 in the Context to which a Termination is added, is
   connected to the newly added Termination as specified by the topology
   descriptor. The default association when a termination is not
   mentioned in the Topology descriptor is bothway (if T3 is added to a
   context with T1 and T2 with topology (T3,T1,oneway) it will be
   connected bothway to T2).

Top      Up      ToC       Page 41 
   The figure below and the table following it show some examples of the
   effect of including topology descriptors in actions.  In these
   examples it is assumed that the topology descriptors are applied in
   sequence.

            Context 1           Context 2           Context 3
      +------------------+  +------------------+  +------------------+
      |      +----+      |  |      +----+      |  |      +----+      |
      |      | T2 |      |  |      | T2 |      |  |      | T2 |      |
      |      +----+      |  |      +----+      |  |      +----+      |
      |       ^  ^       |  |          ^       |  |          ^       |
      |       |  |       |  |          |       |  |          |       |
      |    +--+  +--+    |  |          +---+   |  |          +--+    |
      |    |        |    |  |              |   |  |             |    |
      |    v        v    |  |              v   |  |             |    |
      | +----+    +----+ |  | +----+    +----+ |  | +----+    +----+ |
      | | T1 |<-->| T3 | |  | | T1 |<-->| T3 | |  | | T1 |<-->| T3 | |
      | +----+    +----+ |  | +----+    +----+ |  | +----+    +----+ |
      +------------------+  +------------------+  +------------------+
       1. No Topology Desc.  2. T1, T2 Isolate     3. T3, T2 oneway

            Context 1           Context 2           Context 3
      +------------------+  +------------------+  +------------------+
      |      +----+      |  |      +----+      |  |      +----+      |
      |      | T2 |      |  |      | T2 |      |  |      | T2 |      |
      |      +----+      |  |      +----+      |  |      +----+      |
      |          |       |  |          ^       |  |       ^  ^       |
      |          |       |  |          |       |  |       |  |       |
      |          +--+    |  |          +---+   |  |    +--+  +--+    |
      |             |    |  |              |   |  |    |        |    |
      |             v    |  |              v   |  |    v        v    |
      | +----+    +----+ |  | +----+    +----+ |  | +----+    +----+ |
      | | T1 |<-->| T3 | |  | | T1 |<-->| T3 | |  | | T1 |<-->| T3 | |
      | +----+    +----+ |  | +----+    +----+ |  | +----+    +----+ |
      +------------------+  +------------------+  +------------------+
       4. T2, T3 oneway      5. T2, T3 bothway     6. T1, T2 bothway

              Figure 4: A Sequence Of Example Topologies

Top      Up      ToC       Page 42 
              Topology                Description

                  1             No topology descriptors
           When no topology descriptors are included, all
           terminations have a both way connection to all
           other terminations.

                  2                 T1, T2, Isolate
           Removes the connection between T1 and T2.
             T3 has a both way connection with both T1 and
             T2.  T1 and T2 have bothway connection to T3.

                  3                 T3, T2, oneway
           A oneway connection from T3 to T2 (i.e. T2
           receives media flow from T3).  A bothway
           connection between T1 and T3.

                  4       T2, T3, oneway
           A oneway connection between T2 to T3.
           T1 and T3 remain bothway connected

                  5       T2, T3 bothway
           T2 is bothway connected to T3.  This results in
           the same as 2.

                  6       T1, T2 bothway (T2, T3 bothway
                          and T1,T3 bothway may be implied
                          or explicit).
           All terminations have a bothway connection to
           all other terminations.

   A oneway connection must implemented in such a way that the other
   Terminations in the Context are not aware of the change in topology.

7.2 Command Application Programming Interface

   Following is an Application Programming Interface (API) describing
   the Commands of the protocol.  This API is shown to illustrate the
   Commands and their parameters and is not intended to specify
   implementation (e.g. via use of blocking function calls).  It
   describes the input parameters in parentheses after the command name
   and the return values in front of the Command. This is only for
   descriptive purposes; the actual Command syntax and encoding are
   specified in later subsections.  All parameters enclosed by square
   brackets ([. . . ]) are considered optional.

Top      Up      ToC       Page 43 
7.2.1 Add

   The Add Command adds a Termination to a Context.

   TerminationID
   [,MediaDescriptor]
   [,ModemDescriptor]
   [,MuxDescriptor]
   [,EventsDescriptor]
   [,SignalsDescriptor]
   [,DigitMapDescriptor]
   [,ObservedEventsDescriptor]
   [,EventBufferDescriptor]
   [,StatisticsDescriptor]
   [,PackagesDescriptor]
        Add( TerminationID
        [, MediaDescriptor]
        [, ModemDescriptor]
        [, MuxDescriptor]
        [, EventsDescriptor]
        [, SignalsDescriptor]
        [, DigitMapDescriptor]
        [, AuditDescriptor]
        )

   The TerminationID specifies the termination to be added to the
   Context.  The Termination is either created, or taken from the null
   Context.  For an existing Termination, the TerminationID would be
   specific.  For a Termination that does not yet exist, the
   TerminationID is specified as CHOOSE  in the command. The new
   TerminationID will be returned.  Wildcards may be used in an Add, but
   such usage would be unusual.  If the wildcard matches more than one
   TerminationID, all possible matches are attempted, with results
   reported for each one.  The order of attempts when multiple
   TerminationIDs match is not specified.

   The optional MediaDescriptor describes all media streams.

   The optional ModemDescriptor and MuxDescriptor specify a modem and
   multiplexer if applicable. For convenience, if a Multiplex Descriptor
   is present in an Add command and lists any Terminations that are not
   currently in the Context, such Terminations are added to the context
   as if individual Add commands listing the Terminations were invoked.
   If an error occurs on such an implied Add, error 471 - Implied Add
   for Multiplex failure shall be returned and further processing of the
   command shall cease.

Top      Up      ToC       Page 44 
   The EventsDescriptor parameter is optional.  If present, it provides
   the list of events that should be detected on the Termination.

   The SignalsDescriptor parameter is optional.  If present, it provides
   the list of signals that should be applied to the Termination.

   The DigitMapDescriptor parameter is optional.  If present, defines a
   DigitMap definition that may be used in an EventsDescriptor.

   The AuditDescriptor is optional.  If present, the command will return
   descriptors as specified in the AuditDescriptor.

   All descriptors that can be modified could be returned by MG if a
   parameter was underspecified or overspecified.  ObservedEvents,
   Statistics, and Packages, and the EventBuffer Descriptors are
   returned only if requested in the AuditDescriptor.  Add SHALL NOT be
   used on a Termination with a serviceState of "OutofService".

7.2.2 Modify

   The Modify Command modifies the properties of a Termination.

   TerminationID
   [,MediaDescriptor]
   [,ModemDescriptor]
   [,MuxDescriptor]
   [,EventsDescriptor]
   [,SignalsDescriptor]
   [,DigitMapDescriptor]
   [,ObservedEventsDescriptor]
   [,EventBufferDescriptor]
   [,StatisticsDescriptor]
   [,PackagesDescriptor]
        Modify( TerminationID
        [, MediaDescriptor]
        [, ModemDescriptor]
        [, MuxDescriptor]
        [, EventsDescriptor]
        [, SignalsDescriptor]
        [, DigitMapDescriptor]
        [, AuditDescriptor]
        )

   The TerminationID may be specific if a single Termination in the
   Context is to be modified.  Use of wildcards in the TerminationID may
   be appropriate for some operations. If the wildcard matches more than
   one TerminationID, all possible matches are attempted, with results
   reported for each one.  The order of attempts when multiple

Top      Up      ToC       Page 45 
   TerminationIDs match is not specified. The CHOOSE option is an error,
   as the Modify command may only be used on existing Terminations.

   The remaining parameters to Modify are the same as those to Add.
   Possible return values are the same as those to Add.

7.2.3 Subtract

   The Subtract Command disconnects a Termination from its Context and
   returns statistics on the Termination's participation in the Context.

   TerminationID
   [,MediaDescriptor]
   [,ModemDescriptor]
   [,MuxDescriptor]
   [,EventsDescriptor]
   [,SignalsDescriptor]
   [,DigitMapDescriptor]
   [,ObservedEventsDescriptor]
   [,EventBufferDescriptor]
   [,StatisticsDescriptor]
   [,PackagesDescriptor]
        Subtract(TerminationID
        [, AuditDescriptor]
        )

   TerminationID in the input parameters represents the Termination that
   is being subtracted.  The TerminationID may be specific or may be a
   wildcard value indicating that all (or a set of related) Terminations
   in the Context of the Subtract Command are to be subtracted. If the
   wildcard matches more than one TerminationID, all possible matches
   are attempted, with results reported for each one.  The order of
   attempts when multiple TerminationIDs match is not specified. The
   CHOOSE option is an error, as the Subtract command may only be used
   on existing Terminations.  ALL may be used as the ContextID as well
   as the TerminationId in a Subtract, which would have the effect of
   deleting all contexts, deleting all ephemeral terminations, and
   returning all physical terminations to Null context.

   By default, the Statistics parameter is returned to report
   information collected on the Termination or Terminations specified in
   the Command.  The information reported applies to the Termination's
   or Terminations' existence in the Context from which it or they are
   being subtracted.

   The AuditDescriptor is optional.  If present, the command will return
   descriptors as specified in the AuditDescriptor.   Possible return
   values are the same as those to Add.

Top      Up      ToC       Page 46 
   When a provisioned Termination is Subtracted from a context, its
   property values shall revert to:

    .  the default value, if specified for the property and not
       overridden by provisioning,
    .  otherwise, the provisioned value.

7.2.4 Move

   The Move Command moves a Termination to another Context from its
   current Context in one atomic operation.  The Move command is the
   only command that refers to a Termination in a Context different from
   that to which the command is applied.  The Move command shall not be
   used to move Terminations to or from the null Context.

   TerminationID
   [,MediaDescriptor]
   [,ModemDescriptor]
   [,MuxDescriptor]
   [,EventsDescriptor]
   [,SignalsDescriptor]
   [,DigitMapDescriptor]
   [,ObservedEventsDescriptor]
   [,EventBufferDescriptor]
   [,StatisticsDescriptor]
   [,PackagesDescriptor]
        Move( TerminationID
        [, MediaDescriptor]
        [, ModemDescriptor]
        [, MuxDescriptor]
        [, EventsDescriptor]
        [, SignalsDescriptor]
        [, DigitMapDescriptor]
        [, AuditDescriptor]
        )

   The TerminationID specifies the Termination to be moved.  It may be
   wildcarded.  If the wildcard matches more than one TerminationID, all
   possible matches are attempted, with results reported for each one.
   The order of attempts when multiple TerminationIDs match is not
   specified. By convention, the Termination is subtracted from its
   previous Context. The Context to which the Termination is moved is
   indicated by the target ContextId in the Action.  If the last
   remaining Termination is moved out of a Context, the Context is
   deleted.

Top      Up      ToC       Page 47 
   The remaining descriptors are processed as in the Modify Command.
   The AuditDescriptor with the Statistics option, for example, would
   return statistics on the Termination just prior to the Move.
   Possible descriptors returned from Move are the same as for Add.
   Move SHALL NOT be used on a Termination with a serviceState of
   "OutofService".

7.2.5 AuditValue

   The AuditValue Command returns the current values of properties,
   events, signals and statistics associated with Terminations.

   TerminationID
   [,MediaDescriptor]
   [,ModemDescriptor]
   [,MuxDescriptor]
   [,EventsDescriptor]
   [,SignalsDescriptor]
   [,DigitMapDescriptor]
   [,ObservedEventsDescriptor]
   [,EventBufferDescriptor]
   [,StatisticsDescriptor]
   [,PackagesDescriptor]
        AuditValue(TerminationID,
        AuditDescriptor
        )

   TerminationID may be specific or wildcarded. If the wildcard matches
   more than one TerminationID, all possible matches are attempted, with
   results reported for each one.  The order of attempts when multiple
   TerminationIDs match is not specified. If a wildcarded response is
   requested, only one command return is generated, with the contents
   containing the union of the values of all Terminations matching the
   wildcard.  This convention may reduce the volume of data required to
   audit a group of Terminations.  Use of CHOOSE is an error.

   The appropriate descriptors, with the current values for the
   Termination, are returned from AuditValue.  Values appearing in
   multiple instances of a descriptor are defined to be alternate values
   supported, with each parameter in a descriptor considered
   independent.

   ObservedEvents returns a list of events in the EventBuffer,
   PackagesDescriptor returns a list of packages realized by the
   Termination.  DigitMapDescriptor returns the name or value of the
   current DigitMap for the Termination.  DigitMap requested in an
   AuditValue command with TerminationID ALL returns all DigitMaps in
   the gateway.  Statistics returns the current values of all statistics

Top      Up      ToC       Page 48 
   being kept on the Termination.  Specifying an empty Audit Descriptor
   results in only the TerminationID being returned.  This may be useful
   to get a list of TerminationIDs when used with wildcard.

   AuditValue results depend on the Context, viz. specific, null, or
   wildcarded.  The TerminationID may be specific, or wildcarded.  The
   following illustrates other information that can be obtained with the
   Audit Command:

      ContextID     TerminationID   Information Obtained

      Specific      wildcard        Audit of matching
                                    Terminations in a Context

      Specific      specific        Audit of a single
                                    Termination in a Context

      Null          Root            Audit of Media Gateway state
                                    and events

      Null          wildcard        Audit of all matching
                                    Terminations in the Null
                                    Context

      Null          specific        Audit of a single
                                    Termination outside of any
                                    Context

      All           wildcard        Audit of all matching
                                    Terminations and the Context
                                    to which they are associated

      All           Root            List of all ContextIds

7.2.6 AuditCapabilities

   The AuditCapabilities Command returns the possible values of
   properties, events, signals and statistics associated with
   Terminations.

   TerminationID
   [,MediaDescriptor]
   [,ModemDescriptor]
   [,MuxDescriptor]
   [,EventsDescriptor]
   [,SignalsDescriptor]
   [,ObservedEventsDescriptor]
   [,EventBufferDescriptor]

Top      Up      ToC       Page 49 
   [,StatisticsDescriptor]
        AuditCapabilities(TerminationID,
        AuditDescriptor
        )

   The appropriate descriptors, with the possible values for the
   Termination are returned from AuditCapabilities.  Descriptors may be
   repeated where there are multiple possible values.  If a wildcarded
   response is requested, only one command return is generated, with the
   contents containing the union of the values of all Terminations
   matching the wildcard.  This convention may reduce the volume of data
   required to audit a group of Terminations.

   Interpretation of what capabilities are requested for various values
   of ContextID and TerminationID is the same as in AuditValue.

   The EventsDescriptor returns the list of possible events on the
   Termination together with the list of all possible values for the
   EventsDescriptor Parameters.  The SignalsDescriptor returns the list
   of possible signals that could be applied to the Termination together
   with the list of all possible values for the Signals Parameters.
   StatisticsDescriptor returns the names of the statistics being kept
   on the termination.  ObservedEventsDescriptor returns the names of
   active events on the termination.  DigitMap and Packages are not
   legal in AuditCapability.

7.2.7 Notify

   The Notify Command allows the Media Gateway to notify the Media
   Gateway Controller of events occurring within the Media Gateway.

        Notify(TerminationID,
        ObservedEventsDescriptor,
        [ErrorDescriptor]
        )

   The TerminationID parameter specifies the Termination issuing the
   Notify Command.  The TerminationID shall be a fully qualified name.

   The ObservedEventsDescriptor contains the RequestID and a list of
   events that the Media Gateway detected in the order that they were
   detected. Each event in the list is accompanied by parameters
   associated with the event and an indication of the time that the
   event was detected.  Procedures for sending Notify commands with
   RequestID equal to 0 are for further study.

Top      Up      ToC       Page 50 
   Notify Commands with RequestID not equal to 0 shall occur only as the
   result of detection of an event specified by an Events Descriptor
   which is active on the termination concerned.

   The RequestID returns the RequestID parameter of the EventsDescriptor
   that triggered the Notify Command.  It is used to correlate the
   notification with the request that triggered it.  The events in the
   list must have been requested via the triggering EventsDescriptor or
   embedded events descriptor unless the RequestID is 0 (which is for
   further study).

7.2.8 ServiceChange

   The ServiceChange Command allows the Media Gateway to notify the
   Media Gateway Controller that a Termination or group of Terminations
   is about to be taken out of service or has just been returned to
   service.   The Media Gateway Controller may indicate that
   Termination(s) shall be taken out of or returned to service.  The
   Media Gateway may notify the MGC that the capability of a Termination
   has changed.  It also allows a MGC to hand over control of a MG to
   another MGC.

   TerminationID,
   [ServiceChangeDescriptor]
        ServiceChange(TerminationID,
        ServiceChangeDescriptor
        )

   The TerminationID parameter specifies the Termination(s) that are
   taken out of or returned to service.  Wildcarding of Termination
   names is permitted, with the exception that the CHOOSE mechanism
   shall not be used.  Use of the "Root" TerminationID indicates a
   ServiceChange affecting the entire Media Gateway.

   The ServiceChangeDescriptor contains the following parameters as
   required:

    .  ServiceChangeMethod
    .  ServiceChangeReason
    .  ServiceChangeDelay
    .  ServiceChangeAddress
    .  ServiceChangeProfile
    .  ServiceChangeVersion
    .  ServiceChangeMgcId
    .  TimeStamp

   The ServiceChangeMethod parameter specifies the type of ServiceChange
   that will or has occurred:

Top      Up      ToC       Page 51 
   1) Graceful - indicates that the specified Terminations will be taken
      out of service after the specified ServiceChangeDelay; established
      connections are not yet affected, but the Media Gateway Controller
      should refrain from establishing new connections and should
      attempt to gracefully tear down existing connections. The MG
      should set termination serviceState at the expiry of
      ServiceChangeDelay or the removal of the termination from an
      active context (whichever is first), to "out of service".

   2) Forced - indicates that the specified Terminations were taken
      abruptly out of service and any established connections associated
      with them were lost. The MGC is responsible for cleaning up the
      context (if any) with which the failed termination is associated.
      At a minimum the termination shall be subtracted from the context.
      The termination serviceState should be "out of service".

   3) Restart - indicates that service will be restored on the specified
      Terminations after expiration of the ServiceChangeDelay. The
      serviceState should be set  to "inService" upon expiry of
      ServiceChangeDelay.

   4) Disconnected - always applied with the Root TerminationID,
      indicates that the MG lost communication with the MGC, but it was
      subsequently restored.  Since MG state may have changed, the MGC
      may wish to use the Audit command to resynchronize its state with
      the MG's.

   5) Handoff - sent from the MGC to the MG, this reason indicates that
      the MGC is going out of service and a new MGC association must be
      established. Sent from the MG to the MGC, this indicates that the
      MG is attempting to establish a new association in accordance with
      a Handoff received from the MGC with which it was previously
      associated.

   6) Failover - sent from MG to MGC to indicate the primary MG is out
      of service and a secondary MG is taking over.

   7) Another value whose meaning is mutually understood between the MG
      and the MGC.

   The ServiceChangeReason parameter specifies the reason why the
   ServiceChange has or will occur.  It consists of an alphanumeric
   token (IANA registered) and an explanatory string.

   The optional ServiceChangeAddress parameter specifies the address
   (e.g., IP port number for IP networks) to be used for subsequent
   communications.  It can be specified in the input parameter
   descriptor or the returned result descriptor.  ServiceChangeAddress

Top      Up      ToC       Page 52 
   and ServiceChangeMgcId parameters must not both be present in the
   ServiceChangeDescriptor or the ServiceChangeResultDescriptor.  The
   serviceChangeAddress provides an address to be used within the
   context of the association currently being negotiated, while the
   ServiceChangeMgcId provides an alternate address where the MG should
   seek to establish another association.

   The optional ServiceChangeDelay parameter is expressed in seconds.
   If the delay is absent or set to zero, the delay value should be
   considered to be null.  In the case of a "graceful"
   ServiceChangeMethod, a null delay indicates that the Media Gateway
   Controller should wait for the natural removal of existing
   connections and should not establish new connections.  .  For
   "graceful" only, a null delay means the MG must not set serviceState
   "out of service" until the termination is in the null context.

   The optional ServiceChangeProfile parameter specifies the Profile (if
   any) of the protocol supported.  The ServiceChangeProfile includes
   the version of the profile supported.

   The optional ServiceChangeVersion parameter contains the protocol
   version and is used if protocol version negotiation occurs (see
   section 11.3).

   The optional TimeStamp parameter specifies the actual time as kept by
   the sender.  It can be used by the responder to determine how its
   notion of time differs from that of its correspondent.  TimeStamp is
   sent with a precision of hundredths of a second, and is expressed in
   UTC.

   The optional Extension parameter may contain any value whose meaning
   is mutually understood by the MG and MGC.

   A ServiceChange Command specifying the "Root" for the TerminationID
   and ServiceChangeMethod equal to Restart is a registration command by
   which a Media Gateway announces its existence to the Media Gateway
   Controller.  The Media Gateway is expected to be provisioned with the
   name of one primary and optionally some number of alternate Media
   Gateway Controllers.    Acknowledgement of the ServiceChange Command
   completes the registration process.  The MG may specify the transport
   ServiceChangeAddress to be used by the MGC for sending messages in
   the ServiceChangeAddress parameter in the input
   ServiceChangeDescriptor. The MG may specify an address in the
   ServiceChangeAddress parameter of the ServiceChange request, and the
   MGC may also do so in the ServiceChange reply.  In either case, the
   recipient must use the supplied address as the destination for all
   subsequent transaction requests within the association.  At the same
   time, as indicated in section 9, transaction replies and pending

Top      Up      ToC       Page 53 
   indications must be sent to the address from which the corresponding
   requests originated.  This must be done even if it implies extra
   messaging because commands and responses cannot be packed together.
   The TimeStamp parameter shall be sent with a registration command and
   its response.

   The Media Gateway Controller may return an ServiceChangeMgcId
   parameter that describes the Media Gateway Controller that should
   preferably be contacted for further service by the Media Gateway.  In
   this case the Media Gateway shall reissue the ServiceChange command
   to the new Media Gateway Controller.   The Gateway specified in an
   ServiceChangeMgcId, if provided, shall be contacted before any
   further alternate MGCs.  On a HandOff message from MGC to MG, the
   ServiceChangeMgcId is the new MGC that will take over from the
   current MGC.

   The return from ServiceChange is empty except when the Root
   terminationID is used.  In that case it includes the following
   parameters as required:

    .  ServiceChangeAddress, if the responding MGC wishes to specify an
       new destination for messages from the MG for the remainder of the
       association;

    .  ServiceChangeMgcId, if the responding MGC does not wish to
       sustain an association with the MG;

    .  ServiceChangeProfile, if the responder wishes to negotiate the
       profile to be used for the association;

    .  ServiceChangeVersion, if the responder wishes to negotiate the
       version of the protocol to be used for the association.

   The following ServiceChangeReasons are defined.  This list may be
   extended by an IANA registration as outlined in section 13.3

        900 Service Restored
        901 Cold Boot
        902 Warm Boot
        903 MGC Directed Change
        904 Termination malfunctioning
        905 Termination taken out of service
        906 Loss of lower layer connectivity (e.g. downstream sync)
        907 Transmission Failure
        908 MG Impending Failure
        909 MGC Impending Failure
        910 Media Capability Failure
        911 Modem Capability Failure

Top      Up      ToC       Page 54 
        912 Mux Capability Failure
        913 Signal Capability Failure
        914 Event Capability Failure
        915 State Loss

7.2.9 Manipulating and Auditing Context Attributes

   The commands of the protocol as discussed in the preceding sections
   apply to terminations.  This section specifies how contexts are
   manipulated and audited.

   Commands are grouped into actions (see section 8).  An action applies
   to one context.  In addition to commands, an action may contain
   context manipulation and auditing instructions.

   An action request sent to a MG may include a request to audit
   attributes of a context.  An action may also include a request to
   change the attributes of a context.

   The context properties that may be included in an action reply are
   used to return information to a MGC.  This can be information
   requested by an audit of context attributes or details of the effect
   of manipulation of a context.

   If a MG receives an action which contains both a request to audit
   context attributes and a request to manipulate those attributes, the
   response SHALL include the values of the attributes after processing
   the manipulation request.

7.2.10 Generic Command Syntax

   The protocol can be encoded in a binary format or in a text format.
   MGCs should support both encoding formats.  MGs may support both
   formats.

   The protocol syntax for the binary format of the protocol is defined
   in Annex A.  Annex C specifies the encoding of the Local and Remote
   descriptors for use with the binary format.

   A complete ABNF of the text encoding of the protocol per RFC2234 is
   given in Annex B.  SDP is used as the encoding of the Local and
   Remote Descriptors for use with the text encoding as modified in
   section 7.1.8.


Next RFC Part