Call Routing in Cisco’s Unified Call Manager (CUCM)

The most fundamental component of a unified communications system is the cal routing database used to perform digit analysis and direct traffic to the intended destination.  This document servers as a reminder of how that database works with the Cisco Unified Call Manager (CUCM)

CUCM call routing use the following components:

  • Route Pattern (RP)
  • Route List (RL)
  • Route Group (RG)
  • Gateway/Trunk (GW/ICT)

When calling, Cisco phones use Skinny (SCCP) to send their digits to the CUCM where the routing DB is used to make direct the call.  Once analysis is complete the call will be routed to the called party.

Routing Patterns make use of wild cards, but it should be noted that the more specific the pattern the higher preference given to that particular entry.  These are fairly similar to Unix wildcards.  Entries can look like this:

  • 1208 – An exact number match used for directory numbers that are assigned to a partition and route to a specific Cisco IP phone (SEP001894AAAAAA)
  • 120X – 1200 to 1209 plus 120* and 120#
  • 120[5-9] – 1205 to 1209. Translation patterns used to route unassigned calls to the operator.
  • 120[^0-4] – 1205 to 1209 (exclude 0-4).  I don’t think we use these.
  • . – Digit stripping and manipulation
  • 9.@ – Route pattern used at most companies for outgoing calls where you dial 9
  • # – timing out for International calls

In the CUCM 5 take a look at “Call Routing | Route Plan Report” and you will see your current  plan.  They are listed in 5 columns. The first is a graphic representation of  the 4th (Type).  The others are Pattern, Partition and Route Detail.

This is from a conversation with a friend and some reading I did some time ago.   Thanks JM for teaching me.


Setting up Simple MySQL Database Replication

I operate a busy OpenStack environment that is used by lots of people making changes everyday.  A typical day will see over 100 images spawned and terminates, but some of these last longer than a day.  Because OpenStack maintains a stateDB mapping the OpenStack layers to the KVM/Libvirt layers it’s critical to have not only backups, but mysql replication in place.  A failure 18 hours after my last backup could leave me scrambling through over 100 instances looking and performing some horrible manual fixes.

With that in mind I’m building a second controller for OpenStack which will keep a replicated copy of the database.  The plan is to add an HAProxy in to the mix to manage all connections from the Compute Nodes to the Controllers as well as incoming https connections from my users into the Controllers.

In the end, that’s where I’m going.  This article is just about the first part.  MySQL Replication.  BTW: This is Ubuntu 12.04


Like all of the documentation from MySQL it’s written at a pretty high-level and is 100% factually correct while also being slightly unclear and missing steps.   What is wrong with examples?  Why not add some?

Continue reading

Troubleshooting Slow Linux Systems

If you system is running slowly, and this goes for RHEL, Debian and other variants then take a look at this article which is a simple walkthrough of the tools you can use to solve problems.  These specific examples are from a system running Openstack, but that’s not important to most of you:

  • top – The place to start is generally the ‘top’ command which shows a resource summary and task list.
  • iotstat – Shows the reads and writes on your disk
  • iotop – Realtime iostat
  • iozone – Generate some test traffic to see how the system reacts.

Continue reading

SSL Certificate – Renewing a Certificate for ApacheSSL

This doc was written to assist with the next time I have to update the SSL cert on an ApacheSSL server. The specific examples here are from an RHEL5 server with Apache2.x

Here are the steps.

  1. Locate the Relevant Files - These files are the CRT and CSR. The CRT is issued by Thawte or Verisign, and the CSR is the request that you send to them. To find these locate your httpd.conf file or possibly the httpd-ssl.conf file in ./extras/. This stuff should typically be in /etc/httpd/conf, but idiots will place it in other locations because they don’t understand the UNIX conventions. Specifically you are looking for a line that says something line this. SSLCertificateKeyFile /usr/local/apache2/conf/server.key. That will take you to server.key as the file. You need to find the CSR associated with the key and copy that.
  2. Login to the Certificate Authority’s Web Site - For Thawte, we have an account itsupport/Thawt3SSL and fill out the information. If you get stuck, the reference the current ‘live’ certificate with your browser. You will need to paste the… sadly my notes just trail off here.
  3. Certificate Authority will Call You - So you need to be able to answer, or have someone fwd the Cert. Authority to your phone. The just want to verify things.
  4. Apply the Certificate - This will need to go in the file that is listed in your config files… see #1 above, but, SSLCertificateFile /usr/local/apache2/conf/server.crt it’s the .crt file not the key.
  5. Restart Apache - service httpd restart
  6. Check the Cert - for the new expiration date.

