Tuesday, April 5, 2011

CUCM Notes.

CUCM groups Advantages:
1. Redundancy
2. Load Balancing. 

During failover from one call manager to another call manager in the CUCM group list, all active calls would be preserved, and Cisco IP phones would re-register when the existing calls are complete.

Only on Call Manager group can be used for autoregistration per cluster.

Connection Monitor Duration: 
The length of time before a phone that is using SRST fails back to a Call Manager after it has become available again.

Device Pool:
Easy way of setting up same parameters for a set of devices (phones, gateways etc.,)

Calling Search Space:
If you configure the calling search space on both device & line, then Call Manager concatenates both calling search spaces & puts line calling search space first.

Media Resource Group List (MRGL):
If a device has MRGL configured at device level as well as at device pool level, then when a Media Resource is required Call Manager first searches the MRGL of device then MRGL at device pool.
  • If a Media resource (transcoder, MTP or Conference bridge) is not assgined to any MRG then it belongs to default MRG & can be accessed accessed by Call Manager as a last resort.  This media resource can be used by any device in the Call Manager.
    • device MRGL ---> device pool MRGL ----> default MRGL.

Saturday, March 19, 2011

MGCP Vs H.323

MGCP - IETF standard = Media Gateway Control Protocol.                                                                 
  •  Master/Slave Protocol - Call Agent (CUCM) is used to control the gateway ports.
  • Complete control of dial-plan from the CUCM.
  • Centralized call processing (CUCM).  * Requires dial-peers only for SRST.
  • Survivable end point by default- PRI backhaul.
  • No Caller-ID support with FXO port.

H.323 - ITU standard = ITU Umbrella recommendation.
  • Peer to Peer Protocol.
  • dial-plan controlled locally from H.323 gateway
  • distributed call processing.  CUCM/PSTN sends call to gateway & gateway decides (based on dial-peer) which port/call manager to use for outbound/inbound calls. 
  • Caller -ID supported with FXO port.
  • Not a survivable end point by default.  Survivability (call preserving) is supported form 12.4(9T) IOS release. Requires manual configuration, as listed below. Also requires CUCM service parameter to set for "Allow peer to Preserve H.323 calls"
    • #voice service voip
    • #h323
    • #call preserve

Survivability (Call Preserving):

When there is WAN connection failure or degraded WAN connection between gateway & CUCM or ccm.exe service is stopped on the call manager -

if the gateway is MGCP, all active calls would be preserved, but all new calls tried would be failed & supplementary services like hold, transfer would not function until gateway registers with secondary Call Manager.  The MGCP gateway would try to re-register with secondary Call Manager in the CUCM group.  When the gateway re-registers with secondary Call Manager, call preservation involves three steps which are completey transperent to the users.
  1. CUCM sends AUEP to the gateway - to find status of each B-channel on gateway.
  2. CUCM sends AUCX to end point for which gateway reportes as a preserved call.
  3. Finally Q.931 status enquiry message to confirm the status of calls that CUCM believes are preserved.
if the gateway is H.323, all active calls would be lost (if call preserve is not configured).  Because as soon as CUCM detects TCP connection lost it cleares all calls & closes the TCP sockets for all active calls by sending TCP FIN message.  If the gateway came up within a short while the gateway would receive the TCP FIN message and clears all calls.  If the gateway took a while to come up, the TCP FIN message will not reach the gateway.  But gateway would try sending keepalive messages to the CUCM for restoring the connection with primary Call Manager.When the Call Manager receives these keepalive messages it sends TCP RST (reset - tear down all active calls) message in response as it closed all TCP sockets.  So either way H.323 gateway could not preserve any active calls during failover & fail back scenarios.

If the "call preserve" is configured (supported on IOS versions starting 12.4(9T)) this command causes H.323 gateways to ignore socket closure messages (socket error) on H.225 & H.245 connections for active calls.  That is how H.323 gateway preserves active calls using call preserver configuraiton.

PRI backhaul.
Transporting of signalling information from MGCP gateway to Call Control Agent (CUCM) is called PRI backhauling.
  • PRI backhauling is carried over TCP port 2428.
  • All Q.931 messages & D-channell signalling information is passed between CUCM & gateway using this TCP connection.
  • All L2 information is terminated at the gateway & L3 information is passed to CUCM - Call Agent.
  • MGCP gateway does not parse or have any knowledge of these signalling packets.

Useful Q.931 timers

T310 - how long to wait to get response such as ALERTING or CONNECT
T303 - how long to wait to get response such as Call Proceeding for SETUP message.

Tuesday, January 25, 2011

Xcoder & Conf Br

Configuring Conference Bridge & Transcoder - Gateway (CLI) part

Definitions/Usage : "dspfarm" vs "dsp services dspfarm"
dspfarm: Allows dsp resources pooling or sharing.  That is, a VWIC card in a NM without any dsp resources can use mother board dsp resources.

dsp services dspfarm: Allows any unused dsp resources to be allocated for conferencing or transcoding.  Atleast one voice-card should be configured/enabled for this service.


sccp local looback X or gig X/X ---> specifies the local interface that SCCP applications use to register with Call Manager.

sccp ccm x.x.x.x identifier y version X.X---> adds the specified call manager to the list of available servers.   Identifier identifies the call manager with a number in the list. Required once for each call manager server in the list. For better failover stategy keep the servers in the same order of the device pool (with which this application  registers in CUCM). Version is the call manager version to which it registers.

sccp ip precedence X (1 - 7) ---> sets the predence value to be used by SCCP application. 
Range 1 -7 & default value is 5.

sccp ---> enables SCCP protocol and its related applications (transcoding/conferencing).

dspfarm profile:

