-
Notifications
You must be signed in to change notification settings - Fork 2
Description
FreePBX Version
FreePBX 17
Issue Description
Environment:
Description: Uploading audio files via the System Recordings web interface fails with error "Failed to convert" in the browser console. The error occurs during the Media conversion process after the file is successfully uploaded to tmp.
Steps to Reproduce:
Navigate to Admin → System Recordings
Click "Add Recording"
Fill in Name and Description
Upload a WAV file (tested with 16-bit, 8kHz mono WAV)
Click Submit
Observe error: "There was an error, See the console for more details"
Browser console shows: "Failed to convert /var/spool/asterisk/tmp/[file] to /var/lib/asterisk/sounds/[destination]"
Expected Behavior: File should be converted and saved to custom and registered in the database.
Actual Behavior:
File uploads successfully to tmp
Intermediary WAV and SLN48 files are created
Final conversion step fails
Console error: Command 'file convert /var/spool/asterisk/tmp/[file].sln48 to /var/spool/asterisk/tmp/[file].ulaw' failed
Workaround: Manual conversion using sox works:
sudo -u www-data /usr/bin/sox /var/spool/asterisk/tmp/[file].wav -r 8000 -c 1 /var/lib/asterisk/sounds/en/custom/[name].wav sudo mysql -e "USE asterisk; INSERT INTO recordings (displayname, filename, description) VALUES ('[name]', 'en/custom/[name]', '[description]');" sudo /usr/sbin/fwconsole reload
Additional Context:
All permissions have been verified with fwconsole chown
Sox, ImageMagick, and all audio conversion tools are installed and accessible
The Media conversion drivers (SoxShell, AsteriskShell) appear to be failing during the conversion process
The issue appears to be in Media.php convert() method
Operating Environment
FreePBX Version: 17.0.25
Recordings Module Version: 17.0.2.19
OS: Debian 12 (Bookworm)
Asterisk Version: 18.9.15
Relevant log output
Logs: No errors in /var/log/apache2/error.log or Asterisk logs. The failure is silent except for the browser console error.