Error uploading MP3 file to MOH

When attempting to upload a MP3 or Wav file via the Music on Hold module we are receiving an error.

Failed to convert /var/spool/asterisk/tmp/temp.1470850251933.sln48 to /var/lib/asterisk/moh/mr_ups_60.wav! Command ‘file convert /var/spool/asterisk/tmp/temp.1470850251933.sln48 /var/lib/asterisk/moh/mr_ups_60.wav’ failed.

I can manually place the file in the /var/lib/asterisk/moh directory and run “/usr/bin/sox File.wav -r 8000 -c 1 -s File1.wav -q” and the file works without issue. I am curious if there is some reason, that I am missing, why the upload process isn’t working as it is intended.

We convert files through Asterisk NOT sox for maximum compatibility. Your asterisk version is reporting it supports sln48 when really it doesnt. Best advice is to reinstall asterisk

The command Asterisk is being told to run is:

asterisk -rx 'file convert /var/spool/asterisk/tmp/temp.1470850251933.sln48 /var/lib/asterisk/moh/mr_ups_60.wav'

This is a fairly new install of FreePBX 10.13.66-5 running Asterisk 13.9.1 with all modules up to date. This module has not been used since the install but the system recording work without issue. I only used sox to fix the fact that someone deleted all MOH prior to uploading and noticing the error.

I understand that. Just telling you the problem and the solution.

I concede to your understand of the problem but do not believe the only/best solution is to re-install asterisk to a system that is essentially a clean install from a FreePBX distro. Hopefully someone else in the community will have a solution that is a bit more acceptable other than “start over”. Thank you for your assistance tm1000.

You do not have to start over. Reinstalling asterisk in the distro is less than a five minute operation it does not require reinstalling everything.

Simply run asterisk-version-switch and select then same version you are on. If that doesn’t work select 11 then run again and select 13

The Asterisk-version-switch did not change the error message that we’re receiving. Is there anything else we should attempt to resolve this issue?

Run the command manually and see what asterisk is saying.