MGCP
-
Upload
catharine24 -
Category
Documents
-
view
2.277 -
download
3
Transcript of MGCP
Signaling protocols- MGCP
Signaling architectures Distributed Call Control (a.k.a. Intelligent endpoint model) Centralized Call Control (a.k.a. Call Agent, Softswitch model)
Dumb endpoint Decomposed gateway (physically separate signaling and
media) media conversion close to the traffic source or sink smaller number of controller easy to roll out new applications
Call Agent model
Intelligence concentrated at Call Agent Routing decisions Policy decisions
Call state kept at Call Agent Call agent is the master, gateway or
endpoint is the “slave”
Examples:MGCP (Media Gateway Control Protocol)SCCP (Simple Client Control Protocol, Cisco)
Intelligent endpoint model
Routing decisions made in conjunction with server in cloud
Policy decisions usually made by a policy server
Call state kept at endpoint
Examples: SIP (Session Initiation Protocol), ITU H.323
Media Gateway Control Protocol (MGCP)
IETF RFC 3435 Text based protocol, easily readable Master slave protocol Two main entities +
Call Agent(CA), a.k.a. Media Gateway Controller
Media Gateway (MG) One end is circuit switch, the other is RTP port Trunking gateway(TGW) Residential gateway(RGW)
Signaling Gateway
MGC Requirements
establish media stream and negotiate format
tones and announcement QoS conditioning network monitoring billing and accounting non-stop, incremental equipment /
subsystem upgrade
Key MGCP terms
Endpoints Basically physical circuits/resources that
reside on the gateway Single endpoint can have multiple
connections Connections
A data path between an endpoint and a peer (address, port) on the IP network
Calls Digit maps Events/Signals
Endpoints
Analog endpoints Named aaln/* follows slot/port hardware hierarchy
Digital endpoints (ds0 channel) Named ds/* Specifically ds/<unit-type1>-<unit #>/<unit-type2>-
<unit #>/.../<channel #> Example ds/ds1/1
Virtual endpoints An audio source like an IVR server, Announcement
server Conference bridge Packet relay (e.g. Firewall) Wire-tap access point Named virtual-endpoint-type/channel Example ann/*, for “announcement resources”
Endpoint Identifier
GW’s Domain Name + Local Name Local Name
A hierarchical form: X/Y/Z trunk4/12/[email protected]
To identify DS0 number 7 within DS1 number 12 on DS3 number 4 at gateway.somenetwork.net
Wild-cards $, any; *, all e.g., trunk1/5/[email protected]
CA wants to create a connection on an endpoint in a gateway and does not really care which endpoint is used.
e.g., trunk1/5/*@gateway.somenetwork.net CA requests statistical information related to all
endpoints on a gateway.
Connection
Between an endpoint, and a peer on the IP network
Connection ID created by gateway, and is unique in its scope
Connection has a “session description”, defining Remote address, port Types of media Codec type
Call
Notion of Call, and corresponding Call-ID owned by the Call Agent(CA)
Commonly, a Call comprises a set of two Connections created by the CA on one or two Gateways
A conference call typically have many connections.
Digit Maps
Most calls require the collection of DTMF digits, and their lookup in a route database by the CA
It is inefficient to be sending up each digit from the Gateway to the CA, one at a time
A digit map is a pattern provided by the CA to the Gateway to collect digits Egrep based
Digits are collected by the Gateway until the pattern is matched.
At that point, the collected digits are sent up to the CA
Example: 408xxxxxxx(408 followed by 7 digits)
Events/Signals
There are telephony signals other than DTMF digits Example line states offhook/onhook etc Trunk signaling
These are communicated using Event/signal packages Packages are defined by companion RFCs, like RFC
3660(Basic MGCP packages) Generic media Line Trunk Dtmf Media Announcement
Basic MGCP call components
GW1 GW2
CA(Call)
IP NetworkIP Network
endpoint endpoint
Connection 1 Connection 2
Protocol structure
Request/Response Each request acknowledged by a
response There is a set of response codes that
convey the status of the request Can be run over UDP
MGCP Command Format
MGCP 1.0
MGCP Request
Text format ACTION TRANS-ID ENDPOINT
VERSION Parameter line Parameter line ….. Parameter line = NAME: Value Examplerqnt 4 aaln/[email protected] mgcp 1.0 r: l/hd(n)
x: 234567892
MGCP Response
RESP-CODE TRANS-ID RESP-STRING Parameter line Parameter line ….. Parameter line = NAME: Value Example200 0 ok z: aaln/[email protected] z: aaln/[email protected]
MGCP Requests Actions
RQNT (Request notification) Sent from CA to MGW to request notification on change
of endpoint status NTFY (Notify)
Sent from MGW to CA in response to RQNT CRCX (Create Connection)
Sent from CA to MGW MDCX (Modify Connection)
Sent from CA to MGW, e.g. provide far end info i.e. update info about the connection
DLCX (Delete Connection) Sent from CA to MGW typically. Additionally from MGW to
CA in error conditions
MGCP Requests AUCX (Audit Connection)
Sent from CA to MGW to get status of a connection.(Useful in CA redundancy/failover)
AUEP (Audit Endpoint) Sent from CA to MGW to get status of an endpoint.
(Useful in CA redundancy/failover) RSIP (Restart in progress)
Sent from MGW to CA to inform the CA that it is “rebooting”
EPCF (Endpoint configuration) Sent by the CA to MGW to alert configuration of the
endpoint(things like gain level, codec, etc
Key parameter types
X: Request id, RQNT/NTFY correlator C: Callid, String N: Notified entity (addr of call agent to be notified) I: Connection id S: Signal request(dialtone, ringback etc) M : Connection mode (sendonly, recvonly,
sendrecv) T: Events to be detected (on/off hook, DTMF) O: Events detected R: Events requested D: Digit map B: Bearer Information (A-law, mu-law)
during a call?
MGCP Response codes
100-199 Provisional, in process
200-299 Successful
400-499 Unsuccessful, transient error
500-5xx Unsuccessful, permanent error
800-8xxPackage specific errors
000Response acknowledgement
Reason codes
The reason for a certain request or response
As opposed to the Response code which is the status of executing that request
000 (normal state, used for audit) 900-9xx(Package specific)
transactionID 1111
endpoint1@MGACallID 1234567Mode reconly transactionID
1111connectionID
AAAARTP format 0
G711mu
Setup for call flow
Rgw2567128.96.41.1
Rgw124128.96.63.25
CA1port 5678
IP NetworkIP Network
endpoint endpoint
Connection 1 Connection 2
Joe Alice
14083238155
Route server/DB
Call flow sequence
Rgw2567128.96.41.1
Rgw124128.96.63.25
CA1port 5678
IP NetworkIP Network
endpoint endpoint
Joe Alice
14083238155
Route server/DB
0(RQNT)
1(NTFY)
2(CRCX)
4(MDCX)
6(NTFY)
5(RQNT)3(CRCX))
7(MDCX)
MGCP call flow (0)
RQNT 1202 aaln/[email protected] MGCP 1.0 N: [email protected]:5678 Notified Entity – CA address
X: 0123456789AC Request ID
R: L/hd(A, E(S(L/dl),R(L/oc, L/hu, D/[0-9#*T](D)))) Requested Event
D: (0T|00T|#xxxxxxx|1xxxxxxxxxx|91xxxxxxxxxx|9011x.T) DigitMap
S: Signal request
Q: process T: G/ft DetectEvents
200 1202 OK
Call flow (1)
NTFY 2002 aaln/[email protected] MGCP 1.0 N: [email protected]:5678 X: 0123456789AC O: L/hd,D/1,D/4,D/0,D/8,D/3,D/2,D/3,D/8,D/1,D/5,D/5
ObservedEvents
200 2002 OK
Call flow(2)
CRCX 1204 aaln/[email protected] MGCP 1.0C: A3C47F21456789F0 CallIDL: p:10, a:PCMU LocalConnectionOptions
M: recvonly
200 1204 OK I: FDE234C8
v=0 o=- 25678 753849 IN IP4 128.96.41.1 s=- c=IN IP4 128.96.41.1 t=0 0 m=audio 3456 RTP/AVP 0
Call flow(3)
CRCX 1205 aaln/[email protected] MGCP 1.0 C: A3C47F21456789F0 L: p:10, a:PCMU M: sendrecv X: 0123456789AD R: L/hd S: L/rg
v=0 o=- 25678 753849 IN IP4 128.96.41.1 s=- c=IN IP4 128.96.41.1 t=0 0 m=audio 3456 RTP/AVP 0
Call flow(3)
200 1205 OKK: I: DFE233D1
v=0 o=- 4723891 7428910 IN IP4 128.96.63.25 s=- c=IN IP4 128.96.63.25 t=0 0 m=audio 3456 RTP/AVP 0
Call flow(4)
MDCX 1210 aaln/[email protected] MGCP 1.0 C: A3C47F21456789F0 I: FDE234C8 M: recvonly X: 0123456789AE
v=0 o=- 4723891 7428910 IN IP4 128.96.63.25 s=- c=IN IP4 128.96.63.25 t=0 0 m=audio 3456 RTP/AVP 0
200 1206 OK
Call flow(5)
RQNT 1201 aaln/[email protected] MGCP 1.0N: [email protected]:5678X: 0123456789AC R: l/hd(N)S: l/rg
200 1201 OK
Call flow(6)
NTFY 2002 aaln/[email protected] MGCP 1.0 N: [email protected]:5678 X: 0123456789AC O: L/hd
200 2002 OK
Call flow(7)
MDCX 1210 aaln/[email protected] MGCP 1.0 C: A3C47F21456789F0 I: FDE234C8 M: sendrecv X: 0123456789AE
v=0 o=- 4723891 7428910 IN IP4 128.96.63.25 s=- c=IN IP4 128.96.63.25 t=0 0 m=audio 3456 RTP/AVP 0
200 1206 OK
Teardown(on hook, alice)
NTFY 2002 aaln/[email protected] MGCP 1.0 N: [email protected]:5678 X: 0123456789AC O: L/hd
200 2002 OK
Teardown(Joe)
DLCX 1210 aaln/[email protected] MGCP 1.0 C: A3C47F21456789F0 I: FDE234C8
200 1210 OK P: PS=1245, OS=62345, PR=780, OR=45123, PL=10,
JI=27, LA=48
Teardown(Alice)
DLCX 1210 aaln/[email protected] MGCP 1.0 C: A3C47F21456789F0 I: FDE234C8
250 1210 OK P: PS=1245, OS=62345, PR=780, OR=45123, PL=10,
JI=27, LA=48
Provisional responses/ acknowledgements
1xx class responses to requests are allowed
Eventually must be followed by a “final” response
Final response = 2/4/5xx In this case, requestor ACKs the final
response – that is what the 000 code is for
Thoughts on MGCP
MGCP is a protocol that provides low level primitives for a master(CA) to control a slave(MGW) Usually more than one way to implement a
certain call flow/feature Feature implementation is in the CA and
CAs are usually very complex
Variations
Callee busy Wrong number Etc. Two/Multiple Call Agents
Call Agent to Call Agent signaling is usually an “intelligent endpoint” model protocol, such as SIP.
A typical PSTN usage scenario
TDMSwitch
TDMSwitch
Signaling Controller
(Signaling plane)
Data plane(TDM)
Typical MGCP usage scenario
Switch Switch
MGCP CA(Signaling plane)
MGW MGW
SS7 GW
IP NetworkData Plane
IP NetworkData Plane
SCPSTP
Reading exercise
Read RFC 3435, Sections 1 to 2.1.7, and the example in G.2.1, G.3.1
SCCP(Cisco)
Another example of the call agent model
Skinny Client Control Protocol Binary, not text Even simpler than MGCP(no digit
maps, for example) Applicable to IP-PBX, low RTT
between phones and CA “Features” implemented on the CA,
not on the phone
Wrapping up the CA model
Sometimes the CA is also termed the MGC(Media gateway controller)
H.248(also known as MEGACO) is an ITU alternative to MGCP, and operates on the same principles