Sunday, April 24, 2011

MGCP Call Preservation Porcess with Debugs Explained

MGCP Debug whilst the call is active & the Primary CA goes down:
################################
STEP 1: Call is made.
################################
============================================================
HQ-R1#sh ccm-manager
MGCP Domain Name: HQ-R1
Priority        Status                   Host
============================================================
Primary         Registered               177.1.10.20
First Backup    Backup Ready             177.1.10.10
Second Backup   None

Current active Call Manager:    177.1.10.20
Backhaul/Redundant link port:   2428
Failover Interval:              30 seconds
Keepalive Interval:             15 seconds
Last keepalive sent:            23:06:48 PST Apr 23 2011 (elapsed time: 00:00:27)
Last MGCP traffic time:         23:06:59 PST Apr 23 2011 (elapsed time: 00:00:16)
Last failover time:             22:45:50 PST Apr 23 2011 from (177.1.10.20)
Last switchback time:           22:51:35 PST Apr 23 2011 from (177.1.10.10)
Switchback mode:                Graceful
MGCP Fallback mode:             Not Selected
Last MGCP Fallback start time:  None
Last MGCP Fallback end time:    None
MGCP Download Tones:            Disabled
TFTP retry count to shut Ports: 2

Backhaul Link info:
    Link Protocol:      TCP
    Remote Port Number: 2428

HQ-R1#sh call active voice br
<ID>: <CallID> <start>ms.<index> +<connect> pid:<peer_id> <dir> <addr> <state>
  dur hh:mm:ss tx:<packets>/<bytes> rx:<packets>/<bytes>
 IP <ip>:<udp> rtt:<time>ms pl:<play>/<gap>ms lost:<lost>/<early>/<late>
  delay:<last>/<min>/<max>ms <codec>

 media inactive detected:<y/n> media cntrl rcvd:<y/n> timestamp:<time>

 long duration call detected:<y/n> long duration call duration :<sec> timestamp:<time>
  MODEMPASS <method> buf:<fills>/<drains> loss <overall%> <multipkt>/<corrected>
   last <buf event time>s dur:<Min>/<Max>s
 FR <protocol> [int dlci cid] vad:<y/n> dtmf:<y/n> seq:<y/n>
  <codec> (payload size)
 ATM <protocol> [int vpi/vci cid] vad:<y/n> dtmf:<y/n> seq:<y/n>
  <codec> (payload size)
 Tele <int> (callID) [channel_id] tx:<tot>/<v>/<fax>ms <codec> noise:<l> acom:<l> i/o:<l>/<l> dBm
  MODEMRELAY info:<rcvd>/<sent>/<resent> xid:<rcvd>/<sent> total:<rcvd>/<sent>/<drops>
         speeds(bps): local <rx>/<tx> remote <rx>/<tx>
 Proxy <ip>:<audio udp>,<video udp>,<tcp0>,<tcp1>,<tcp2>,<tcp3> endpt: <type>/<manf>
 bw: <req>/<act> codec: <audio>/<video>
  tx: <audio pkts>/<audio bytes>,<video pkts>/<video bytes>,<t120 pkts>/<t120 bytes>
 rx: <audio pkts>/<audio bytes>,<video pkts>/<video bytes>,<t120 pkts>/<t120 bytes>


Telephony call-legs: 1
SIP call-legs: 0
H323 call-legs: 0
Call agent controlled call-legs: 1
SCCP call-legs: 0
Multicast call-legs: 0
Total call-legs: 2
1206 : 74 33610900ms.1 +0 pid:0 Originate  connecting
 dur 00:00:08 tx:388/62080 rx:387/61920
 IP 177.1.11.4:29386 SRTP: off rtt:0ms pl:5510/0ms lost:0/0/0 delay:55/55/65ms g711ulaw TextRelay: off
 media inactive detected:n media contrl rcvd:n/a timestamp:n/a
 long duration call detected:n long duration call duration:n/a timestamp:n/a
