Business-Class Router Solutions – All Telecommunication Services in One Access
MGCP
Media Gateway Call Control Protocol
www.oneaccess-net.com
contact@oneaccess-net.com
15 March, 2016
Copyright © OneAccess Networks – All rights reserved
Introduction
Business-Class


Router
Solutions
SIP and H.323 are peer-to-peer protocols; decentralized intelligence or intelligence in end-points
and softswitches.
MGCP has a different philosophy:


A Call Agent –CA- (=softswitch) controls gateways
(setups, modifies and ends voice calls)
End-points are media gateways –MG- reporting events
and executing actions ordered by the call agent. A MG
does not initiate anything without prior order from the CA.
Example:




CA requests to be notified for the off-hook event
CA requests to be notified when the user has dialed a certain
number patterns
CA requests to provide a certain ringback tone
CA requests to open an RTP stream
Copyright © OneAccess Networks – All rights reserved
2
Introduction
Business-Class

Router
Solutions
The MG is made up of:


Media conversion: transforms a VoIP stream into
analog signal. Each endpoint represents a voice
channel (coded as aaln/#@<ip_addr>)
Media call control: dialogs with the CA. Reports events
on the endpoints and connects the RTP stream
Copyright © OneAccess Networks – All rights reserved
3
Introduction
Business-Class

Router
Solutions
MGCP protocol summary:

Optimized for FXS: easy to map FXS events to MGCP
signals (originally developped by american Cable
Operators)

Dumb gateway protocol: based on stimuli and re-actions

Because call control is fully managed by the CA, new
voice supplementary services can be brought without
upgrading the software of the MGCP gateway.
Copyright © OneAccess Networks – All rights reserved
4
MGCP Signals
Business-Class

Router
Signals are :



Solutions
Messages from the CA requiring to apply something
Messages requiring the MG to notify the CA about one
event
Types of signals:



OO: On-Off. Permanent state until reverted. Example:
ringback tone
TO: Time-Out. State applied until it expires or cancelled
by the CA
BR: BRief signal. Short signal (example: DTMF key
pressed).
Copyright © OneAccess Networks – All rights reserved
5
MGCP Packages
Business-Class

Router
Solutions
Packages are a set of signals

Generic package:


DTMF package:



List of DTMF keys
RTP in-band (RFC 2833)
Line package:


Certain known tones (modem, fax) during call
Important signals: hd (off-hook), ht (on hold tone), hu (on-hook),
hf (hook flash),
FXR package:

T38
Copyright © OneAccess Networks – All rights reserved
6
MGCP Commands
Business-Class

Router
Call control commands



Solutions
Request Notification (RQNT): CA => MG. Activates a
signal. Will be notified by the MG when it appears
Notify: MG => CA. Notifies that an event (previously
provided in RQNT) has happened
Media Conversion commands:



Endpoint configuration (codec configuration)
Connection creation (CRCX), modification (MDCX),
deletion (DLCX)
Audit commands: retrieves connection parameters
Copyright © OneAccess Networks – All rights reserved
7
Sample MGCP Call Flow 1/3
Business-Class
Router
Solutions
Call Agent
Gateway B
Gateway A
RQNT : Enable Event
OK
NTFY: off hook
The user picks up the phone
OK
RQNT : Tone
OK
RQNT : Digit Map
Dial Tone
The user dials
OK
NTFY: dialed number
RQNT : Tone off
NTFY: dialed number
Note: the dialed number
complies with the digit map
format.
OK
Copyright © OneAccess Networks – All rights reserved
8
Sample MGCP Call Flow 2/3
Business-Class
Router
Solutions
Call Agent
Gateway B
Gateway A
CRCX
Create Connection in receive only
mode
CRCX
Create Connection in sendreceive mode. For sending, RTP
stream parameter from Gateway
‘A’ are transmitted by the call
agent in this transaction.
OK(received RTP stream
parameter)
Acknowledgement, the media
characteristics are described:
RTP/UDP port, IP address,
codec
OK(received RTP stream
parameter)
Acknowledgement, the media
characteristics are described:
RTP/UDP port, IP address,
codec
MDCX(sendrcv, RTP stream
parameters)
Modify connection to send RTP
packet to Gateway B
OK
RTP
Copyright © OneAccess Networks – All rights reserved
9
Sample MGCP Call Flow 3/3
Business-Class
Router
Solutions
Call Agent
Gateway B
Gateway A
DLCX
OK
Stats comm.
DLCX
OK
Stats comm.
Copyright © OneAccess Networks – All rights reserved
10
MGCP and SIP
Business-Class


Router
Solutions
A CA must manage both VoIP endpoints. In real
world, not scalable.
As MG are managed by different CA, an inter-CA
signaling protocol is possible: SIP
MGCP
SIP
Copyright © OneAccess Networks – All rights reserved
MGCP
11
Handling of Modem and Fax
Business-Class

Router
Solutions
The preferred mode is the following



The CA sends RQNT indicating to watch for mt and ft
(modem tone and fax tone)
The MG notifies the CA with either ft or mt
The CA sends the MDCX command to modify the RTP
media and tells which encoding technique must be used.


Modem: G.711. OneOS MUST automatically drives echo
cancellation if needed
Fax: G.711 or T.38 chosen by the CA.
Copyright © OneAccess Networks – All rights reserved
12
MGCP Configuration
Business-Class

Router
Solutions
Configuration diagram (1)
MGCP Gateway
Voice-port
Physical Port
Dial-peer
Voice POTS
Dial-peer
Voice Voip
VoIP coder
profile
Copyright © OneAccess Networks – All rights reserved
13
MGCP Configuration
Business-Class

Router
Solutions
Configuration diagram (2)

1 - Voice ports

2 - Dial-peer voice POTS

3 - VoIP coder profiles

4 - Dial-peer voIP

5 - MGCP gateway
Copyright © OneAccess Networks – All rights reserved
14
MGCP Configuration
Business-Class

Router
Solutions
1 - Physical voice ports (1/3)

FXS (4 ports)
CLI# configure terminal
CLI(configure)# voice-port
CLI(voice-port)# exit
CLI(configure)# voice-port
CLI(voice-port)# exit
CLI(configure)# voice-port
CLI(voice-port)# exit
CLI(configure)# voice-port
CLI(voice-port)# exit
CLI(configure)#
5/0
5/1
5/2
5/3
Copyright © OneAccess Networks – All rights reserved
15
MGCP Configuration
Business-Class

Router
Solutions
1 - Physical voice ports (2/3)

Parameters for Echo Cancellation
CLI(voice-port)# [no] Echo-Cancellation
CLI(voice-port)# Echo-Cancellation-Length { low | medium | high }
CLI(voice-port)# [no] Echo-Disable { voicemodem | modem }

Parameters for Gain control
CLI(voice-port)# Output-Gain <gain> {-12..12 (dbm) }
CLI(voice-port)# Input-Gain <gain>

Parameters for Ringing
CLI(voice-port)#
CLI(voice-port)#
CLI(voice-port)#
CLI(voice-port)#
Ring {France|Germany|USA|Italy|Spain|UK|userdefined
User-ring <freq> <ton-1> <toff-1> <ton-2> <toff-2>
Caller-id { none | dtmf | fsk }
Initial-ring <10-2000>
Copyright © OneAccess Networks – All rights reserved
16
MGCP Configuration
Business-Class

Router
Solutions
1 - Physical voice ports (3/3)

Parameters for Tones
CLI(voice-port)# Tone {France|Germany|USA|Italy|Spain|UK|userdefined
CLI(voice-port)# Tone-level < -40 to 0 >
CLI(voice-port)# User-tone {dial|network-failure|congestion|
busy|callback}
CLI(voice-port)# Timing enable [disable]
CLI(voice-port)# Timing custom <on-1> <off-1> [<on-2> <off-2>]
CLI(voice-port)# Frequency single <300-3400>
CLI(voice-port)# Frequency dual <300-3400> <300-3400>
CLI(voice-port)# Frequency modulate <300-3400> <300-3400>

Parameters for Dialing
CLI(voice-port)# Digit-level < -32 to 0 >
CLI(voice-port)# Digit-duration < 50 to 1000 >
CLI(voice-port)# Inter-digit < 50 to 1000 >
Copyright © OneAccess Networks – All rights reserved
17
MGCP Configuration
Business-Class

Router
Solutions
2 - Internal Local Voice Port (POTS)
CLI(configure)# dial-peer voice pots <id>
CLI(pots)# pots-group <port>
CLI(pots)# port 5/<port>
CLI(pots)# no shutdown
CLI(pots)# exit
Copyright © OneAccess Networks – All rights reserved
18
MGCP Configuration
Business-Class

Router
Solutions
3 - VoIP Coder Profiles (1/2)
These coders are supported:




G.711 A law (64Kbps)
G.711 law (64Kbps)
G.729A (8 Kbps, no silence suppression)
G.729AB (8 kbps, optional silence suppression)
CLI(configure)# voip-coder-profile 1
CLI(voip-coder)# codec ?
<pref-index> - Codec preference index: 0..8
CLI(voip-coder)# codec 0 ?
<coder>
- Coder type: g729ab | g711a | g711u
CLI(voip-coder)# codec 0 g729ab ?
<timestamp>
- Timestamp value: 10..90 depending on the coder
<cr>
one200(voip-coder)# codec 0 g729ab 30
one200(voip-coder)# codec 1 g711a 20
Copyright © OneAccess Networks – All rights reserved
19
MGCP Configuration
Business-Class

Router
Solutions
3 - VoIP Coder Profiles (2/2)
one200>show running
...
voip-coder-profile 1
codec 0 g729ab 30
codec 1 g711a 20
exit
voip-coder-profile 2
codec 0 g711a 20
exit
Copyright © OneAccess Networks – All rights reserved
20
MGCP Configuration
Business-Class

Router
Solutions
4 - Dial-peer VoIP

Identifies a MGCP end-point
CLI(configure)# dial-peer voice voip 0
CLI(config-dial-peer)# sig-protocol mgcp
CLI(config-dial-peer)# mgcp-dppots < dial-peer pots identifier >
CLI(config-dial-peer)# mgcp-ep < endpoint name >
CLI(config-dial-peer)# voip-coder-profile < 0 - 9 >
CLI(config-dial-peer)# silence-detection { vad | vadcng }
CLI(config-dial-peer)# dtmf-relay { none | in-band | out-of-band }
CLI(config-dial-peer)# fax-relay { none | passthrough | T38 }
CLI(config-dial-peer)# t38-red < 0 - 4 >
CLI(config-dial-peer)# modem-passtrough
CLI(config-dial-peer)# jitter < 20 - 1000 >
CLI(configure)# dial-peer voice voip 0
CLI(config-dial-peer)# sig-protocol mgcp
CLI(config-dial-peer)# mgcp-dppots 0
CLI(config-dial-peer)# mgcp-ep aaln/1
CLI(config-dial-peer)# voip-coder-profile 1
CLI(config-dial-peer)# exit
Copyright © OneAccess Networks – All rights reserved
21
MGCP Configuration
Business-Class

Router
Solutions
5 - MGCP Gateway


Global parameters for MGCP gateway
Must be shutdown to modify parameters
CLI(configure)# mgcp-gateway
CLI(mgcpgw)# shutdown
CLI(mgcpgw)# call-agent-add <IP interface> [:<port>] (default 2727)
CLI(mgcpgw)# gw-interface <IP interface>
CLI(mgcpgw)# call-agent-dn <domain-name>
CLI(mgcpgw)# gw-id <identifier> (mandatory : 40 characters maxi)
CLI(mgcpgw)# rtp-range-port <0-65535> <0-65535>
CLI(mgcpgw)# no shutdown
CLI(mgcpgw)# exit
CLI(configure)# mgcp-gateway
CLI(mgcpgw)# call-agent-add 10.2.2.1
CLI(mgcpgw)# gw-interface ATM 0.1
CLI(mgcpgw)# call-agent-dn ca.one-access.com
CLI(mgcpgw)# no shutdown
CLI(mgcpgw)# exit
Copyright © OneAccess Networks – All rights reserved
22
MGCP Statistics
Business-Class

Router
Solutions
FXS statistics
CLI# show voice voice-port fxs index 2
voice port
current state
config state
attached to local port
voice communication
5/2
on hook
up
5/2
no
Outgoing calls
Outgoing calls path established
0
0
Incoming calls
Incoming calls path established
0
0
CLI#
Copyright © OneAccess Networks – All rights reserved
23
MGCP Statistics
Business-Class

Router
Solutions
Dial-peer VoIP Statistics (1)
one200> show voice dial-peer voice voip type index <port id> [reset]
or
one200> show voice dial-peer voice voip type global[reset]
type may be :
-current : statistics on current calls
-outgoing : outgoing calls only
-incoming : incoming calls only
-user-plan : voice & fax only
-all (default) : all the statistics are provided
Copyright © OneAccess Networks – All rights reserved
24
MGCP Statistics
Business-Class

Router
Solutions
Dial-peer VoIP Statistics (2): Outgoing Calls
Dial Peer
Current Calls
1
0
Outgoing Calls
Outgoing Calls
Outgoing calls failures
RAS Call Failures
Gatekeeper Unavailable
Admission Rejects
H225/Q931 Call failures
Cause Class 0 (normal event)
Cause Class 1 (normal event)
Normal Cause (16)
User busy (17)
No answer (18)
Cause Class 2 (unavailable ressources)
Cause Class 3 (unavailable service)
Cause Class 4 (service not provided)
Cause Class 5 (invalid message)
Cause Class 6 (protocol error)
Cause Class 7 (interworking)
H245 Call failures
Incompatible capabilities
Protocol errors
Internal call failures
DSP unavailable
Max-bandwidth exceeded
Max-connection exceeded
Not specified
Copyright © OneAccess Networks – All rights reserved
4
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
25
MGCP Statistics
Business-Class

Router
Solutions
Dial-peer VoIP Statistics (3): Incoming Calls
Incoming calls
Incoming calls failures
RAS Call failures
Gatekeeper Unavailable
Admission Rejects
Local Port Call failures
H245 Call failures
Incompatible capabilities
Protocol errors
Internal call failures
DSP unavailable
Unknown number
Channel / port unavailable
Max-bandwidth exceeded
Max-connection exceeded
Not specified
Copyright © OneAccess Networks – All rights reserved
3
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
26
MGCP Statistics
Business-Class

Router
Solutions
Dial-peer VoIP Statistics (4): Voice and Fax
RTP statistics
Number of transmitted packets
Number of received packets
Number of transmitted bytes
Number of received bytes
Number of excessive jitter events
Number of lost packets
Number of invalid packets
Number of calls with frame error rate
total
<0.01<0.1<0.5<1<5>=5
3
0
0
2
1
Modem passthrough
Number of switching to modem mode
T38 FAX Calls
Number of outgoing fax
Number of incoming fax
Number of failures
Request Mode failure
Pre-message procedure failure
Page failure
Number of transmitted packets
Number of received packets
Number of transmitted bytes
Number of received bytes
Number of lost packets
Copyright © OneAccess Networks – All rights reserved
1237
1234
101484
101098
3
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
27
MGCP Statistics
Business-Class

Router
Solutions
MGCP Gateway Statistics
CLI# show voice mgcp-gateway
Call Agent IP address
Connection state
Current Calls
200.105.0.103:2427
connected
0
Outgoing Calls
Outgoing Calls
Outgoing calls path established
Incoming Calls
Incoming Calls
Incoming calls path established
0
0
0
0
CLI#
Copyright © OneAccess Networks – All rights reserved
28
MGCP Statistics
Business-Class

Router
Solutions
Events
CLI# event filter add vox voip all show
00:04:08.080 Info vox voip controlplan 3 FXS port 5/4 event:
off-hook, pots: 2.
00:04:12.580 Info vox voip controlplan 3 FXS port 5/4 event:
on-hook, pots: 2.
Copyright © OneAccess Networks – All rights reserved
29
MGCP Statistics
Business-Class

Router
Solutions
Debug
CLI# debug mgcp
!decroche sur port fxs 5/2
00:28:09.861 GW -> CA size:81 MGCP message (UDP)
NTFY 1123 aaln/1@0012ef2002fa MGCP 1.0
K: 1122
X: 000778306141449456
O: L/hd
00:28:09.930 GW <- CA size:12 MGCP message (UDP)
200 1123 OK
00:28:09.938 GW <- CA size:94 MGCP message (UDP)
RQNT 778307 aaln/1@0012ef2002fa MGCP 1.0
X:000778307141449456
R:L/HU(N),L/HF(N),D/[0-9#*](N)
00:28:09.939 GW -> CA size:15 MGCP message (UDP)
200 778307 OK
Copyright © OneAccess Networks – All rights reserved
30
MGCP Statistics
Business-Class

Router
Solutions
Voice call history, active calls

Gives statistics on the current voice calls and the last
100 calls
vxTarget>show voice voip-call any ind 1
1 - Call from remote voip: 0, to local port: 5/1 call-id: 4 active
calling : 3005, called : 0198613035
setup time: 01/02/00 04h58m31s
01/02/00 04h58m31s
RTP Source ip :20.5.3.131 rtp:12301 /Dest ip :200.15.0.152 rtp:16416 (active)
Play time (voice) : 00h00m39s
Tx Coder : G729 / 20 ms ; Rx Coder : G729
RTP Packets RX / TX : 1988 / 1989
RTP Packet lost&discarded RX / TX (RTCP reported) : 0 / 395307
Number of Excessive Jitter events : 3
Copyright © OneAccess Networks – All rights reserved
31
MGCP Statistics
Business-Class

Router
Solutions
RTP sessions history

Gives complete statistics about the 200 last RTP
sessions
CLI>show voice rtpcall full any ind 2
2 - 01/04/01 00h47m24s RTP 20.5.3.131:16416 - 200.15.0.152:16388
Play time (voice) : 00h00m46s
Tx Coder : G729 / 20 ms ; Rx Coder : G729
VAD enabled local / remote : no / no
ERL
ACOM
: 15 dB
: 32 dB
RTP Packets received (DSP / Uplink) : 2337 / 2337
lost : 0
out of sequence : 0
invalid : 0
RTP Packets transmitted (DSP / Uplink) : 2338 / 2338
lost (RTCP reported) : 0
Jitter parameter : 100 ms
Number of Excessive Jitter events : 1
Copyright © OneAccess Networks – All rights reserved
32
MGCP Statistics
Business-Class

Router
Solutions
RTP sessions history (continue)
Excessive Jitter events :
2|
1| *
---------------------------------------0 30"
1'
2'
4'
8' 12' >16'
Jitter received (uplink) :
Max delay : 93 ms
Delays (ms)
>50 >100 >150
Nb of occur.
2
0
0
Interarrival max jitter : 9 ms
Jitter received (DSP) :
Max delay : 93 ms
Delays (ms)
>50 >100 >150
Nb of occur.
2
0
0
Interarrival max jitter : 9 ms
>200
0
>300
0
>200
0
>300
0
>200
0
>300
0
Frames with a delay >50 ms :
2|
1| *
*
---------------------------------------0 30"
1'
2'
4'
8' 12' >16'
Jitter transmitted (uplink) :
Max delay : 6 ms
Delays (ms)
>50 >100 >150
Nb of occur.
0
0
0
Interarrival max jitter : 1 ms
(RTCP reported) : 2 ms
Copyright © OneAccess Networks – All rights reserved
33