dspfarm profile XX conference/transcode ---> enters the dspfarm profile mode.  Identifies the profile number (XX)& if it is for conferencing or for transcoding.

codec XXXXXX ---> specify all the codecs you want this application to support.  Ex: g711ulaw/g729abr8

maximum sessions XX ---> specifies the maximum number of sessions supported by this profile.  It depends on the available registered dsp resources.  Gateway automatically calculates and shows you the minimum & maximum number sessions (with maximum sessions ?) it can support depending upon the codecs you selected in above step.

associate application SCCP ---> Associates the SCCP protocl to the dspfarm profile (Application).

no shutdown ---> enables/activates this application/ dspfarm profile.

ccm group:

sccp ccm group XXX ---> enters the SCCP call manager config mode and creates call manager group

associate ccm X priority Y ---> adds specified call manager to the group and defines its priority in group.
Repeat for each call manager server defined in the call manager list (above).

associate profile XX register Name ---> associates above defined dspfarm profile with call manager group and registers with the call manager with specified name (Name must match with the device name specified in the call manager otherwise it will not register.)

bind interface loopback X or gig X/X ---> binds an interface with call manager group. 
This interface is used for signalling/media whereas "sccp local interface" command used for registration.

Example Config:

sccp local Loopback0
sccp ccm identifier 1 priority 1 version 7.0
sccp ccm identifier 2 priority 2 version 7.0
sccp ccm identifier 3 priority 3 version 7.0
sccp ip precedence 1
sccp ccm group 118
 description Mexico Conference Bridge
 bind interface Loopback0
 associate ccm 1 priority 1
 associate ccm 2 priority 2
 associate ccm 3 priority 3
 associate profile 21 register ABCXCODE
dspfarm profile 21 transcode 
 codec g711ulaw
 codec g711alaw
 codec g729ar8
 codec g729abr8
 codec g729r8
 codec g729br8
 maximum sessions 10
 associate application SCCP

Monday, January 17, 2011

csim start

Command #1 - csim start "dial string"

csim start "dial string" simulates a call to the specified dial string.  Most useful command in testing dial-plans on Voice Gateways & CMEs.

Need to remember when using csim start:
1. It works only with telnet & does not work with SSH1 or SSH2.  You would see following error message when you try this command with SSH1 or SSH2 login:

Router#csim start 911234567890
csim: called number = 911234567890, loop count = 1 ping count = 0
csim err:csim_do_test invalid major major(16) minor(0)
csim: loop = 1, failed = 0 
csim: call attempted = 1, setup failed = 0, tone failed = 0
2. It works only on the gateway with dial-plan configured.

3. When the destination phone (specified dial string) rings you can answer the phone but you would not hear anything.

4. Can be used in conjunction with debug commands (debug q931 or debug ccapi etc.,)


1. Successful call
Router#csim start 919724156038
csim: called number = 919724156038, loop count = 1 ping count = 0
csim: loop = 1, failed = 0 
csim: call attempted = 1, setup failed = 0, tone failed = 1

2. Unsuccessful call (call placed to unknown phone # or extension that doesnot exist)
Router#csim start 923456781234
csim: called number = 923456781234, loop count = 1 ping count = 0
csim err csimDisconnected recvd DISC cid(20237)
csim: loop = 1, failed = 1 
csim: call attempted = 1, setup failed = 1, tone failed = 0
3. Sometimes even the call (test) is successful still setup failed shows 1 - And I really dont know the reason :(
Router#csim start 919724156038csim: called number = 919724156038, loop count = 1 ping count = 0
*Jan 17 2011 11:55:42.785 MST: ISDN Se0/1/0:23 Q931: pak_private_number: Invalid type/plan 0x0 0x0 may be overriden; sw-type 3
*Jan 17 2011 11:55:42.785 MST: ISDN Se0/1/0:23 Q931: Sending SETUP  callref = 0x0C9A callID = 0x8CFA switch = primary-5ess interface = User
*Jan 17 2011 11:55:42.785 MST: ISDN Se0/1/0:23 Q931: TX -> SETUP pd = 8  callref = 0x0C9A
        Bearer Capability i = 0x8090A2
                Standard = CCITT
                Transfer Capability = Speech 
                Transfer Mode = Circuit
                Transfer Rate = 64 kbit/s
        Channel ID i = 0xA98397
                Exclusive, Channel 23
        Called Party Number i = 0xA1, '19724156038'
                Plan:ISDN, Type:National
*Jan 17 2011 11:55:42.837 MST: ISDN Se0/1/0:23 Q931: RX <- CALL_PROC pd = 8  callref = 0x8C9A
        Channel ID i = 0xA98397
                Exclusive, Channel 23
*Jan 17 2011 11:55:43.457 MST: ISDN Se0/1/0:23 Q931: RX <- PROGRESS pd = 8  callref = 0x8C9A
        Progress Ind i = 0x8A81 - Call not end-to-end ISDN, may have in-band info
*Jan 17 2011 11:55:48.753 MST: ISDN Se0/1/0:23 Q931: RX <- ALERTING pd = 8  callref = 0x8C9A
*Jan 17 2011 11:55:55.377 MST: ISDN Se0/1/0:23 Q931: RX <- CONNECT pd = 8  callref = 0x8C9A
*Jan 17 2011 11:55:55.381 MST: %ISDN-6-CONNECT: Interface Serial0/1/0:22 is now connected to 19724156038 N/A
*Jan 17 2011 11:55:55.381 MST: ISDN Se0/1/0:23 Q931: TX -> CONNECT_ACK pd = 8  callref = 0x0C9A
csim err csimDisconnected recvd DISC cid(17292)
csim: loop = 1, failed = 1 
csim: call attempted = 1, setup failed = 1, tone failed = 0