Professional Documents
Culture Documents
Kumra MasterSlave
Kumra MasterSlave
Sunesh Kumra
Nokia Networks
Takimo 1, Pitajanmaki
Helsinki
Sunesh.Kumra@nokia.com
Endpoint 1 Endpoint 2
Figure 1: Call Setup Table 1: MGCP Commands
Sr no. Commands Command flow
When the two endpoints are located on gateways that are 1 CreateConnection CA --> GW
managed by the different call agents, these two call 2 ModifyConnection CA --> GW
agents shall exchange information through a call-agent 3 DeleteConnection CA -> GW
to call-agent signaling protocol, in order to synchronize 4 NotificationRequest CA --> GW
the creation of the connection on the two endpoints. 5 Notify CA <-- GW
Once established, the connection parameters can be 6 AuditEndpoint CA --> GW
modified at any time by a "modify connection" 7 AuditConnection CA --> GW
Command. The call agent may for example instruct the 8 RestartInProgress CA <-- GW
gateway to change the compression algorithm used on a 9 Endpoint Configuration CA --> GW
connection, or to modify the IP address and UDP port to
which data should be sent, if a connection is We shall now look into the individual MGCP
"redirected." Commands. Every command is represented by a few
parameters, details on what those parameters can be
The call agent removes a connection by sending to the found in Appendix B. For more information on how
gateway a "delete connection" command. The gateway command is represented, check the RFC 2705.
may also, under some circumstances, inform a gateway
that a connection could not be sustained
Endpoint Configuration
2.3 Usage of SDP The EndpointConfiguration commands are used to
specify the encoding of the signals that will be received
The Call Agent uses the MGCP to provision the by the endpoint. For example, in certain international
gateways with the description of connection parameters telephony configurations, some calls will carry mu-law
such as IP addresses, UDP port and RTP profiles. These encoded audio signals, while other will use A-law. The
descriptions will follow the conventions delineated in the Call Agent will use the EndpointConfiguration command
Session Description Protocol which is now an IETF to pass this information to the gateway.
proposed standard, documented in RFC 2327.
SDP allows for description of multimedia conferences. Command is represented by:
This version limits SDP usage to the setting of audio ReturnCode
circuits and data access circuits. The initial session EndpointConfiguration( EndpointId,
descriptions contain the description of exactly one BearerInformation)
media, of type "audio" for audio connections, "nas" for
data access.
Notification Request
2.4 High Availability and Load Balancing The Notification Request commands are used to request
the gateway to send notifications upon the occurrence of
in MGCP specified events in an endpoint. For example, a
Call Agents are identified by their domain name, not notification may be requested for when a gateway
their network addresses, and several addresses can be detects that an endpoint is receiving tones associated
associated with a domain name. In a typical with fax communication.
configuration, the MG sends Notifications to the CA. One of the nice features of this command is the
After trying to contact the CA for some configurable association of actions with each of the events. Using this
number of times and not getting any response back, it facility, the communication and processing of
starts contacting the other (back-up) MGC within the information between the two entities can be optimized.
same domain name. To each event is associated an action, which can be:
If a CA is overloaded, it can inform the MG about the • Notify the event immediately, together with the
same, by changing the Notified Entity with the MG to a accumulated list of observed events,
new CA. Therefore, when the MG has to deliver the next • Accumulate the event in an event buffer, but don't
Notification, it does so to the new CA. notify yet.
• Accumulate according to Digit Map.
2.5 MGCP Commands
The table below lists the various MGCP Commands. CA Command is represented by:
denotes the Call Agent and GW denotes the Gateway. ReturnCode
CA --> GW would mean that the command is send from NotificationRequest( EndpointId,
CA to GW. [NotifiedEntity,]
[RequestedEvents,]
RequestIdentifier,
[DigitMap,] Call Agent to delete multiple connections at the same
[SignalRequests,] time, using for example wild card options.
[QuarantineHandling,]
[DetectEvents,] Command is represented by:
[encapsulated EndpointConfiguration]) ReturnCode,
Connection-parameters
Create Connection DeleteConnection(CallId,
EndpointId,
This command is used to create a connection between
ConnectionId,
two endpoints. In addition to the necessary parameters
[Encapsulated NotificationRequest,]
that enable a media gateway to create a connection, the
[Encapsulated
localConnectionOptions parameter provides features for
EndpointConfiguration])
quality of service, security, and network related QOS.
In some circumstances, a gateway may have to clear a
Command is represented by:
connection, for example because it has lost the resource
ReturnCode,
associated with the connection, or because it has
ConnectionId,
detected that the endpoint no longer is capable or willing
[SpecificEndPointId,]
to send or receive voice. The gateway terminates the
[LocalConnectionDescriptor,]
connection by using a variant of the DeleteConnection
[SecondEndPointId,]
command.
[SecondConnectionId]
CreateConnection(CallId,
EndpointId,
[NotifiedEntity,] Audit Endpoint
[LocalConnectionOptions,] The Audit EndPoint command can be used by the Call
Mode, Agent to find out the status of a given endpoint. This
[{RemoteConnectionDescriptor | feature has been inherited from the switch environment.
SecondEndpointId}, ]
[Encapsulated NotificationRequest,] Command is represented by:
[Encapsulated ReturnCode,
EndpointConfiguration]) EndPointIdList|{
[RequestedEvents,]
Modify Connection [DigitMap,]
[SignalRequests,]
This command is used to modify the characteristics of a
[RequestIdentifier,]
gateway's "view" of a connection. This "view" of the call
[NotifiedEntity,]
includes both the local connection descriptors as well as
[ConnectionIdentifiers,]
the remote connection descriptor.
[DetectEvents,]
[ObservedEvents,]
Command is represented by:
[EventStates,]
ReturnCode,
[BearerInformation,]
[LocalConnectionDescriptor]
[RestartReason,]
ModifyConnection(CallId,
[RestartDelay,]
EndpointId,
[ReasonCode,]
ConnectionId,
[Capabilities]}
[NotifiedEntity,]
AuditEndPoint(EndpointId,
[LocalConnectionOptions,]
[RequestedInfo])
[Mode,]
[RemoteConnectionDescriptor,]
[Encapsulated NotificationRequest,] Audit Connection
[Encapsulated The Audit Connection command can be used by the Call
EndpointConfiguration]) Agent to retrieve the parameters attached to a
connection.
Delete Connection
Command is represented by:
This command is used to terminate a connection. As a
ReturnCode,
side effect, it collects statistics on the execution of the
[CallId,]
connection. If there are more than one gateway involved,
[NotifiedEntity,]
the call agent will send the Delete Connection command
[LocalConnectionOptions,]
to each of the media gateways. It is also possible for the
[Mode,] Figure 2: MGCP in all IP Network
[RemoteConnectionDescriptor,]
1 CA directs the RGW A to look for an off-hook
[LocalConnectionDescriptor,]
event and report it. Sends a Notification request to
[ConnectionParameters]
RGW A.
AuditConnection(EndpointId,
ConnectionId,
2 RGW A goes off-hook and the same is detected by
RequestedInfo)
the RGW A and Notification is sent to the CA.
3 CA looks for the service associated with the off-
hook event and asks the RGW A to collect the digits
Restart in Progress and play dial tone to EP1
The RestartInProgress command is used by the gateway 4 RGW A accumulates the digits and send
to signal that An endpoint, or a group of endpoint, is Notification to CA.
taken in or out of service. 5 CA send a Notification Request to RGW A to stop
collecting digits and look for an on-hook event.
Command is represented by: 6 CA seizes the incoming circuit (asks the RGW to
ReturnCode, create a call context) and then send the Create
[NotifiedEntity] Connection command to RGW A.
RestartInProgress ( EndPointId, 7 RGW A sends back the SDP (Session Description
RestartMethod, Parameter) to the CA.
[RestartDelay,] 8 CA finds the IP address that serves the dialed
[Reason-code]) number for EP2 from the database.
9 After CA knows the IP address of RGW B, it sends
Create Connection command to it.
3 Protocol At Work 10 RGW B responds sending back its SDP.
11 CA now sends the SDP from RGW B to RGW A in
We shall now see how MGCP works with the help two the Modify Connection command. AT this point two
examples. legs of the call are established in half duplex mode.
12 CA instructs RGW B to start ringing by sending
3.1 MGCP in all IP Network Notification Request.
Let us now see how MGCP works in the case of all IP 13 CA notifies EP1 that EP2 is ringing
network. In the figure RGW = Residential Gateway, CA 14 EP2 answers the call and the RGW B sends the CA
= Call Agent and EP = Endpoint. Notification that EP2 is answering the call.
For the sake of discussion, it is assumed that the two 15 CA sends a Notification Request to RGW A to stop
EPs, which want to talk with each other, are under the ringing
control of the same CA. 16 CA sends Modify Connection to RGW A to change
In the figure below the solid lines denote the signalling the communication mode from half duplex to full
path and the dashed line denotes the media flow. The duplex.
RGW, CA and database are all part of the IP Network. 17 The EP1 and EP2 are now talking!
EP1 EP2
CA Database
SG
STP 4.1 Connection Model
RGW The connection model for the protocol describes the
TGW B logical entities,or objects, within the Media Gateway that
can be controlled by the Media Gateway Controller.
SSP The main abstractions used in the connection model are
Terminations and Contexts.
EP2 A Termination sources and/or sinks one or more streams.
In a multimedia conference, a Termination can be
EP1 multimedia and sources or sinks multiple media streams.
The media stream parameters, as well as modem, and
Figure 3: MGCP in PSTN-IP Network bearer parameters are encapsulated within the
Termination.
A Context is an association between a collection of
1 EP1, which is in the PSTN world, dials the number Terminations. There is a special type of Context, the null
of EP2. Context, which contains all Terminations that are not
2 This number reaches SSP through EP1s local associated to any other Termination.For instance, in a
exchange. decomposed access gateway, all idle lines are
3 SSP issues IAM (IAM is the ISUP Initial Address
represented by Terminations in the null Context.
Message) to the CA, which is in the IP world. This
The following figure is a graphical depiction of these
IAM reaches SG via STP. SG is connected to IP
concepts.
world on one side and the SS7 world on the other.
The empty dashed box in each context represents the
SG converts the ISUP on SS7 to ISUP on IP and
logical association of Terminations implied by the
sends the message to CA.
Context.
4 CA finds the IP address that serves the dialed
number for EP2 from the database.
5 CA now sends the Create Connection command to
the TGW to connect to the incoming trunk using Media Gateway
CIC. TGW returns the SDP of the connection.
6 CA seizes the incoming trunk (asks the RGW to
create call context) and reserves the outgoing trunk
Context
by sending the Create Connection to the RGW
passing the SDP of TGW. Termination
7 CA now sends Modify Connection to the TGW. SCN Bearer
8 CA requests the RGW to ring the called line by Termination Channel
sending Notification Request to the RGW. RTP Stream
9 When the CA receives the Ack from the RGW, it
issues ACM to the SG. Termination
10 The SG forwards the ACM (ACM is the ISUP SCN Bearer
Address Complete Message) to the SSP. Channel
11 EP2 goes off-hook, the RGW notifies the CA by
sending the Notification Request.
12 Now the voice channel has to be turned into the full
duplex mode, the CA does this be sending the
Modify Connection command to the TGW. Context
13 CA then sends the answer message to the SG, the Termination
STP forwards this message to the SSP. SCN Bearer Termination
14 The EP1 and EP2 are now talking! Channel SCN Bearer
Channel
4 MEGACO
MEGACO is used between elements of a physically
decomposed multimedia gateway, i.e. a Media Gateway
and a Media Gateway Controller. Megaco meets the Context
requirements for a MGCP as defined in RFC 2705.
Termination Termination
SCN Bearer SCN Bearer
Channel Channel
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
Figure 4: Connection Model
or out of service.
References
[1] Request for Comments: 2705: Media Gateway
Control Protocol
[4] www.pulver.com