1. Soft One To One Gateway Protocol
Balachandra G.C 1 and Hanumanathappa J 2
delete connection in order to establish and control media
Abstract— The objective of the paper is to demonstrate a soft sessions with other multi media generate signals. The end
one to one gateway switch that describes a call control architecture, points automatically communicate changes in services state to
where the intelligence of the call control is outside the gateways and the call agent. Furthermore, the call agent can audit endpoints
handled by external call control elements called call agents. The as well as the connection on endpoints [1], [2].
gateway protocol assumes that these call control elements will
synchronize with each other by sending coherent commands to the
gateways under their control. This gateway switch is master/salve Block diagram of MGCP
protocol where the gateways are expected to execute commands sent CA
CA SIP
by the call control elements. Gateway protocol does not define a
mechanism for synchronizing call control elements. MGCP CA : Call agent
Keywords— MGCP, MGCI, Gateway, Callagent, endpoint, RTP GW : Gateway
NTFY, DLCX, AUEP, AUCX, CRCX, MDCX, RSIP, hairpin. GW GW MGCP: Media Gateway Control
Protocol
I.INTRODUCTION
RTP: Real Time Protocol
Media gateway control interface describes an abstract EC1 EC2 EC3 SIP: Session initialization protocol
application programming interface (MGCI) and a EC : End Connection
corresponding protocol (MGCP) for controlling Media Fig 1.1: Block diagram of MGCP
Gateways from external call control elements called media
gateway controllers or Call Agents. A Media Gateway is Endpoint and Connection Identifiers
typically a network element that provides conversion between Endpoint identifiers have two components that both are
the audio signals carried on telephone circuits and data packets case- insensitive:
carried over the Internet or over other packet networks. MGCP • the domain name of the gateway that is managing the
assumes a call control architecture where the calls control endpoint
“intelligence" is outside the gateways and handled by external • a local name within that gateway
call control elements known as Call Agents. Endpoint names are of the form:
The MGCP assumes that these call control elements, or local-endpoint-name@domain-name
Call Agents will synchronize with each other to send coherent Where domain-name is an absolute domain-name and
commands and responses to the gateways under their control. includes a host portion, thus an example domain-name could
If this assumption is violated, inconsistent behavior should be be: softonetoone.gataway.net
expected. MGCP does not define a mechanism for Also, domain-name may be an IP-address of the form
synchronizing Call Agents. [192.168.1.2]
Media Gateway Control Interface functions provide for Both IPv4 and IPv6 addresses can be specified, however
connection control and endpoint control. Connections are use of IP addresses as endpoint identifiers are generally
grouped in calls. One or more connections can belong to one discouraged [1], [2].
call. Connections and calls are set up at the initiative of one or View of call agent and gateway
more Call Agents. Media gateways should be able to establish
Call Agent or Call Agent or
several connections between the endpoint and the packet Media Gateway SIP Media Gateway
networks, or between the endpoint and other endpoints in the Controller (MGC) H.323 Controller (MGC)
same gateway.
The decomposed gateway consists of a call agent, which
contains the call control” intelligence”, and a media gateway, MGC MGC
which contains the media functions. Media gateways contain P P
endpoints on which the call agents can create, modify and
Media Gateway Media Gateway
(MG) (MG)
1
Balachandra G.C. Tontadarya College of Engineering,
Mundargi Road , Gadag-582101, Karnataka . INDIA ( Phone: Fig 1.2: View of call agent and gateway
+091-821-236933, 232445; Fax: +091-08372-232446, Email: A point-to-point connection is an association between two
balutech@rediffmail.com, balutech@yahoo.co.in. endpoints with the purpose of transmitting data between these
2
Hanumanthappa .J., Dos in Computer Science, University of
Mysore, Manasagangothri, Mysore, Karnataka .INDIA ( phone:
endpoints. Once this association is established for both
+091-821-2419552; fax: +091-0821-2510789,Email: hanums_j@yahoo.com ) endpoints, data transfer between these endpoints can take
place [7],[9].
2. Call agents instructs the gateways to create connections The gateway immediately acknowledges the command,
between endpoints and to detect certain events, e.g: off-hook, repeating in the acknowledgement message the transaction id
on-hook etc, and generate certain signals, eg: ringing. It is that the Call Agent attached to the query.
strictly upto the call agent to specify how and when 200 1201 OK
connections are made, between which endpoints they are When the off hook event is noticed, the gateway
made, as well as what events and signals are to be detected provides the dial tone to the line (the delay between off-hook
and generated on the endpoints. The gateway, there by, and dial tone is thus minimal.) The gateway will then start
becomes a simple device, without any call state, that receives accumulating digits according to that digit map.
general instructions from the call agent without any need to
worry about or even understand the concept of calls or call When it has noticed a sufficient set of values, it will
states. notify the observed string to the Call Agent:
When new services are introduced or customer profiles NTFY 2002 endpoint/1@rgw.whatever.net MGCP 0.1
changed, the changes are transparent to the gateway. The call N: ca@ca1.whatever.ne
agent implements the changes and generates the appropriate X: 0123456789AC
new mix of instructions to the gateways for the changes made. O: 2001
In the MGCP model, the gateways focus on the audio The Call Agent immediately acknowledges that notification.
signal translation function, while the call agent handles the 200 2002 OK
signaling and call processing functions. As a consequences, The call agent analyzes the called number and
the call agent implements the "signaling". determines that this is a hairpin connection the called party is
located on the same gateway, on endpoint/2. The Call
Table 1 :Command Formats Agent can prepare two simultaneous Create Connection
commands, creating the two legs of the connection.
Comm Sent The create connection sent to the first endpoint
Message Name Description
and By
Determines the status of a
piggybacks a notification request, to stop collecting digits yet
AUEP AuditEndpoint CA continue watch for an on-hook transition. The Create
given endpoint.
Connection sent to the second endpoint piggybacks a request
Retrieves all the parameters
AUCX AuditConnection CA
associated with a connection.
to generate ringing and look for off-hook. Both commands can
be sent in a single UDP packet:
Creates a connection between CRCX 1204 endpoint/1@rgw.whatever.net MGCP 0.1
CRCX CreateConnection CA
two endpoints.
From CallManager:
C: A3C47F21456789F0
Terminates a current X: 0123456789AD
DLCX DeleteConnection Both
connection. M: sendrecv
From Gateway: Indicates that R: hu
a connection can no longer be
sustained.
v=0
Changes the parameters c=LOCAL rgw.whatever.net endpoint/2
MDCX ModifyConnection CA associated with an established m=audio 0 LOCAL 0
connection. CRCX 1205 endpoint/2@rgw.whatever.net MGCP 0.1
Instructs the gateway to watch C: A3C47F21456789F0
for special events such as
hooks or DTMF tones. It is
X: 9875659876
RQNT NotificationRequest CA also used to instruct the M: sendrecv
gateway to provide a signal to R: hd
the endpoint (for example, dial S: rg
tone and busy tone).
v=0
Informs the Cisco
NTFY Notify GW CallManager when requested
c=LOCAL rgw.whatever.net endpoint/1
events occur. m=audio 0 LOCAL 0
Informs the Cisco We should note that the call agent does not send the local
CallManager that an endpoint connection options since it knows that it is a local (a.k.a.
RSIP RestartInProgress GW or group of endpoints are
taken out or placed back into "hairpin") connection are entirely described by the SDP text.
service. The gateway immediately acknowledges the creations,
sending back in two messages the identification of the newly
Sequence of Commands for a Call Establishment created connections:
The first command is a NotificationRequest, sent by the Call 200 1204 OK
Agent to the Gateway Server. The request will consist of the I:FDE234C8
following lines: 200 1204 OK
RQNT 1201 endpoint/1@rgw.whatever.net MGCP 0.1 I:9867659A
N: ca@ca1.w hatever.net: The gateway, at that point, is instructed to look for an
X: 0123456789AC off-hook event on the second endpoint, and to report it. When
R: hd(E (dl;hu, D/[0-9#*T](D);) the gateway notices the off hook event, it sends a Notify
D: 2XXX command to the Call Agent:
3. NTFY 2001 endpoint/1@rgw.whatever.net MGCP 0.1 The gateway acknowledges the command, signaling that
X: 9875659876 the second endpoint is now ready [1], [2].
O: hd 200 1220 OK
The Call Agent immediately acknowledges that notification:
200 2001 OK II DESIGN AND ARCHITECTURE
The Call agent will now send a Notification Request
command to the gateway, asking to look for an off-hook event Design of Call Processing and Feature Processing
on the second end-point: Also called Call Processor, implements the Call
RQNT 1206 endpoint/2@rgw.whatever.net MGCP 0.1 processing and feature processing code. This module of the
X: 987565989A MGCP Call Agent incorporates the basic functionality of the
R: hu entire call processing for the MGCP based endpoints. It is a
The gateway acknowledges that command: generic Call Processing, which can work with any kind of
200 1206 OK protocol as long as it adheres to the interface message
At this point the call is active between the two gateway explained below.
users. A basic call finite state machine has been designed &
When the first user goes off hook, it sends a notification to the implemented to achieve a stable & real time call processing
call agent: between the multiple web clients operating over the LAN.
NTFY 2010 endpoint/1@rgw.whatever.net MGCP 0.1
X: 987565989A States Recognosized
O: hu • Idlestate
The call agent acknowledges the notification. It can, in a • Dialingstate
single UDP message, send the acknowledgement and the • Ringingstate
Delete Connection commands that will clear the call. • Establishedstate
For the first gateway, the command embeds a • Terminationstate
notification request that readies that gateway for the next call:
200 2010 OK Designing Basic Call Flow
.
DLCX 1210 endpoint/1@rgw.whatever.net MGCP 0.1 Interface
Events Actions
C: A3C47F21456789F0
I: FDE234C8
N: ca@ca1.whatever.net
X: 012345673FDE STATE
R: hd(E(dl;hu, D/[0-9#*T](D);) Idle Terminatin
.
DLCX 1211 endpoint/2@rgw.whatever.net MGCP 0.1 Dialing Established
C: A3C47F21456789F0 State
I: 9867659A Ringing
X: A3C5F0
R: hu Fig 2.1: Basic Call FSM with different states
The gateway will acknowledge the commands in a single
UDP message that will carry the "local connection" version of Events Interface
the connection parameters. This interface contains all the possible physical events
250 1243 OK that are sent by the web clients during Call Processing (To
250 1244 OK establish a basic call). It also includes some of the other
When the second user goes off hook, the gateway sends a messages, which are for the internal functioning of the FSM.
Notify commands List of events possible are
NTFY 2020 endpoint/2@rgw.whatever.net MGCP 0.1 • OnHook
X: A3C5F0 • OffHook
O: hu • DigitsDialed
The Call agent follows with a notification requests, • Flash
transmitted in the same packet as the acknowledgement, in • TimedOut
order to ready the line for the next call: • CallAccepted
200 2020 OK • CallTerminated
. • CallRequested
RQNT 1220 enpoint/1@rgw.whatever.net MGCP 0.1 The last three messages/events are used for the internal
N: ca@ca1.whatever.net functioning of the FSM.
X: 0123456793E5
R:hd(E(dl;hu, D/[0-9#*T](D);)
4. Actions Change the TONE field of the other set object to
This interface contains the list of all the generic actions RING_BACK_TONE
(applicable to all the end users/clients). In appropriate states Update the two set objects in the HASH table
the required action should be processed & rendered to the web • CallAccepted( )
clients InvalidEvent ();
List of actions possible are • CallTerminated( )
• StopTone InvalidEvent ();
• GiveTone • TimeOut( ) : yet to design IdleState specific actions are
• InvalidEvent taken in each of the above methods / functions.
• SendMessage
Other state specific actions are processed in the respective Dialing State
individual states. The Dialing State class is one of the classes of the basic
call FSM. This class overrides some of the methods of it’s
III IMPLEMENTATION base class STATE which in turn implements the EVENTS &
ACTIONS interface
States The functions or methods that are overridden by the
The State class implements the two interfaces EVENTS DialingState class & the appropriate Actions are:
and ACTIONS. All the states of the basic call FSM are • OnHook( )
derived from this common Class STATE.This class adds some If (SUB_STATE == SS_CONNECTING)
extra member functions, other than implementing the two Send CallTerminated message to the other Set
Interfaces. Object
STATE == IDLE;
Idle State SUB_STATE == NONE;
The Idle State class is one of the classes of the basic call The set object is removed from the Hash Table
FSM. This class overrides some of the methods of it’s base • OffHook( )
class STATE which in turn implements the EVENTS and InvalidEvent ();
ACTIONS interface[5][6]. • DigitsDialed( )
On the occurrence of the following Events appropriate Actions If (SUB_STATE == SS_CONNECTING) InvalidEvent
are taken on the particular Set Object & the Actions taken are ();
listed below the event names. Else
The functions or methods that are overridden by the If (SUB_STATE == SS_START_DIALING)
IdleState class are: Stop the Dial Tone to the set;
• OnHook( ) Read the digits dialed;
InvalidEvent (); SUB_STATE == SS_CONNECTING;
Only when Web Clients goes OffHook a set object is Update the Call Register associated with the set;
created which has a state as IdleState Update the Hash table with the modified set object;
• OffHook( ) • Flash( )
Dial Tone is fed to the end client. The corresponding set If (SUB_STATE == SS_CONNECTING) Feed
object fields are manipulated as follows: RING_BACK_TONE to the set;
STATE == DIALING; Else if (SUB_STATE == SS_START_DIALING) Feed
SUB_STATE == SS_START_DIALING; DIAL_TONE to the set
TONEFLAG == TRUE; • CallRequested( )
PREVSTATE == IDLE; Give BUSY_TONE to the set from which the
PREVSUBSTATE==NONE; message/event has arrived;
Update the Hash table with the modified set object Get the set object from the Hash Table;
• DigitsDialed( ) TONE == BUSY_TONE;
InvalidEvent (); Update the Hash Table with this set object
• Flash( ) • CallAccepted( )
InvalidEvent (); If (SUB_STATE == SS_CONNECTING)
• CallRequested( ) Stop the RING on the terminating set;
Give RING to the set (end client) for which the message/ Stop the RING_BACK_TONE to the; originating set
event has arrived. STATE == ESTABLISHEDSTATE;
Give RING_BACK_TONE to the set from which this SUB_STATE == NONE;
message has come. Else InvalidEvent ();
Set Object fields changed are: • CallTerminated( )
STATE == RINGINGSTATE; InvalidEvent ();
SUB_STATE == NONE; DialingState specific actions are taken in each of the
RINGFLAG == TRUE; above methods / functions
5. Ringing State Give BUSY_TONE to the set from which this
The Ringing State class is one of the classes of the basic message/event has been received with
call FSM. This class overrides some of the methods of its base CURRENT_TONE == BUSY_TONE;
class STATE which in turn implements the EVENTS & Update the Hash Table with this set object;
ACTIONS interface • CallAccepted( )
The functions or methods that are overridden & the InvalidEvent ();
appropriate actions taken by the are: • CallTerminated( )
STATE == TERMINATIONSTATE;
• OnHook( ) SUB_STATE == NONE;
InvalidEvent (); Update the Hash Table with the modified set object;
• OffHook( ) EstablishedState specific actions are taken in each of the
Send CallAccepted message to the other set object; above methods / functions
STATE == ESTABLISHEDSTATE;
RING_FLAG == False; Terminate State
Make the call register handle of the RINGINGSTATE The Established State class is one of the classes of the
set object point to the call register of the other basic call FSM. This class overrides some of the methods of
(opponent) set object; its base class STATE which in turn implements the EVENTS
• DigitsDialed( ) & ACTIONS interface
InvalidEvent (); The functions or methods that are overridden & the
• Flash( ) specific Actions are:
InvalidEvent (); • OnHook( )
• CallRequested( ) STATE == IDLE;
Give Tone BUSY_TONE to the set object from where Remove the set object from the Hash Table;
the message has arrived whose present TONE == • OffHook( )
BUSY_TONE; InvalidEvent ();
Update the Hash Table with the updated set object; • DigitsDialed( )
• CallAccepted( ) InvalidEvent ();
InvalidEvent (); • Flash( )
• CallTerminated( ) InvalidEvent ();
Stop Ring to the set; • CallRequested( )
STATE == IDLE; Give Tone BUSY_TONE to the set from which this
RINGFLAG == false; message/event has arrived; CURRENT_TONE ==
Remove the set object from the Hash Table; BUSY_TONE;
• TimeOut( ) Update the Hash Table;
yet to design; • CallAccepted( )
RingingState specific actions are taken in each of the InvalidEvent ();
above methods / functions • CallTerminated( )
InvalidEvent ();
Established State TerminationState specific actions are taken in each of
The Established State class is one of the classes of the the above methods / functions
basic call FSM. This class overrides some of the methods of
its base class STATE which in turn implements the EVENTS State Machine Diagram
& ACTIONS interface The FSM implements the Basic Call FSM.This is the
The functions or methods that are overridden & the class, which handles & manipulates the call processing with
Actions are: the aid of the FSM
• OnHook( ) The public functions of this class are:
Send CallTerminated to the other (opponent) set object • void startFsm( )
STATE == IDLE; This function is responsible for the start of the Basic Call
SUB_STATE == NONE; FSM.It creates objects of all the classes present in the
Remove the set object from the Hash Table; FSM.
• OffHook( ) • void EventDispatcher(Sets handle , InterfaceMessage
InvalidEvent (); iMsgHandle)
• DigitsDialed( ) This function is responsible for the dispatching of the
InvalidEvent (); events in the appropriate state handles.
• Flash( ) • void printCurrentState( )
InvalidEvent (); This function is responsible for printing out in the
• CallRequested( ) console the set object related information & also the call
register related information for testing purposes.
6. IV IMPLEMENTATION RESULTS & ANALYSIS
Table 2: State Transition Matrix Authors
STATE ESTA
RINGI TERMI Mr.Hanumanthappa.J. has taken his birth in Harihar on 6-12-1975,which
IDL DIALING BLISH
NG NATED belongs to Davanagere (D).He has received his Bachelor of Engineering
EVENT ED Degree in computer science and engineering from University B.D.T College of
Engineering , Davanagere, Karnataka( S),India( C),which is
ESTA affiliated to Kuvempu University , Shimoga in the year 1998 and
DIALL
Off- Hook InValid BLISH InValid InValid Master of Technology in cs & engineering from NITK Surathkal ,
ING Karnataka( S ), India (C) in the year 2003.He is currently
ED pursuing his doctoral program from Mangalore university ,
Mangalore under the supervision of Dr.Manjaiah. D. H. under
On- Hook Invalid IDLE InValid IDLE IDLE the title called “Security issues of IPv6”.
Digits He is currently working as a LECTURER in Department of Studies in
Invalid DIALLING Invalid Invalid Invalid Computer Science ,Manasagangothri, University of Mysore. He has presented
Dialled
2 research papers in National and International Conferences in Network
Call RINGI Engineering. Currently He is writing two Text books on Introduction to “C”
Invalid Invalid Invalid Invalid and one more on Cryptography and Network security for computer science and
Requested NG Engineering students.
Call ESTABLIS
InValid Invalid Invalid Invalid He is a Life member of CSI, ISTE,AMIE, IAENG, Embedded networking
Accepted HED group of TIFAC – CORE in Network Engineering .
Call Mr. Balachandra G.C is currently working as
Invalid Invalid IDLE Invalid Invalid
Terminated Lecturer in Tontadarya College of Engineering,
Gadag. He received his Master of Technology in
TimeOut Invalid Invalid IDLE Invalid Invalid Computer Science and Technology from DOS in
Computer Studies, University of Mysore, Mysore in
2006. In the Year 1999 he completed his M..Sc
Analysis (Electronics) from Karnataka University Dharwad.
The above results are satisfying the requirement of He is having good Knowledge in computer Network;
MGCP 1.0 standard, verified for all the command format of his area of interest is Network Security, Algorithms Data Structure and
table 1.1. The webclient is a ‘Browser downloadable secured OOAD.
Applet’ which can be downloaded from the web server and
used to make VOIP calls with other similar webclients.
Conclusion
If we look at the development of media gateway control
protocols from simple PSTN/VOIP interworking “enables” to
complex media-specific applications, it is clear that the Media
Gateway Control Protocols have an important role to play.
Like IP centric conferencing and media-related application.
The inherent client/server architecture of the protocol provides
room for growth and possibilities of developing flexible,
scalable applications. The decomposed gateway architecture
greatly eases the problems of management and expansion.
Future Enhancement
The media-Oriented Design of the protocols provide the
opportunity for better media management as multimedia
conferencing media-rich application become a greater part of
everyday life (IVR announcement servers, call centre
application). New Package- such as a media server package
that defines events and signals for controlling a media server.
References
[1] Arango, et al. Informational RFC 2705 Media Gateway Control
Protocol (MGCP) 1999,2003.
[2] Network Working Group, Cisco Systems Informational RFC 3661 B.
Foster C. Sivachelvan 2003
[3] Data Communication and Networking 4e-Forouzan
[4] Andrew S. Tanenbaum, Computer Networks., Fourth edition,2005.
[5] Herbert Schildt Complete Reference Java 2 Tata McGraw Hill 2002 5e
[6] E Balaguruswamy Programming with Java A Primer 2000 2e
[7] http://www.voip-info.org/wiki/index.php?page=VOIP+phone
[8] http://www.ietf.org/rfc.html
[9] http://wwwprotocols.com/pbook/voipfamily