1206 : 73 33610900ms.2 +0 pid:0 Originate  active
 dur 00:00:08 tx:444/71040 rx:387/65016
 Tele 0/0/0:23 (73) [0/0/0.1] tx:8880/8880/0ms g711ulaw noise:-82 acom:9  i/0:-79/-69 dBm

*************************************
Telephony call-legs: 1
SIP call-legs: 0
H323 call-legs: 0
Call agent controlled call-legs: 1
SCCP call-legs: 0
Multicast call-legs: 0
Total call-legs: 2
**************************************
#########################################
STEP 2: Primary CA Goes Down. AUEP Sent.
#########################################

HQ-R1#debug mgcp packets
Media Gateway Control Protocol packets debugging for all endpoints is on
HQ-R1#
Apr 24 06:07:55.535: MGCP Packet sent to 177.1.10.20:2427--->
RSIP 215240937 *@HQ-R1 MGCP 0.1
RM: graceful
<---
************************************************************
RSIP Sent to Secondary CA. Secondary CA Sends ACK.
************************************************************
Apr 24 06:07:55.535: MGCP Packet sent to 177.1.10.10:2427--->
RSIP 215240939 *@HQ-R1 MGCP 0.1
RM: restart
<---

Apr 24 06:07:55.555: MGCP Packet received from 177.1.10.10:2427--->
200 215240939
<---

Apr 24 06:07:55.559: MGCP Packet sent to 177.1.10.10:2427--->
NTFY 215240941 *@HQ-R1 MGCP 0.1
X: 0
O:
<---
************************************************************
2nd CA sends AUEP to audit preserved calls. This is the AUEP for
1st B Channel -- S0/SU0/DS1-0/1.
************************************************************

Apr 24 06:07:55.615: MGCP Packet received from 177.1.10.10:2427--->
AUEP 47 S0/SU0/DS1-0/1@HQ-R1 MGCP 0.1
F: X, A, I
<---

Apr 24 06:07:55.623: MGCP Packet sent to 177.1.10.10:2427--->
200 47
I: 23
**************************************************************
This is connection identifier. If the call is preserved on a
B-Channel, this returns a non-null value back to CA. NOw the
CA will send an AUCX for this channnel.
***************************************************************
X: 1
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
M: sendonly, recvonly, sendrecv, inactive, loopback, conttest, data, netwloop, netwtest
<---

*******************************************************
This is the AUEP for 2nd B Channel -- S0/SU0/DS1-0/1.
*******************************************************

Apr 24 06:07:55.627: MGCP Packet received from 177.1.10.10:2427--->
AUEP 48 S0/SU0/DS1-0/2@HQ-R1 MGCP 0.1
F: X, A, I
<---

Apr 24 06:07:55.627: MGCP Packet sent to 177.1.10.10:2427--->
200 48
I:
**************************************************************
This is connection identifier. If the call is preserved on a
B-Channel, this returns a non-null value back to CA. See here
is a null value. So no call on this channel.
***************************************************************
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
M: sendonly, recvonly, sendrecv, inactive, loopback, conttest, data, netwloop, netwtest
<---

Apr 24 06:07:55.631: MGCP Packet received from 177.1.10.10:2427--->
AUEP 49 S0/SU0/DS1-0/3@HQ-R1 MGCP 0.1
F: X, A, I
<---

Apr 24 06:07:55.635: MGCP Packet sent to 177.1.10.10:2427--->
200 49
I:
X: 3
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
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;ATM;FXR
M: sendonly, recvonly, sendrecv, inactive, loopback, conttest, data, netwloop, netwtest
<---

Apr 24 06:07:55.635: MGCP Packet received from 177.1.10.10:2427--->
AUEP 50 S0/SU0/DS1-0/4@HQ-R1 MGCP 0.1
F: X, A, I
<---

.
.
.
.
Apr 24 06:07:55.679: MGCP Packet received from 177.1.10.10:2427--->
AUEP 69 S0/SU0/DS1-0/23@HQ-R1 MGCP 0.1
F: X, A, I
<---

