Automated IP Communicator Launch against Multiple Clusters

Reading Time: 3 minutes

If you manage multiple CUCM clusters you are likely to have Cisco’s IP Communicator installed on your computer. Cisco IP Communicator is a software based phone installed on your computer that connects up to CUCM and lets you utilize your PC as if it’s a Cisco desk phone. This is a pivotal tool to quickly move a phone between different call managers. I recently fell into this demographic while working on a migration/collapse of multiple CUCM clusters. A lot of time was spent in the GUI of IP Communicator changing TFTP Server address (let alone trying to remember them all). I took a couple of hours and figured out what would be needed to automate this task via a batch script with a simple menu based script. The details are found below.

To start, I found that the TFTP servers were stored in the registry. However, these TFTP servers were not in standard IP address form. They were actually stored in Hex, but the octets were rolled over while keeping the bits in the standard left to right order. The process to create the correct value’s for the registry is as follows.

Convert the IP address into it’s rolled octet form:

10.10.8.10 becomes 10.8.10.10

We now convert each octet into Hexadecimal. This now looks like the below example:

0a.08.0a.0a

We now remove the decimals in between each octet and place the new Hex value in standard Hex form:

0x0a080a0a

We need to do this for each TFTP server we will need access to for connecting to all of the CUCM clusters. Next we will create a shortcut within the installation folder of IP Communicator for the communicatork9.exe executable file. The reason for this is a caveat that I found where the batch file could only successfully launch the .exe file when referencing a .lnk file. Without this the Audio Tunning Wizard would crash causing the communicatork9.exe to hang.

Right click the communicatork9.exe file within the installation folder and create a shortcut within this same folder. Renaming this shortcut is not necessary.

All that is left to do now is create the batch script to delete the temporary files stored in your user profile, and modify the registry based on the cluster you select for the TFTP servers. I will spare you the step by step on this and just paste my script. Keep in mind to change the naming of the options and TFTP servers (in Hex) as necessary. Save the below file as a .bat batch file.


@echo off
set option=1
cd "C:\Program Files\Cisco Systems\Cisco IP Communicator"
cls
echo --------
echo 1 - Main Campus Cluster
echo 2 - Offsite Cluster
echo 3 - Hot Spare Cluster
echo 4 - Lab Cluster
set /p option="Select Call Manager Cluster: [1] "
echo --------------------------------
goto :option%option%
echo "%option%" is not a valid option. Please try again.
echo
goto start

:option1
rmdir %userprofile%\appdata\roaming\cisco\communicator /S /Q
REG ADD "HKCU\Software\Cisco Systems, Inc.\Communicator" /v TftpServer1 /t REG_DWORD /d 0x0dfe810a /f
REG ADD "HKCU\Software\Cisco Systems, Inc.\Communicator" /v TftpServer2 /t REG_DWORD /d 0x0bfe810a /f
REG ADD "HKLM\Software\Cisco Systems, Inc.\Communicator" /v TftpServer1 /t REG_DWORD /d 0x0dfe810a /f
REG ADD "HKLM\Software\Cisco Systems, Inc.\Communicator" /v TftpServer2 /t REG_DWORD /d 0x0bfe810a /f
start communicatork9 - Shortcut.lnk"
exit

:option2
rmdir %userprofile%\appdata\roaming\cisco\communicator /S /Q
REG ADD "HKCU\Software\Cisco Systems, Inc.\Communicator" /v TftpServer1 /t REG_DWORD /d 0x13ea0a0a /f
REG ADD "HKCU\Software\Cisco Systems, Inc.\Communicator" /v TftpServer2 /t REG_DWORD /d 0x0dea0a0a /f
REG ADD "HKLM\Software\Cisco Systems, Inc.\Communicator" /v TftpServer1 /t REG_DWORD /d 0x13ea0a0a /f
REG ADD "HKLM\Software\Cisco Systems, Inc.\Communicator" /v TftpServer2 /t REG_DWORD /d 0x0dea0a0a /f
start communicatork9 - Shortcut.lnk"
exit

:option3
rmdir %userprofile%\appdata\roaming\cisco\communicator /S /Q
REG ADD "HKCU\Software\Cisco Systems, Inc.\Communicator" /v TftpServer1 /t REG_DWORD /d 0x0b64a8c0 /f
REG ADD "HKCU\Software\Cisco Systems, Inc.\Communicator" /v TftpServer2 /t REG_DWORD /d 0x0a64a8c0 /f
REG ADD "HKLM\Software\Cisco Systems, Inc.\Communicator" /v TftpServer1 /t REG_DWORD /d 0x0b64a8c0 /f
REG ADD "HKLM\Software\Cisco Systems, Inc.\Communicator" /v TftpServer2 /t REG_DWORD /d 0x0a64a8c0 /f
start communicatork9 - Shortcut.lnk"
exit

:option4
rmdir %userprofile%\appdata\roaming\cisco\communicator /S /Q
REG ADD "HKCU\Software\Cisco Systems, Inc.\Communicator" /v TftpServer1 /t REG_DWORD /d 0x0b080a0a /f
REG ADD "HKCU\Software\Cisco Systems, Inc.\Communicator" /v TftpServer2 /t REG_DWORD /d 0x0a080a0a /f
REG ADD "HKLM\Software\Cisco Systems, Inc.\Communicator" /v TftpServer1 /t REG_DWORD /d 0x0b080a0a /f
REG ADD "HKLM\Software\Cisco Systems, Inc.\Communicator" /v TftpServer2 /t REG_DWORD /d 0x0a080a0a /f
start communicatork9 - Shortcut.lnk"
exit
:end
exit

Share this article:

Permanent link to this article: https://www.packetpilot.com/automated-ip-communicator-launch-against-multiple-clusters/

Leave a Reply

Your email address will not be published.