. 107
( 132 .)




al Megaco Megaco

voice data

IP Backbone

Figure 8.7 Media gateway control

Telcordia Technologies). It runs over UDP and was designed speci¬cally to handle voice
calls. Another similar protocol, IP device control protocol (IPDC) was developed by
Level 3 Communication, Inc. and others.
In 1999 both IPDC and SGCP were merged into one new standard called MGCP. With-
out this merger the divergence of standards would limit the uptake of VoIP by causing
interoperability problems between vendors. MGCP modi¬es and extends the functional-
ity of both these earlier protocols. MGCP is a widely supported and somewhat mature
protocol. It can be used to help scale fairly large VoIP networks and has wide support for
most types of VoIP gateway. MGCP, however, has now been superseded by MEGACO
or H.248, this is the protocol that is speci¬ed for UMTS R4 networks.

H.248, or MEGACO, as it is frequently known, has a number of improvements and
enhancements in comparison with MGCP, this improves performance and provides a
protocol which is better suited for multimedia and conferencing. MEGACO is actually
a collaborative effort between the IETF and ITU-T. The speci¬cation for MGCP is now
frozen and all future development work will be carried out on MEGACO instead. For
MEGACO the softswitch component is referred to as the media gateway controller and
in a 3G context this is integrated with the MSC server. To handle the 3G mechanisms,
extensions are required to the base protocol and these are de¬ned in TS29.232.

8.7.1 Terminations and contexts
Terminations and contexts exist at the MGW and are used as the basic abstraction to
de¬ne connections across the gateway. Terminations
A termination is the source and/or sink of media. Each termination can in fact sink or
source multiple media streams, making it highly suitable for applications that need to, for
example, synchronize video with audio. Each termination can relate to a physical resource
such as a time slot in a time division multiplex (TDM) circuit. In this case the termination
is referred to as semi-permanent since it will exist as long as there is provision made for
it at the gateway. On the other hand ephemeral terminations created by the add command
represent RTP or AAL2 media streams and have properties such as IP address and port
number(s) or AAL2 channel ID(s). Each termination at the gateway is referred to by a
unique name, called its termination ID. TS 29.232 de¬nes a naming convention for TDM
semi-permanent and ephemeral terminations, as shown in Figure 8.8.
Each termination ID consists of a 3-bit type ¬eld plus an extra 29-bit ¬eld which
changes format depending on the type. Type values 000, 011“110 are reserved for future
use. The root termination ID (type = 111) is used to refer to all the terminations within
8.7 MEGACO 525

Type 3-bits

001 Ephemeral identifier

24-bits 5-bits
Individual time
010 PCM system

000, 011-110 reserved


Figure 8.8 3GPP termination naming convention (ASN.1) (TS29.232)

the gateway in one go. In this case the remaining 24 bits are unused. For ephemeral
termination (type = 001), the remaining 29 bits are unstructured and used to distinguish
between the different terminations. For a TDM termination (type = 010) it is important
that the MGC can distinguish between different PCM systems at the MGW, since these
will represent different trunk connections. In this case the 29 bits carry a 24-bit PCM
system identi¬er and a 5-bit time slot identi¬er (value 0“31).
In augmented Backus“Naur form protocol syntax (ABNF) coding, the TDM termi-
nation is represented as TDM PCM system/time slot. For example TDM 5/20, would
represent PCM trunk number 5, TDM slot 20. For ephemeral terminations the format is
Ephemeral ephemeral id, for example Ephemeral 2050. Contexts

Contexts de¬ne the connectivity of a termination. All terminations within a context will
send and receive media between each other. If a termination is a media sink it will receive
all media sent by other terminations in the same context. One can see that by moving
terminations between contexts the connectivity between terminations can be controlled.
There is a special context, called the null context. In this case the termination is not
associated with any other termination.
Figure 8.9 shows how media can be connected using the context, termination model.
In the top case two switched circuit network (SCN) channels are connected to a media
stream on the IP network. This could be, for example, a conference call between three
parties. The bottom example shows a simple one-to-one call. The middle example shows
two terminations that are currently not associated. These terminations may have been
moved into the null context. This would be the case, for example, if one of the parties
had put the other on hold.

