A little background.
This is a new install on Ubuntu 10.04 Server.
Asterisk Version: 1.6.2
FreePBX Version: 2.8.0
Music on Hold just flat out wasn’t working. I was seeing these entries in /var/log/asterisk/full
The problem looks pretty obvious… there really is no such path as /var/lib/asterisk//mohmp3/don//orig_11 Liver Splash. Instead, it should be “/var/lib/asterisk/mohmp3/don/orig_11 Liver Splash”
The contexts in musiconhold_additional.conf were being written like so
[default]
mode=files
directory=/var/lib/asterisk//mohmp3/
[don]
mode=files
directory=/var/lib/asterisk//mohmp3/don/
[none]
mode=files
directory=/var/lib/asterisk//mohmp3/.nomusic_reserved
Notice the “//” in the directory?
I edited the following 2 lines in /var/www/html/admin/modules/music/page.music.php
to
and in this section
touch($dir."/silence.wav");
} elseif ($tresult != "default" ) {
$dir = $path_to_moh_dir."/{$tresult}/";
} else {
$dir = $path_to_moh_dir.'/';
}
if (file_exists("{$dir}.custom")) {
$application = file_get_contents("{$dir}.custom");
$File_Write.="[{$tresult}]\nmode=custom\napplication=$application\n";
} else if (file_exists("{$dir}.random")) {
$File_Write.="[{$tresult}]\nmode=files\ndirectory={$dir}\nrandom=yes\n";
} else {
$File_Write.="[{$tresult}]\nmode=files\ndirectory={$dir}\n";
}
}
}
I changed
to
The directory path is now being written as it should in musiconhold_additional.conf and my music on hold is now working. I’m not sure if that is the best way to handle that or not, but it works. Maybe someone can post a better solution?
Another issue I’m having is with the recordings for my IVR. The recording just doesn’t play. In extensions_additional.conf, the announcements are entered as
If I manually define the full path to the recording, then it works.
Have yet to find where freepbx is writing that path to extensions_additional.conf. If anyone could point me in the right direction there, then I would appreciate it.