NB: if you need to make a change to any information, then the certificate authority will need to talk with company executives, have some faxes sent and generally draw the whole thing out. Also you will need to generate a new key. You will need to start with key generation:


/usr/bin/openssl genrsa -rand /dev/urandom -out /usr/local/apache2/conf/server_new.key 1024
/usr/bin/openssl req -new -key /usr/local/apache2/conf/server.key -out /usr/local/apache2/conf/server.csr

Create the .key and then the request .csr. This is where you make the changes to the information and the CSR is what you will submit to the authority.

Build an ISO to a Thumb Drive on the Mac

Reposted from Andrew King at work:


Insert your thumbdrive. You should see it pop up on your desktop, all nice and mounted, ready for you to use. Only it isn’t. If you can see it on your desktop, you can’t use it the way we need to.
$ diskutil list
You should see something like this:
   #:      TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme       *251.0 GB   disk0
   1:      EFI                          209.7 MB   disk0s1
   2:      Apple_CoreStorage            249.8 GB   disk0s2
   3:      Apple_Boot Recovery HD       814.4 MB   disk0s3
   #:      TYPE NAME                    SIZE       IDENTIFIER
   0:      Apple_HFS Macintosh HD      *249.5 GB   disk1
   #:      TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme       *1.0 TB     disk2
   1:      EFI                          209.7 MB   disk2s1
   2:      Apple_HFS My Passport        999.8 GB   disk2s2
   #:      TYPE NAME                    SIZE       IDENTIFIER
   0:      FDisk_partition_scheme      *1.0 GB     disk3
   1:      DOS_FAT_32 UNTITLED          1.0 GB     disk3s1
In the instance above, I’ve noted my thumbdrive – /dev/disk3. It happened to be “UNTITLED”, but it could be whatever name you may have given it. Anyhow, we essentially need to unmount everything on that disk, but not remove it completely from the system.
$ diskutil unmountDisk /dev/disk3
Unmount of all volumes on disk3 was successful
That solves that. Now, where is that ISO image you have? You need to know where it is so you can copy it to that thumbdrive. By the way – do this on a thumbdrive that is either backed up, or in other ways not useful (like old, and small, whatever). You’ll note the one I’m using is 1G. LOL! I got it with a Cisco router that I bought. It came with “management” software on it that sucks. But I digress. That thumbdrive, when it’s all over, will have NOTHING on it but the ISO you’re “burning” to it. On to the destructive part…
$ sudo dd if=~/Desktop/crunchbang-11-20130506-i486.iso of=/dev/rdisk3 bs=128k
6168+0 records in
6168+0 records out
808452096 bytes transferred in 186.954879 secs (4324317 bytes/sec)
I should note – you won’t see any activity (more on that in a second). You hit [Return] and the computer goes to work, not telling if it’s working or not. dd is one of those classic commands – it ain’t fancy, or pretty, or all high-falutin’. It does one thing, and it does exactly what you told it to do, or it errors. I should also note – if you screw up an point that to something important, like, in my disk list above, disk0? Well, you’ll have the joy of reinstalling the OS on your Mac, most likely.
sudo - most of you know what this is. I hope. It allows you to do things as the “superuser” on your Mac (i.e., superuser do).
dd - command to convert and copy a file (I don’t know why it’s named that).
if=<filename> - input file
of=<filename> - output file
bs=n - block size… You can use 1m, 1k, 128k – you get the idea. I like 128k, there’s not much speed gained by anything bigger.
Some of you are looking at that output file location and thinking “Where in the heck did he get rdisk3 from??” Well… It’s the same location as disk3, only it’s a “raw” device connection. We’re stepping outside the rules a little bit – taking a little known shortcut that doesn’t have any stoplights, if you will. Or speed limits. You’ll essentially move the same data in about 1/6th of the time if you /dev/rdisk[n]
The last thing that you should do is eject it – but how do you do that, since you can’t drag it to the trash? diskutil still has you covered.
$ diskutil eject disk3
Disk disk3 ejected
If you really need to “see” something, you’ll need to have (or install) Pipe Viewer. Unless you already have some system like MacPorts orHomeBrew, have it working, and know how to use it, just suck it up and deal with not seeing something. Really. I mean it. Anyhow, maybe you’re a dork like me, and you have Pipe Viewer. Instead of the dd command we used initially, we’re going to modify it.
$ pv -petr ~/Desktop/crunchbang-11-20130506-i486.iso | sudo dd of=/dev/rdisk3 bs=128k
0:00:33 [4.11MiB/s] [===>                          ] 17% ETA 0:02:40
There you go. A nice little visual guide for elapsed time, how fast, and an estimate for how long it’s going to take. If you want to know more about Pipe Viewer, there’s a great article on it here.


