In FreePBX webgui you can upload a sound file for moh. It ask for a wav or an mp3, but apparently mp3s don't work out of the box on Trixbox. There is some kind of converter that is not installed by default, and so it doesn't work. We may update that some day, but for a quick solution, we'll use a wav file with the same properties as the IVR (8bit mono etc).
So, going through the webgui, I tried to upload the wav, and go the following error(s):
1. Orgingally it said that the upload limit size was 2M. So, I edited /etc/php.ini so that
max_upload_size = 10M instead of 2M.
2.
Error Processing: "sox: Can't open input file '/var/lib/asterisk/mohmp3/orig_studyno3.wav': No such file or directory" for studyno3.wav!
This is not a fatal error, your Music on Hold may still work.
...but probably not. For one thing the directory /var/lib/asterisk/mohmp3 didn't even exist, so I did:mkdir /var/lib/asterisk/mohmp3
Then set the permission as before chown -R asterisk:asterisk /var/lib/asterisk/mohmp3
Then, we need to change the permissions on the folder so that the user:group (ie asterisk:asterisk) can read, write, and execute files (7) in mohmp3, and others can read and extecute (5):
chmod 775 /var/lib/asterisk/mohmp3
I uploaded the file again... success! Sort of:
Error Processing: "sox: Input and Output rates must be different to use resample effect" for studyno3.wav!
This is not a fatal error, your Music on Hold may still work.
Yes, it may, and probably does still work. That error can be more or less ignored. I think it basically is saying that my file was already in the same format to which it would have been converted... had the converter been installed.Moh for your money.
DJ@Paris
EDIT:
As per MT's comment, the moh still didn't work. That is because all of the uploaded files seem to still have the apache:apache ownership. We must be uploading them incorrectly. I chown-ed them to asterisk:asterisk, so they should work now. I guess the IVR might need re-chown-ing everytime we upload as well.
DJ@Paris