Update MOH on multiple routers

Unanswered Question
Mar 30th, 2009

I have several remtoe locations using the integrated services routers, I am currently opening each location monthy to update to this months MOH file. Is there a way to update all of them at the same time, or have the routers look for an updated version of the file from a server?

Thanks for any help,


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (4 ratings)
redesfusionet Mon, 03/30/2009 - 19:50

If you are running MOH from flash, unless you have the file loaded into the flash, is not going to work. MOH reads its file only from what it haves there.

Perhaps, you could configure a fixed MOH audio source, and somehow stream the MOH to a device that will input the music back to the router.

This sounds like a lot of thinking but if this is something you will have for many years, it might be worthy finding a streaming device.



ubuntu_guy Thu, 12/29/2011 - 09:10

it's been a while since I visited this project but it's back on the table; here's where we are.

Using kron wont work by itself because it will only perform exec level commands that require no user interaction/confirmation. Copying files to the router is done via tftp from global not from exec so right off the bat I have the first problem. Once I get the file on the router I can use kron to make the config changes to use the new file but I first have to overcome how to get the file to the routers flash.

Exapmle: Kron cant do this;

Router#copy tftp:// flash:

anyone have a workaround?

ubuntu_guy Thu, 12/29/2011 - 13:36

Ok so I think I can accomplish this with tcl and here's what I've got so far. Keep in mind that I need to copy a file to the router via tftp then change the config to reflect the new file.

typehead "y"  #this should answer yes to the confirmation of all below statements

typehead "copy tftp://x.x.x.x/Moh.au flash:" #copy the file to the router and the name confirms via first statement

ios_config "config terminal" "telephony-service" "no moh" "moh Moh.au" "end" #make config changes and save

The current naming convention for the moh files is Dec2011.au since we update them monthy, by changing the name to Moh.au I think I'll be able to skip a step in deleting the previous months moh file. From what I've read I should be using "typehead" to issue commands to enter commands in the priv exec mode and "ios_config" to enter commands for global config. when I run the above tcl commands from the routers flash I get an error saying that "typehead" is an unknown command.


I am having some measure of success with the following;

ios_config "do copy tftp://x.x.x.x/Moh.au flash:"

ios_config "config terminal" "telephony-service" "no moh" "moh Moh.au" "end"

ios_config "do write"

ios_config "end" ios_config "do copy tftp://x.x.x.x/Moh.au flash:"
ios_config "config terminal" "telephony-service" "no moh" "moh Moh.au" "end"
ios_config "do write"
ios_config "do end"

This leaves the router at the Router(tcl)# prompt but it is at least copying the file and making the config changes. I'm not sure what problems I'd face with leaving the router at that prompt or if it'll timeout based on my vty timeout settings.

Hi Richard

Have you tried "file prompt quiet" in your IOS config. This allows Kron to be able to do a fair amount of file manipluation without the prompting issues.

For example, this works, which is similar to what you are trying to do in reverse.

kron occurrence daily_backup at 22:20 recurring

policy-list backup


kron policy-list backup

cli copy running tftp://


Chris Deren Fri, 12/30/2011 - 12:58

Check out kiwi tools enterprise product, I have a customer with hundreds of remote GWs using it for updating moh and similar tasks.

Sent from Cisco Technical Support iPhone App

ubuntu_guy Mon, 01/09/2012 - 09:34

Kiwi Cat free edition does exactly what I need thanks for that tip!


This Discussion