Cisco Collaboration 101-3: download MoH file from CUCM TFTP server

When you administrate Cisco CUCM, often there is a situation where you have to locate a file and download the file from CUCM server, particularly from the CUCM TFTP and MOH servers.

OK, first, here is an example of ‘file get’ command to download an xml file from a CUCM TFTP server.

admin:file get tftp /WLANDefault.xml
Please wait while the system is gathering files info …done.
Sub-directories were not t*raversed.
Number of files affected: 1
Total size in Bytes: 21768
Total size in Kbytes: 21.257812
Would you like to proceed [y/n]? y
SFTP server IP: 10.168.46.2
SFTP server port [22]:
User ID: administrator
Password: ********

Download directory: /

The authenticity of host ‘192168.46.2 (192168.46.2 )’ can’t be established.
RSA key fingerprint is 08:39:1b:80:c5:e4:c1:60:de:5c:5b:3a:7d:be:8a:ae.
Are you sure you want to continue connecting (yes/no)? yes
.
Transfer completed.
admin:

=====================================================================

Now here is a list of ‘file list’ command sets.

admin:file list
file list activelog
file list inactivelog
file list install
file list license
file list partBsalog
file list salog
file list tftp

We have to snoop around to locate where our hidden MoH files are and it is under “activelog /mohprep” folder:

admin:file list activelog /*
<dir> audit
<dir> car_db
<dir> ccm_db
<dir> cm
<dir> core
<dir> dp_db
<dir> installed_options
<dir> mgetty
<dir> mohprep
<dir> patches
<dir> platform
<dir> sa
<dir> syslog
<dir> tomcat
dir count = 14, file count = 0
admin:file list activelog mohprep /*
CiscoMOHSourceReport.xml SampleAudioSource.alaw.wav
SampleAudioSource.g729.wav SampleAudioSource.ulaw.wav
SampleAudioSource.wb.wav SampleAudioSource.xml
SilenceAudioSource.alaw.wav SilenceAudioSource.g729.wav
SilenceAudioSource.ulaw.wav SilenceAudioSource.wb.wav
SilenceAudioSource.xml
dir count = 0, file count = 11
admin:file list activelog syslog ?
Syntax:
file list activelog file-spec [options]
file-spec mandatory file to view
options optional page|detail|reverse|[date|size]

Let’s also look at what is under active syslog folder:

admin:file list activelog syslog /*
AlternateSyslog CiscoSyslog
CiscoSyslog.1 CiscoSyslog.2
CiscoSyslog.3 CiscoSyslog.4
boot.log boot.log.ori
cron cron.1
cron.2 maillog
messages messages.1
messages.2 messages.3
messages.4 messages.ori
notify.sh.log ntp_start.sh.log
ntp_validate_servers.sh.log ntpd.log
sd_ntp.log secure
secure.1 secure.2
secure.3 secure.4
secure.ori setkeysdetails.sh.log
spooler
dir count = 0, file count = 3

======================================================================

Now if you found what you are looking for in an active MoH folder, go ahead and run “file get activelog /mohprep/[name of your MoH file]”:

admin:file get activelog /mohprep/ECM-MOH-Bunnings-Aug-2015.ulaw.wav
Please wait while the system is gathering files info …done.
Sub-directories were not traversed.
Number of files affected: 1
Total size in Bytes: 1728822
Total size in Kbytes: 1688.3027
Would you like to proceed [y/n]? y
SFTP server IP: 10.171.217.110
SFTP server port [22]:
User ID: cisco
Password: *********

Download directory: /

.
Transfer completed.

======================================================================
admin:file list activelog /mohprep/SampleAudioSource-test.ulaw.wav
SampleAudioSource-test.ulaw.wav
dir count = 0, file count = 1
admin:file get activelog /mohprep/SampleAudioSource-test.ulaw.wav
Please wait while the system is gathering files info …done.
Sub-directories were not traversed.
Number of files affected: 1
Total size in Bytes: 2702728
Total size in Kbytes: 2639.3828
Would you like to proceed [y/n]? n
Files transfer cancelled.
admin:file get activelog /mohprep/SampleAudioSource -test.ulaw.wav
Invalid command, a dash character must be preceded by an alphanumeric character

admin:file get activelog /mohprep/SampleAudioSource test.ulaw.wav
Missing file-spec or invalid command option specified.
Valid options: [reltime|abstime][match][compress]
admin:

The issue with the space seems to match defect CSCsr43052: http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCsr43052

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s