Mar 21

RSVP

RSVP is a topology aware Call Admission Control (CAC) mechanism. As with any CAC mechanism the main purpose is to determine whether a call has enough bandwidth to proceed. RSVP supports any network topology and can pass through non-rsvp aware routers. Non-rsvp aware router will ignore and forward all rsvp messages.

RSVP signalling uses the same IP route as the media stream would take. If bandwidth on any link throughout the network is not sufficient, the reservation fails. If there is sufficient bandwidth throughout the network the reservation succeeds.

RSVP calculation

Lets work with G729 codec. Now before I get into how RSVP calculates bandwidth requirements, let do a quick refresher on payload sizes, and rtp stream size requirements for G729.

Below is a quick calculation on the three sampling sizes available for configuration in CUCM and CME.

10ms sampling size
IP Header = 20bytes
UDP Header = 8bytes
RTP Header = 12bytes
Payload = 10bytes
Total 50bytes per packet

1000ms / 10ms (sampling size)  = 100packets per seconds (pps)

100pps x 50bytes = 5000bytes per second

Convert to kbps = 40kbps. This is needed to for a single call with G729 with 10ms sampling size.

20ms sampling (Default for both CUCM and CME)

IP Header 20bytes
UDP Header 8bytes
RTP Header 12bytes
Payload 20bytes
Total 60bytes per packet.

1000ms / 20ms = 50pps

50pps x 60bytes = 3000bytes per second

Convert to kbps = 24kbps. This is needed to for a single call with G729 with 20ms sampling size.

30ms Sampling size

IP Header 20bytes
UDP Header 8bytes
RTP Header 12bytes
Payload 30bytes
Total 70bytes per packet

1000ms / 30ms = 33pps

33pps x 70bytes = 2310bytes per second

Convert to kbps = 18.4kbps. This is needed to for a single call with G729 with 30ms sampling size.

As we can see the 10ms sampling size requires the highest amount of bandwidth being 40kbps. Keep that in mind for a later discussion.

RSVP bandwidth pool is configured on each router’s interface with the ip rsvp bandwidth bandwidth command.

The bandwidth entered should equal the number of calls that is allowed to stream across the interface simultaneously. Working from the default (20ms sampling size), if we want to restrict calls to a maximum of 5 calls, we would enter 136kbps for the bandwidth. You are probably saying, the bandwidth should be 120kbps as 5 x 24kbps equals 120kbps. BUT RSVP doesn’t know the sampling size when the its setting up the reservation. All RSVP knows is the codec type, in this case its G729 which uses a maximum of 40kbps, remember going back to the previous discussion, a 10ms smapling size equals 40kbps. RSVP allows for the maximum size for a G729 call initially, until the rsvp process can look inside the voice stream and determine what sampling size the codec is using. Generally default is left, there the size is 24kbps, RSVP then throttles down the bandwidth needed to 24kbps. Therefore we always add 16kbps (the difference between a 20mx sampling size packet to a 10ms sampling size packet) to the rsvp bandwidth. This allows the last call to be initiated at 40kbps, before being throttled down. If we didn’t add the 16kbps onto the bandwidth needed, the last call would never be allowed to be setup as the RSVP process would have 24kbps left in the bandwidth pool, but 40kbps is needed to initially setup the reservation.

RSVP for CAC purposes is a DiffServ Model, not InetServ model. Yes RSVP traditionally speaking is an InetServ model as the RSVP process sits on the Control and Data Plane of the router. However RSVP used by CUCM sits only on the Control Plane, hence controls the Call Admission Component and not the actual QoS which runs on the Data Plane level. The QoS is left up to the LLQ mechanism.

Configuring RSVP

Commands

Interface G0/0
ip rsvp bandwidth kbps
 Dspfarm profile 2 mtp