Ubuntu boots into initramfs

Don’t panic, your boot sector is still good an readable.  Type ‘exit’ and you’ll complete the boot process.  But why does this happen and how can we fix it?  From my reading this can be caused by faults on the disk or an improperly formatted grub configuration or hardware controllers that are too slow responding with the information needed by the grub to complete a clean boot.

If you have a bad sector or two you can address this with the commands below.  Or, you may need to boot into the live CD and fsck -y

sudo touch /forcefsck
sudo shutdown -r now

If the controller hardware takes too long to respond back with the correct devices the system will advance without properly identifying them.  In Ubuntu you can address this in the /etc/default/grub file by changing the GRUB_CMDLINE_LINUX line as follow:


Not sure the best way to go about this, but what I read was related to a mismatch in the selected boot partitions in /etc/fstab and those in the grub.  I have definately seen SuperMicro system where the drives flipped about on boot.  This is caused by a RAID configuration that works well with Windows installs but confounds Linux.  It’s controlled at BIOS/CMOS level and can be removed with dmraid.  Yeck!  Drop me a note if you need help with this.  I likely have the recipe for fixing it.

KERNEL PANIC – Missing Init

Init is process id #1, the #1 that all other processes are started from.  The first one run after boot and the one that cleans up when you are shutting down.  This isn’t a kernel panic at all, but a failure on the init process.  FSCK it.

Ubuntu Live CD, opened the terminal and typed:

sudo debugfs -w /dev/sda1
debugfs 1.41.11 (14-Mar-2010)

type in: clri <8>
and after hitting enter,
type this: quit
then reboot. It should force an fsck and come up happy.

Installing Oracle with an RPM

Recently I took on the task of finding a way to install oracle 11gR2 on CentOS x64. This process seems to not be talked about on the Internet, or maybe I just don’t know how to search.

So, what makes it so difficult? It’s larger than the maximum allowed RPM size of 2GB, but that shouldn’t stop you from breaking it up into two RPMS where the second one calls the installer in silent mode.

I have it working, but I just wondered why the Internet is so silent about this subject.


A couple of weeks later and it looks like a matter of too much oracle documentation.  Oracle owns the SEO on these terms and penetrating them isn’t going to a simple matter of setting up an teaser article with a few terms filled out.  I’m going to try a few keywords and see how that goes for me.

keywords: rpmbuild


Adding a Host to an HA VMWare Cluster

When adding a new piece of iron to a high-availability (HA) cluster your CPU compatibility matters.  HA means vMotion is involved and vMotion is able to bridge the various pieces of hardware using “Enhanced vMotion Compatibility” or EVC for short.  EVC is a mode you set that allows the servers to function at their highest common denominator, or rather, the greatest level of shared compatibility.  So, if you have a new system with all kinds of additional CPU capabilities but your old system is still L4 “Sandy Bridge” then your system must be setup to use L4.

  • L0 – Intel “Meron” Xeon Core 2
  • L1 – Intel “Penryn” Xeon 45nm Core 2
  • L2 – Intel “Nehalem” Xeon Core i7
  • L3 – Intel “Westmere” Xeon 32 nm Core i7
  • L4 – Intel “Sandy Bridge”
  • L5 – Intel “Ivy Bridge”

So… just use VMWare’s Compatibility Guide? No, you need to apply some common sense as well.  I just went shopping for an r720 to work with our ‘Sandy-Bridge” hexcore r710′s and found that the compatibility guides doesn’t really cover new systems very well.  Take a look at Wikipedia and look up your processor.  In my case, I have a choice of quite a few Xeon E5-26xx processors, but there is a note that the Xeon E5-2603 and Xeon E5-2609 do not have Hyper-threading capabilities.  Well, my other systems certainly do.  Also, these are quadcore rather than hexcore.  So, problem avoided.  I need to spend a couple hundred more on a proper processor so I don’t have to degrade my EVC Mode.


About Jay Farschman - Jay currently works as a Senior Systems Administrator for an asset management company in Colorado where he works with companies that produce hardware, telecommunications software and financial services.  Jay previously owned a consulting company and provided training and consulting services for three Fortune 500 companies and numerous small businesses where he leveraged Linux to provided exceptional value.