Hi there!!!
In this post I will show you some of the characteristics of the H.248 protocol. Our goal is to understand some traces made in our management system.
H.248 / Megaco is a (master/slave) protocol for control of gateway functions at the edge of the packet network. The main function of Megaco is to allow gateway decomposition into a call agent (call control) part (known as Media Gateway Controller, MGC) - master, and a gateway interface part (known as Media Gateway, MG) - slave. The MG has no call control knowledge and only handle making the connections and simple configurations.
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 { }}}}}}
Basic concepts of the protocol
Transaction: Command between the MGC and MG are grouped into the transaction. Each of which identified by TransactionID. TransactionID assigned by the sender. Transaction reply is invoked by receiver. There is one reply invocation per transaction.
Transaction ( transactionID { context ID {{{{}}}})
The H.248 protocol defines eight commands for manipulating the logical entities of the protocol connection model, Contexts and Terminations. Commands provide for complete control of the properties of Contexts and Terminations.

Most commands are for the specific use of the MGC as command initiator in controlling MGs as command responders. The exceptions are the Notify and ServiceChange commands: Notify is sent from MG to MGC, and ServiceChange may be sent by either entity.
Type of Termination
There are two types of terminations: semi-permanent terminations and ephemeral terminations. Terminations representing physical entities have a semi-permanent existence. For example, a Termination representing a TDM channel might exist for as long as it is provisioned in the gateway. Terminations representing ephemeral information flows, such as RTP flows, would usually exist only for the duration of their use.
Ephemeral Terminations are created by means of an Add command. They are destroyed by means of a Subtract command. In contrast, when a physical Termination is Added to or Subtracted from a Context, it is taken from or to the null Context, respectively.
Termination function
Terminations may have signals applied to them. Signals are MG generated media streams such as tones and announcements as well as line signals such as hookswitch.
Terminations may be programmed to detect Events, the occurrence of which can trigger notification messages to the MGC, or action by the MG.
Statistics may be accumulated on a Termination. Statistics are reported to the MGC upon request (by means of the AuditValue command) and when the Termination is taken out of the call it is in.
Context
A Context is an association between a number of Terminations. The Context describes the topology and the media mixing and/or switching parameters if more than two Terminations are involved in the association. There is a special Context called the null Context. It contains Terminations that are not associated to any other Termination. For instance, in a decomposed access gateway, all idle lines are represented by Terminations in the null Context.
The maximum number of Terminations in a Context is an MG property. Media gateways that offer only point-to-point connectivity might allow at most two Terminations per Context. Media gateways that support multipoint conferences might allow three or more Terminations per Context.
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.
Examples of PropertyIDs, EventIDs and Signals
Event | Meaning |
al/fl | Flashhook event in the Analog Line Supervision Packages |
al/of | Offhook event in the Analog Line Supervision Packages |
al/on | Onhook event in the Analog Line Supervision Packages |
al/ri | Ring signal in the Analog Line Supervision Packages |
cg/bt | Busy tone signal in the Call Progress Tones Generator Packages |
cg/ct | Congestion tone signal in the Call Progress Tones Generator Packages |
cg/cw | Call waiting tone signal in the Call Progress Tones Generator Packages |
cg/dt | Dial tone signal in the Call Progress Tones Generator Packages |
cg/rt | Ringing tone signal in the Call Progress Tones Generator Packages |
dd/ce | DigitMap Completion event in the DTMF detection Packages |
nt/jit | Maximum jitter buffer in milliseconds in the Network Packages |
tdmc/ec | Echo cancellation property in the TDM Circuit Packages |
tdmc/gain | Gain control property in the TDM Circuit Packages |
The attachment show you some messages selected from a trace to understand what has been described above.
In the next post we will see how we can make a trace from the U2000 management system.
I hope it has been helpful to you. Thanks for your time.