Codec g729
Codec pass-through
Rsvp
Maximum sessions software 4 (Ensure this number is greater than or equal to the number of  calls desired.

 Sccp local Loopback 0
Sccp ccm 10.0.0.1 identifier 1 version 7+
Sccp ccm 10.0.0.2 identifier 2 version 7+

Sccp
 Sccp ccm group 1
 Bind interface loopback 0
 Associate ccm 1 priority 1
 Associate ccm 2 priority 2
 Associate profile 2 register HQ-RSVP

Notes:

*Can only use one codec assigned to an MTP resource, although you can have variations of the codec in same MTP resource. Eg G729a G729ab etc

*The MTP resource can also be used for other purposes, not just rsvp. So its always a good idea to allow maximum sessions higher to what is allowed by RSVP CAC as other process maybe using ghe MTP resource and consuming a session.

Mar 16

Displaying Logged in Users and their Devices using CUCM Shell

We all know in CUCM we can find logged in Users by clicking on the Device Tab then selecting the  Active Logged in Users dropdown on the top right of the window. This displays a list of currently logged in users and what device they have logged onto. To do this in the shell so we can export to a text or CSV file run the following command

run sql select d.name, eu.userid, p.name from extensionmobilitydynamic emd, device d, device p, enduser eu where emd.fkdevice=d.pkid and emd.fkdevice_currentloginprofile=p.pkid and emd.fkenduser=eu.pkid

This will output currently logged on profiles and their relating device. If we just wanted show output for a particular user, for example John Doe, with userid jdoe. We would run the following.

run sql select d.name, eu.userid, p.name from extensionmobilitydynamic emd, device d, device p, enduser eu where emd.fkdevice=d.pkid and emd.fkdevice_currentloginprofile=p.pkid and emd.fkenduser=eu.pkid and eu.userid=jdoe

This will show the following columns: Device Name, User ID, UDP Profile Name

If you would like to add in the DN, simply include the relevant dnorpattern fields.

Let’s take this a step further. Let’s say we are migrating to a new CUCM Cluster and we need to login users to the phones they were logged into on the existing CUCM Cluster.

Once we have this output, we can convert to CSV via the Import Data functionality in Excel, I use space as a separator, then bring together the UDP Profile name with a simply Excel formula. Now we merge the data into the EM Login URL. The URL is below

http://IP.ADDRESS:8080/emapp/EMAppServlet?device=#DEVICE#&&userid=USERID&seq=PIN

Simply reference the EM login URLs with a scripting language of your choice and run against the new CUCM Cluster. Users will be auto logged into their phone

Mar 14

Remove Duplicate IP Phone Services in CUCM

 

In CUCM if we add update UDP’s or devices with Extension Mobility IP Phone Services subscribed, the import process appends another IP Phone Service, so you could end up with multiple IP Phones Services subscribed. Hence when the phone user press the Services button on the IP Phone, the menu displays more than one instance of the IP Phone Service, in this case Extension Mobility.

One way to prevent the IP Phones Services from being duplicated or appended to the Device or UDP is to make sure the import process deletes all IP Phones Services before adding the IP Phone Service from your CSV or TXT file.

Under Override Options check the box “Override the existing configuration”

Then check the box Delete all existing Subscribed Services before adding new ones”

Override Options

If you already have duplicate IP Phone Services subscribed to Devices to UDPs. Go to the Bulk Administration Menu and select the Devices (or UDP) then select Update Phones. Use Update via Query.

Remove Duplicate

If you then check the phones or UDPs, you will now only have one subscription of the IP Phone Service.

Mar 03

IOS Dial Peer Pattern Matching

Thought I would post this topic as I know I tend to forget the many patterns and wildcards that can be used in IOS to march dial peer patterns and translation patterns for that fact. Some patterns are more common that others, however for the lab exam, Im sure the questions will have you creating more complex patterns to test your knowledge.

Patterns used in IOS

  • 0-9 A-D * # These are standard DTMF characters used in IOS.
  • . wildcard that matches any single digit. Important to note the . does not match the * or the #
  • +  can be used if first character to indicate +E164 dialling (IOS 12.4.20 – first introduced)
  • + regex that means one or more of the previous character if not first in string
  • ? regex that means zero or one of the previous character
  • % regex that means zero or more of the previous character
  • ^ regex that means beginning of line
  • $ regex that means end of line
  • T wait for interdigit timeout (only used in IOS). This combined with the . matches all numbers Example .T
  • \ escape next character to use as literal character
  • [] range of digits. Example [2-4]66 means 266 or 366 or 466
  • () a collected pattern of digits (normally used with regex) (100)?55511 could mean
    55511 or 10055511

Let me know if you would like examples of patterns and I will add to post.

Mar 03

Matching Dial Peers VOIP and POTS

Quick note on how Cisco IOS matches dial peers. A single dial peer can be used for both inbound and outbound call legs. The rule destination-pattern can be used for both inbound and outbound dial peer matching, but remember destination-pattern match the calling number (ANI) for inbound call legs and matches the called number (DNIS) for outbound call legs.

Matching Inbound Dial Peer for both VOIP and POTS

  • incoming called-number – Matches called number (DNIS)
  • answer-address – Matches calling number (ANI)
  • destination-pattern – matches calling number (ANI)
  • port – Matches inbound Port  (POTS ONLY)
  • Default dial peer – used with VOIP dial peer ONLY

 

Default Dial Peer matches the below

  • Any codec
  • VAD enabled
  • No DTMF
  • DSCP 0
  • No RSVP
  • No TCL or VXML Applications
  • No DID

 

Matching Outbound Call Leg

  • destination-pattern – Matches called number (DNIS)