Friday, September 07, 2012

CUCM download MoH file from server in production

While migrating a CUCM from a 7.1.3 on MCS to 8.6.2 on UCS, I found the original custom music on hold audio files could not be found by the customer.  How to get the MoH files from the old server to the new was the challenge.

The method to download MoH files from CUCM is well documented on various blogs, one example (and one of my favorites) being here:   (edit 8/1/2016: previous link is now dead)

Given I had OpenSSH from  installed on my Windows XP laptop and have had success using it in uploads for ages, I thought this would be a no brainer.  What I ran into was that after SSHing to the server and attempting to get the file(s) to my laptop, the CUCM MoH folder structure was created on my laptop, but the files themselves weren't transferred.  It seems from similar Googling that this is a fairly common issue.

What seems to have been the issue in my case was the fact that I was attempting to write to the root directory of my SFTP server in a Windows environment. When CUCM asks for the SFTP directory, people have various suggestions about using / or \ or . or ./ or \., etc., indicating the root SFTP directory.  Given my laptop still runs Windows XP, by creating a folder (in my case, called MOH) in the SFTP root folder, and then using MOH/ as the download directory, the CUCM folders were still created but the files were transferred as well.

Here's the log of the successful transfer, where the MoH file names began with the word Combined.


admin:file get activelog mohprep/Combined*
Please wait while the system is gathering files info ...done.
Sub-directories were not traversed.
Number of files affected: 5
Total size in Bytes: 6030843
Total size in Kbytes: 5889.495
Would you like to proceed [y/n]? y
SFTP server IP:
SFTP server port [22]:
User ID: sftp
Password: ********
Download directory: MOH/

Transfer completed.