Asterisk can’t find MOH file

Home » Asterisk Users » Asterisk can’t find MOH file
Asterisk Users No Comments

On Thu, 2011-03-17 at 15:39 +0100, Gilles wrote:
> On Thu, 17 Mar 2011 09:23:35 -0500, “Danny Nicholas”
> wrote:
> >Moh should be in /var/lib/asterisk/moh not /var/lib/asterisk/sounds or in
> >this case /var/lib/asterisk/moh/custom.
>
> Thanks for the tip, but after moving the MOH files to the right
> location, and even restarting Asterisk, it still doesn’t find them,
> with the same error message:
>
MusicOnHold() doesn’t take a file name as a parameter, it takes a class
name or if left blank, plays from the default class
> =================
> # ll /var/lib/asterisk/moh/
> -rw-r–r– 1 root root 1954191 2009-12-26 15:57
> macroform-cold_day.ulaw
> -rw-r–r– 1 root root 1509854 2009-12-26 15:57
> macroform-robot_dity.ulaw
> -rw-r–r– 1 root root 2232088 2009-12-26 15:57
> macroform-the_simplicity.ulaw
> -rw-r–r– 1 root root 584771 2009-12-26 15:57
> manolo_camp-morning_coffee.ulaw
> -rw-r–r– 1 root root 2573886 2009-12-26 15:57
> reno_project-system.ulaw
> =================
>
> I tried using MusicOnHold() but it doesn’t take a parameter, and just
> plays some other tune:
> =================
> ;exten => 8888,n,Playback(manolo_camp-morning_coffee)
> exten => 8888,n,MusicOnHold(manolo_camp-morning_coffee)
> =================
>
> Actually, how can Asterisk know that a file is MOH and hence, should
> be found in /var/lib/asterisk/moh/, rather than a regular prompt/sound
> file located in /var/lib/asterisk/sounds?
>
> Thank you.