Apr 24 06:07:55.679: MGCP Packet sent to 177.1.10.10:2427--->
500 69 Endpt Unknown
<---

Apr 24 06:07:55.679: MGCP Packet received from 177.1.10.10:2427--->
200 215240941
<---

###################################################################
STEP 3: CA sends AUCX. See the connection number corresponds to the
one above (i=23)
####################################################################

Apr 24 06:07:55.683: MGCP Packet received from 177.1.10.10:2427--->
AUCX 93 S0/SU0/DS1-0/1@HQ-R1 MGCP 0.1
I: 23
F: C, M
<---

Apr 24 06:07:55.687: MGCP Packet sent to 177.1.10.10:2427--->
200 93
C: D000000002cee91c000000F5800000a4
M: sendrecv
<---

******************************************************************
CA asks the GW to notify if ICMP Unreachable is recd for RTP Stream.
******************************************************************

Apr 24 06:07:55.699: MGCP Packet received from 177.1.10.10:2427--->
RQNT 94 S0/SU0/DS1-0/1@HQ-R1 MGCP 0.1
X: 1
R: R/iu, FXR/t38
Q: process,loop
<---

Apr 24 06:07:55.703: MGCP Packet sent to 177.1.10.10:2427--->
518 94  Unknown or Unsupported Package
<---

###################################################################
STEP 4 : CA sends isdn q931 status inquiry msg to far end PRI Switch.
####################################################################


HQ-R1#u all
All possible debugging has been turned off
HQ-R1#
======================================================

Saturday, April 16, 2011

Voice Class Codec for H323 Gateways

One important aspect that I lately discovered is the necessity of having voice class codec if you are using H323 gateways in the lab/environment. VoIP Dial Peers (DP) by default employ G729 Codec. So when you are creating the VoIP Dial Peers to sent the incoming calls to the CUCM, by default they will start using G729. This can lose you marks in the Lab as you might be asked to have G711 within a site.

Having Voice Class Codec enables you to have your VoIP DPs negotiate both G711 & G729 Codecs. This comes especially handy when you transfer the calls to other site, say Branch 1 phone to whom you must talk G729.

Here is a working config:
!
voice class codec 1
 codec preference 1 g711ulaw
 codec preference 2 g729r8

!
voice class h323 1
  h225 timeout tcp establish 3
!
dial-peer voice 1000 voip
 incoming called-number .
 destination-pattern 3...$
 voice-class codec 1
 voice-class h323 1
 session target ipv4:177.1.10.20  // Subscriber
 dtmf-relay h245-alphanumeric
 no vad
!
dial-peer voice 1001 voip
 preference 1
 destination-pattern 3...$
 voice-class codec 1
 voice-class h323 1
 session target ipv4:177.1.10.10 // Publisher
 dtmf-relay h245-alphanumeric
 no vad
!

Rerouting Calling Search Space in Unified Mobility

Here is the difference between Rerouting Calling Search Space (RCSS)  & Calling Search Space(CSS) in the Remote Destination Profile (RDP). 

1. RCSS is used for 2 purposes:
   a. When someone calls your Office Phone, say 5002, then this CSS is used to call your Cell Phone (Remote Destination associated to your RDP). This is imp cause the calling party might not have the COS to reach your cell phone number otherwise.
   b. When you hit the MOBILITY softkey from your phone to transfer your incoming calls to your cell phone. IMP point, for this to work, the owner user id must be associated at the device level. The user must be the one also associated to the RDP.

2. CSS in RDP is employed for these 2 purposes:
   a. When you call from your Cell Phone to the CUCM, this CSS can be used [ Provided you changed the SP from GWs CSS to RDP CSS] by your incoming call to hunt what all numbers it can reach. 
   b. When using MVA aka DISA service. This CSS is assumed by your MVA calls to provide COS to what all numbers you can dial.