H.248/MEGACO Protocol


H.248 is protocol used between the MGC and MG in Master-Slave fashion. MEGACO is similar to MGCP. MGC uses this protocol to control the MG.

MEGACO provide the following enhancement over the MGCP.

- Support multimedia and multi point conference enhanced service.
- Improve syntax for more efficient semantic message processing.
- TCP and UDP transport support
- Support either binary or text encoding.

Message Structure:
Message {
 Transaction {
    Action {
        Command {
           Descriptor {
               Package {
                    Property { }}}}}}

MTACDPP

Message: Multiple Transactions can be concatenated into a message, which contains header, the version, and one or more Transactions.
               Syntax: MEGECA /version [senderIPAddress]:portNumer

Where: version = 1 to 99 
Sender IP address = 32-bit IP address
Port Number = 16 bit value

The message header contains the identity of the sender. The message identity is set to a provisioned name of the entity transmitting the message. The version number is two digit numbers, beginning with the version 1 for the present version of the protocol.

Transaction: Command between the MGC and MG are grouped into the transaction. 
Each of which identified by Transaction ID. Transaction ID assigned by the sender. Transaction reply is invoked by receiver. There is one reply invocation per transaction.
      Transaction ( transactionID { context ID {{{{}}}})
where  Transaction ID  = 1 to 4294967295 (a 32bit value)
          Context ID= null to 65535 ( 16bit value)

       Reply ( TID {CID})
The TID parameter must be the same as the corresponding transaction request. The CID must be specifying a value to pertain to all responses for the actions.

Transaction Pending is invoked by the receiver indicates that the transaction is actively being processed, but has not been completed.  It is used to prevent the sender from assuming that the Transaction Request was lost if the transaction takes some time to complete. The syntax for command is :

Pending ( TID {})
The TID must be same as the corresponding Transaction request.

The Root property ‘normalMGExecutionTime’ is used to specify the interval within which the MGC expects a response to any transaction from the MG. Another Root property normalMGCExecutionTime’ is used to indicate the interval within which the MG should expect a response to any transaction from the MGC. Both of these properties are configurable by the MGC and have the following value ranges  

NormalMGExecutionTime = 100 to 5000 milliseconds
NormalMGCExecutionTime = 100 to 5000 milliseconds

Action: Action is a group of command to be executed in the same context. it does not have an own identifier.

Context is identified by a Context_ID, which is assigned by the MG when the first termination is Added to a context. The context is deleted when the last termination is subtracted from a termination.
Command: Command are used to manipulate the logical entity of the protocol connection model, context and termination. Commands provide the complete control of properties of the context and the terminations.
Commands are:

- ADD: The Add command adds a Termination to a Context. The first Termination add to a context creates a new Context. 

Request:    Add = Termination_ID { [MediaDescriptor] [,EventDescriptor] [,SignalsDescritor] [,AuditDescriptor]} 

 Reply:   Add = Termination_ID { [MediaDescriptor] [,EventDescriptor] [,SignalsDescritor][,ObservedEventsDescriptor] [,StatisticsDescriptor] [,PackagesDescriptor] [,ErrorDescriptor] [,AuditDescriptor]} 


- MODIFY: The Modify command modifies the properties, events and signals of a Termination.

Request:    Modify = Termination_ID { [ MediaDescriptor] [,EventDescriptor] [,SignalsDescritor] [,AuditDescriptor]} 

 Reply:   Modify = Termination_ID { [MediaDescriptor] [,EventDescriptor] [,SignalsDescritor] [,ObservedEventsDescriptor] [,StatisticsDescriptor] [,PackagesDescriptor] [,ErrorDescriptor] [,AuditDescriptor]} 


- 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. 

Request:    Subtract = Termination_ID { [AuditDescriptor]}  

Reply:   Subtract = Termination_ID { [ MediaDescriptor] [,EventDescriptor] [,SignalsDescritor][,ObservedEventsDes[,StatisticsDescriptor[,PackagesDescriptor[,ErrorDescriptor] [,AuditDescriptor]}

- MOVE: The Move command atomically moves a Termination to another Context.

Request:    Move = Termination_ID { [ MediaDescriptor] [,EventDescriptor] [,SignalsDescritor] [,AuditDescriptor]}

 Reply:   Move = Termination_ID { [ MediaDescriptor] [,EventDescriptor] [,SignalsDescritor] [,ObservedEventsDescriptor] [,StatisticsDescriptor] [,PackagesDescriptor] [,ErrorDescriptor] [,AuditDescriptor]} 

- Audit-value: The AuditValue command returns the current state of properties, events, 
signals and statistics of Terminations.

Request:   AuditValue = Termination_ID { AuditDescriptor}  

Reply:   AuditValue = Termination_ID { [MediaDescriptor] [,EventDescriptor] [,SignalsDescritor][,ObservedEventsDescriptor] [,StatisticsDescriptor] [,PackagesDescriptor]} 
- Audit-Capability: Audit Capability commands returns the all possible proprties, events, signals and statistics of the Termination.

- NotifyThe Notify command allows the MG to inform the MGC of the occurrence of events in the MG.

 Request:  Notify = Termination_ID {  [,ObservedEventsDescriptor]  [,ErrorDescriptor]}  


Reply
:   Notify = Termination_ID { [ErrorDescriptor]}

- Service Change: The ServiceChange command allows the MG to notify the MGC 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 a 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.

Request:   ServiceChange = Termination_ID { ServiceChangeDescriptor}

 Reply:    ServiceChange = Termination_ID { (ServiceChangeDescriptor/ ErrorDescriptor)} 

Terminations: A Termination is a logical entity on a MG that sources and/or sinks media and/or control streams.   A Termination is described by a number of characterizing Properties, which are grouped in a set of Descriptors that are included in commands.  Terminations have unique identities (TerminationIDs), assigned by the MG at the time of their creation.

There are two type of terminations:
Ephemeral Terminations are created by means of an Add command.  They are destroyed by means of a Subtract command. These exist only for the duration of their use. These are created and destroyed.
Physical Termination: The physical terminations have the semi-permanent existence on the MGW. For example the TDM channels that are exist as long as its provisioned on the MGW.

Context
: Context is an association between collections of termination. There is special type of context called null context, which contains the terminations that are not associated with any other termination.

 Descriptors: Properties of the termination are organized syntactically into the descriptors. Parameters to the commands are called Descriptors. Many commands share same descriptors.

- Modem Descriptors: Specifies the modem type and parameters.

Multiplex Descriptors: Associates with the media and bearer in multimedia calls.

- Media Descriptors: Specifies the parameters of all media streams.These parameters are structured into two descriptors: a TerminationState 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.


- Event Descriptors: Specifies the list of events that MG is requested to detect and report.


- EventBuffer Descriptors: Specifies the list of events and their parameters that MG is requested to detect and buffer when EventBufferControl equals to lockStep.


- Signal Descriptors: Specifies the set of signals that media gateway is asked to apply to terminations.

- Audit Descriptors: Specifies the information is to be audited.

- Service Change Descriptors: Specifies the parameters between the MGC and MG when MG power up, termination state change, MG or MGC failure happens, or MGC handoff.

- Digit Map Descriptors: A DigitMap is a dialing plan resident in the MG used for detecting and reporting digit events received on a termination. 

- Statistics DescriptorsThe Statistics descriptor provides information describing the status and usage of a termination during its existence within a specific Context.

- Package Descriptors: returns the list of package realized by the termination and it is used with the AuditValue command.

- ObservedEvent Descriptors: notify event to MGC when detected used with the Notify Command.

- Topology DescriptorsA Topology descriptor is used to specify flow directions between terminations in a context. The topology descriptor applies to a context instead of a termination.

- Error Descriptors: Specifies the Error code.

Package:
All properties, Events, Signals, and statistics used in the H.248 protocols are defined in packages. it is uniquely identified by the packageID. Following are the Package defined:

- Generic (g): Signal Completion Event

- Base Root (root): Defines the generic properties of MG i.e. max number of contexts, system times value and terminations

- Tone Generator (tg): define signal to generates the Tones.

- Tone Detection (tonedet): Defines events for audio tone detection. Needed for detection the DTMF tones.

 - Basic DTMF Generators (dg):  Defines signals for DTMF generation 


- DTMF Detection (dd):  Defines events for DTMF detection.


- Call Progress tones generators (cg): defines signals for call progress tones generation.


- Basic Continuity (ct): Defines events & signals for continuity tests.


- Network (nt):  : Defines termination properties independent of the network type .


- Real Time Transport protocol (rtp): RTP transfer of the multimedia stream.


- TDM Circuits (tdmc): use for termination to support gain and echo control. 


Generic Announcements: Allows to support announcement functionality at a MG. Announcement will be played endlessly by the MG, until the MGC stops the announcement.  


Media gateway resource congestion handling (chp): Allows the MG to control its load.


- 3GUP (threegup): Configures the User Plane functions in the MG 


TFO (threegtfoc): Defines events and properties for Tandem Free Operation 


Bearer characteristics (bcp) :  Identify which bearer services are to be supported by a MG   

Comments

Popular posts from this blog

Intelligent Networks (IN) and CAMEL

MNP Call Flows

MAP (Mobile Application Part)