Wednesday, September 28, 2011

UCCX Demo License


Disclaimer: The following information is for research and experiment purpose only.  It's not the author's intention to circumvent Cisco's licensing.  Neither does the author encourage software piracy.  You cannot hold the author responsible for any disputes/lawsuits caused by this information.  If you disagree, please stop reading.

UCCX installation DVD comes with some demo licenses.  Unfortunately, unlike CUCM, UCCX demo license expires in 30 days.  And you'll get the warning every time you log into UCCX administration page.



If you look at the NodeConfig in CET Tool, you'll see the "Grace Period Starting Date" and "Demo License Flag".



To stop the demo license from expiring, three things need to be done:
1) "Demo License Flag" should be "false"
2) "Grace Period Staring Date" should be blank.
3) Most importantly, your license MAC has to match the MAC in license file (which is "FFFFFFFFFFFF" in this case).

For #1 and #2, you need to modify the XML file in directory /opt/cisco/uccx/ClusterData/default/com.cisco.crs.cluster.config.NodeConfig.  Change the last 16 characters in the block to 0 (zero).

First 8 characters (4 bytes) is the "Grace Period Starting Date" in epoch time format.  Second 8 characters (4 bytes) is the "Demo License Flag" (1 stands for "true" while 0 stands for "false").

Before:

After:

Then change the License MAC to "FFFFFFFFFFFF".

Before:

After:

Reboot the system to take effect.  You'll notice that you don't get the license expiring warning when you log into UCCX admin web page.

Restart CET just to verify the changes we made:

P.S.
1.  "/opt/cisco/uccx/ClusterData/default/com.cisco.crs.cluster.config.NodeConfig" is a directory.  The file names in this directory are randomly created.  You need to modify the one with .xml extension.

2. This method was last verified on UCCX 10.5.1.10000-24, though 8 additional octets were added to the end of the xml file.

XML file before:


XML file after:

Tuesday, September 27, 2011

CET Tool for UCCX

Back in the age of Windows-based CallManager (4.x and before), UCCX (a.k.a CRS) stores its configuration in CallManager DC Directory.

When CallManager moves to Linux based (CUCM 5.0 and above), it removes the concept of DC directory.  Thus UCCX has to store its configuration on UCCX server in XML files.

Cisco provides a tool called CET (Configuration Editing Tool?) to edit those configurations.  The tool is supposed to be used by Cisco TAC only.

For Windows-based UCCX (7.x and before), you may find the CET tool on UCCX server C:\program files\wfavvid\cet.bat.  Just the the cet.bat file.

For Linux-based UCCX (8.0 and above), you may find the CET installer on the UCCX installation DVD (\Installer\CetTool\CetTool.exe).  Or download from an already-installed UCCX server http://142.100.64.14/uccxinstalls/CetTool.exe (case-sensitive).  You'll have to install it on a Windows workstation.

You may use CET tool to modify the configuration of UCCX, such as removing license file or reset the system back to before-initialization state (for password recovery purpose).  Please note that on Linux-based UCCX, you'll need a root credential to use CET tool.  Either get it from Cisco TAC or follow instructions here.

You may also modify the configuration without CET tool.  But it requires some reserve engineering.

For example, you want to set the UCCX 8.5 back to FRESH INSTALL state.  You may edit the XML file in /opt/cisco/uccx/ClusterData/default/com.cisco.crs.cluster.config.AppAdminSetupConfig.  Look at the blobValue.  It's encoded in ASCII.


Translate that with the ASCII table:




You'll get:

46 = F
52 = R
45 = E
53 = S
48 = H
5F = _
49 = I
4E = N
53 = S
54 = T
41 = A
4C = L
4C = L

If you want to set the value to a specific string, you'll translate the string into ASCII code and put it in blobValue.

Sunday, September 25, 2011

Modify License MAC

Cisco used to bind license file to physical MAC address.  Now, it moves to "License MAC", which is a hash value of multiple system parameters such as NIC speed, NTP, DNS, hostname, etc.

To view the license MAC, you need to install the system first (CUCM, UCCX, CUPS, etc.).  Then use the "show status" command.


This is somehow inconvenient:

1) You cannot get the license file before finishing the installation.

I personally prefer to get everything ready before starting the installation, such as IP address, hostname, password, license file, installation media, etc.  You could run into lots of surprises when trying to get the license file.

2) When the system parameter was changed, the license file yield invalid.

For example, you add/change DNS server settings on the system, which is pretty common during system integration.

It would be better if you could dictate what license MAC the system use.  You may also use some schema like: AABBCCDDEEFF, where AA is the product code, BB is the site code, CC is the node number, DD is the version number, etc.


In the example above, the "License MAC" was changed to "abcdef123456".

Since you can use whatever License MAC you like, you may:
  • Get the license file before the system was installed
  • Keep using the same license file after system parameters was changed (such as DNS)
To specify the license MAC, you need to have root access to the system.  Then you'll modify the file /usr/local/bin/base_scripts/LicenseMac.sh.  To the bottom of the file, replace the line

FinalString=`expr substr "$SHA1sum" 1 12`

to

FinalString="abcdef123456"

In newer versions, you might have to change the /etc/selinux/config file so that selinux runs in permissive mode.
Reminder: Don't be evil.  ;)