Context Termination
SCN bearer
RTP stream
SCN bearer

Null Context Null Context
SCN bearer
RTP stream

SCN bearer
RTP stream

Figure 8.9 MEGACO terminations and contexts

8.7.2 Events and signals

Events are generated by a termination and detected by the MGW, which can then forward
them to the MGW controller. An event, for example, could be a phone going offhook
or the termination receiving some DTMF digits from a telephone. An MGW controller
will request to be informed of certain events using the modify message. The MGW will
inform the controller of the occurrence of an event using the notify message.
Signals are line conditions (such as ringing or busy tone) that can be applied to a
termination within the gateway. The MGW controller can request the gateway to apply
these signals to a termination using the modify command. Figure 8.10 shows the use
of modify and notify. The call agent initially uses the modify command to request the
gateway to listen for the offhook condition at termination T1. When the telephone receiver
is picked up, this is detected at the gateway, which then sends the notify, containing the
offhook event, back to the call agent. The call agent then sends another modify, instructing
the gateway to apply the dial tone to the user™s phone line.
All the events and signals are grouped into packages, some of which are shown in
Table 8.6. A termination will support a particular package depending on its properties.
For example, an analogue line will support the analogue line supervision, DTMF tone
detection and call progress tone generator packages.
For each package the name of the events or signals within that package are pre¬xed
by the package ID. For example, within the analogue supervision package the offhook
event is named al/of, onhook al/on and the signal to apply ringing to the line al/ri. As
8.7 MEGACO 527

Call Agent
Gateway T1 offhook
Modify T1
Event request

Notify T1
Event observed

Modify T1
dial tone

Figure 8.10 MEGACO modify and notify commands

Table 8.6 MEGACO packages
Package name Package ID Comment
Analogue line Al Detects offhook, onhook, ¬‚ashhook etc.
supervision Allows ringing to be applied to line
DTMF tone detection Dd Detects DTMF digits dialed from a telephone
Call progress tone Cg Provides for the generation of call progression tones
generator such as dial tone, busy tone, ringing tone etc.
Network package Nt Properties of network terminations, e.g. bytes received
and sent
RTP package Rtp Provides statistics about RTP connection; for example,
packets sent, received, average jitter and latency
TDM circuit Tdmc Controls functions such as echo cancellation and gain

well as event and signals a termination™s support for a given package de¬nes properties
and statistics. Termination properties
The properties of a termination de¬ne its operational characteristics. Some properties are
read-only and can be used by the gateway controller to determine what the termination
is capable of. Other properties are read/write and can be modi¬ed to change how the
termination will behave. One example of a property is the TDM circuit package echo
cancellation property. This is a Boolean value with read/write permissions. It can be set
to false to disable echo cancellation for the line. Termination statistics
As well as properties, the termination may support a range of statistics (also de¬ned by
its package membership). For example RTP terminations supporting the RTP package,
will record statistics such as jitter and delay (see Table 8.6).

Table 8.7 MEGACO commands
Command From Purpose
ServiceChange Media gateway Indicates gateway has come into or gone out of
service (e.g. on reboot) Indicates termination
has come into or gone out of service
ServiceChange Media gateway Instructs gateway to take termination in or out of
controller service
AuditCapabilities Media gateway Gateway returns all possible values for a
controller termination™s properties (e.g. what CODECs it
supports, data rate, etc.)
AuditValue Media gateway Determines current values of termination
controller properties such as the current context, event
values etc. for a given termination
Modify Media gateway Changes the properties of a termination, for
controller example marking which events should be
noti¬ed and setting signals on a line
Notify Media gateway Noti¬es the media gateway controller of an event
occurring at the media gateway


. 107
( 132 .)