Wednesday, 3 February 2016

MGCP Registration


MGCP protocol is using TCP port 2427 to exchange messages. It uses multiple messages to communicate between CUCM and MGCP GW. Each message should be Acknowledged.

  1. CreateConnection (CRCX): This command is sent by call manager to MGCP Endpoint to create RTP session. It includes the following parameters:
    1. Bandwidth to be used for the call
    2. Codec to be used
    3. QoS settings
    4. Encryption
    5. Voice activity detection (VAD)
    6. Echo cancellation
    7. RSVP
    8. Other Endpoint IP Addresses & port number

SDP is used to carry those parameters. Gateway responds to this request with status message. If the request is accepted, 200 OK status is sent to call manager.

  1. NotificationRequest (RQNT): If the CallManager wants the gateway to watch certain events on an endpoint, it sends this message listing the types of events to watch. This list is included in SDP portion of the message. The events can be DTMF digits, on-hook, off-hook, etc.

  1. Notify (NTFY): When the gateway detects any of the requested events, it will notify CUCM using NTFY message which has the event listed in SDP.

  1. ModifyConnection (MDCX):  During a connection some parameters might change. If voice call was established and fax tone is detected, CUCM will instruct the gateway to change the encoding using MDCX message which will include the new parameters in SDP.

  1. DeleteConnection (DLCX): Sent by CUCM to gateway in order to terminate a connection. After successful termination the gateway responds with 200 OK message which carry the following info in SDP:
    1. Number of packets sent
    2. Number of bytes sent
    3. Number of packets received
    4. Number of bytes received
    5. Number of packets lost
    6. Average jitter
    7. Average transmission delay

  1. AuditEndpoint (AUEP): This is sent by CUCM to get the info and status of endpoint. Its sent per endpoint.

  1. EndpointConfiguration (EPCF): This carries the configuration sent from CUCM to gateway.

  1. RestartInProgress (RSIP): This message is sent from gateway to CUCM when an endpoint or group of endpoints are registering/de-registering from CUCM or when the gateway restarts (graceful, force, restart).

MGCP endpoints will register with CUCM in order to control them. This follow below steps:


*Sep 24 16:46:06.631: MGCP Packet sent to 192.168.44.131:2427--->
RSIP 918184849 *@mgcpgateway.testdomain.com MGCP 0.1
RM: restart
<--- p="">

*Sep 24 16:46:06.639: MGCP Packet received from 192.168.44.131:2427--->
200 918184849
<--- p="">

!!! …… CUCM will request AUEP for each DS0 Channel or Voice Port. The RequestedInfo (F) are X (RequestIdentifier), A (Capabilities), I (ConnectionId)
*Sep 24 16:46:06.647: MGCP Packet received from 192.168.44.131:2427--->
AUEP 38 S0/SU2/DS1-0/1@RTR2 MGCP 0.1
F: X, A, I
<--- p="">

*Sep 24 16:46:06.651: MGCP Packet sent to 192.168.44.131:2427--->
200 38
I:
X: 0
L: p:10-20, a:PCMU;PCMA;G.nX64, b:64, e:on, gc:1, s:on, t:10, r:g, nt:IN;ATM;LOCAL, v:T;G;D;L;H;R;ATM;SST;FXR;PRE
L: p:10-220, a:G.729;G.729a;G.729b, b:8, e:on, gc:1, s:on, t:10, r:g, nt:IN;ATM;LOCAL, v:T;G;D;L;H;R;ATM;SST;FXR;PRE
L: p:10-110, a:G.726-16;G.728, b:16, e:on, gc:1, s:on, t:10, r:g, nt:IN;ATM;LOCAL, v:T;G;D;L;H;R;ATM;SST;FXR;PRE
L: p:10-70, a:G.726-24, b:24, e:on, gc:1, s:on, t:10, r:g, nt:IN;ATM;LOCAL, v:T;G;D;L;H;R;ATM;SST;FXR;PRE
L: p:10-50, a:G.726-32, b:32, e:on, gc:1, s:on, t:10, r:g, nt:IN;ATM;LOCAL, v:T;G;D;L;H;R;ATM;SST;FXR;PRE
L: p:30-270, a:G.723.1-H;G.723;G.723.1a-H, b:6, e:on, gc:1, s:on, t:10, r:g, nt:IN;ATM;LOCAL, v:T;G;D;L;H;R;ATM;SST;FXR;PRE
L: p:30-330, a:G.723.1-L;G.723.1a-L, b:5, e:on, gc:1, s:on, t:10, r:g, nt:IN;ATM;LOCAL, v:T;G;D;L;H;R;ATM;SST;FXR;PRE
M: sendonly, recvonly, sendrecv, inactive, loopback, conttest, data, netwloop, netwtest
<--- p="">

The MGCP Gateway will send NTFY message every 15 sec (by default) as keepalive. CUCM will acknowledge using 200OK

!!! …… First NTFY/200OK was sent @ 21:47:41 and the next NTFY/200OK was sent after 15 sec @ 21:47:56

Jan 27 21:47:41 MST: MGCP Packet sent to 10.170.4.11:2427--->
NTFY 329754016 *@mgcpgateway.testdomain.com MGCP 0.1
X: 0
O:
<--- p="">

Jan 27 21:47:41 MST: MGCP Packet received from 10.170.4.11:2427--->
200 329754016
<--- p="">

Jan 27 21:47:56 MST: MGCP Packet sent to 10.170.4.11:2427--->
NTFY 329754017 *@mgcpgateway.testdomain.com MGCP 0.1
X: 0
O:
<--- p="">

Jan 27 21:47:56 MST: MGCP Packet received from 10.170.4.11:2427--->
200 329754017
<--- p="">

mgcpgateway(config-subif)#do sh ccm-manager
MGCP Domain Name: mgcpgateway.testdomain.com
Priority        Status                   Host
============================================================
Primary         Registered               10.170.4.11
First Backup    Backup Ready             10.170.4.10
Second Backup   Backup Ready             10.34.230.10

Current active Call Manager:    10.170.4.10
Backhaul/Redundant link port:   2428
Failover Interval:              30 seconds
Keepalive Interval:             15 seconds
……

If the Primary CUCM Server doesn't respond to NTFY messages with 200OK within 30 seconds, MGCP Gateway will Switchover to secondary CUCM Server

mgcpgateway(config-subif)#do sh ccm-manager
MGCP Domain Name: mgcpgateway.testdomain.com
Priority        Status                   Host
============================================================
Primary         Down                     10.170.4.11
First Backup    Registered               10.170.4.10
Second Backup   Backup Ready             10.34.230.10

Current active Call Manager:    10.170.4.10
Backhaul/Redundant link port:   2428
Failover Interval:              30 seconds
Keepalive Interval:             15 seconds
……

After the last NTFY message, MGCP Gateway will send RSIP Graceful message to Primary CUCM (without any response from Pri CUCM) followed by RSIP Restart message to Secondary CUCM (this will be acknowledged with 200OK)

Jan 27 21:49:11 MST: MGCP Packet sent to 10.170.4.11:2427--->
RSIP 329754022 *@mgcpgateway.testdomain.com MGCP 0.1
RM: graceful
<--- p="">

Jan 27 21:49:11 MST: MGCP Packet sent to 10.170.4.10:2427--->
RSIP 329754024 *@mgcpgateway.testdomain.com MGCP 0.1
RM: restart
<--- p="">

Jan 27 21:49:11 MST: MGCP Packet received from 10.170.4.10:2427--->
200 329754024
<--- p="">

1 comment:

  1. BlueHost is one of the best website hosting provider with plans for all of your hosting needs.

    ReplyDelete