Sound Recording (runtime exception)

FreePBX 13.0.190.7

When creating a sound recording i get the following error when clicking the recording in ‘file list for english’

RuntimeException
Failed to convert /var/spool/asterisk/tmp/temp.1488560456428.sln48 to /var/spool/asterisk/tmp/temp.1488560456428.ulaw! Command ‘file convert /var/spool/asterisk/tmp/temp.1488560456428.sln48 /var/spool/asterisk/tmp/temp.1488560456428.ulaw’ failed.
File:/var/www/html/admin/libraries/media/Media/Driver/Drivers/AsteriskShell.php:157
RuntimeException

Troubleshooting this starts with running the command ‘file convert /var/spool/asterisk/tmp/temp.1488560456428.sln48 /var/spool/asterisk/tmp/temp.1488560456428.ulaw’ and see what happens. I’m going to guess that there’s a problem with the “file convert” process. Check your directory permissions as well; you might have a directory in that directory group /var/spool/asterisk/tmp/ to make sure that Asterisk and the Web Server can both write to it.

RuntimeException
Failed to convert /var/spool/asterisk/tmp/temp.1490714578802.sln48 to /var/spool/asterisk/tmp/temp.1490714578802.ulaw! Command ‘file convert /var/spool/asterisk/tmp/temp.1490714578802.sln48 /var/spool/asterisk/tmp/temp.1490714578802.ulaw’ failed.
File:/var/www/html/admin/libraries/media/Media/Driver/Drivers/AsteriskShell.php:157

here is what I get when I run the command ->

[[email protected] tmp]# file convert /var/spool/asterisk/tmp/temp.1490714578802.sln48 /var/spool/asterisk/tmp/temp.1490714578802.ulaw
convert: cannot open convert' (No such file or directory) /var/spool/asterisk/tmp/temp.1490714578802.sln48: data /var/spool/asterisk/tmp/temp.1490714578802.ulaw: cannot open/var/spool/asterisk/tmp/temp.1490714578802.ulaw’ (No such file or directory)

‘file convert’ is an asterisk cli construct
from bash ‘file’ will show what it knows in this case only the ‘.sln48’ file existed, you might want to see more with ‘soxi’ on the ‘.sln48’ file

Perhaps if you gave the logs just before that error, we would understand better what you are trying to do

asterisk -rx file convert /var/spool/asterisk/tmp/temp.1490714578802.sln48 /var/spool/asterisk/tmp/temp.1490714578802.ulaw
No such command ‘convert:’ (type ‘core show help convert:’ for other possible commands)

uyou need to quote the query:L-

asterisk -rx 'file convert /var/spool/asterisk/tmp/temp.1490714578802.sln48 /var/spool/asterisk/tmp/temp.1490714578802.ulaw'

[[email protected] tmp]# asterisk -rx 'file convert /var/spool/asterisk/tmp/temp.1490714578802.sln48 /var/spool/asterisk/tmp/temp.1490714578802.ulaw’
Failed to convert /var/spool/asterisk/tmp/temp.1490714578802.sln48 to /var/spool/asterisk/tmp/temp.1490714578802.ulaw!
Command ‘file convert /var/spool/asterisk/tmp/temp.1490714578802.sln48 /var/spool/asterisk/tmp/temp.1490714578802.ulaw’ failed.
[[email protected] tmp]#

Previously I wrote

what does

sox -i  /var/spool/asterisk/tmp/temp.1490714578802.sln48

return?

Failed: Not enough input filenames specified

A typo it should be – not -

sox --i  /var/spool/asterisk/tmp/temp.1490714578802.sln48

[[email protected] tmp]# sox --i /var/spool/asterisk/tmp/temp.1490714578802.sln48
sox: option `–i’ is ambiguous
sox: SoX v14.2.0

A couple of things to note ->
the exception only happens if i try to play the file in the 'add new sound recording dialog’
I can see the converted files in the /var/spool/asterisk/tmp directory
If I just upload the wav file and try to submit, it does not do anything?

Sorry that is a very old version of sox (november 2009)

Do you mean the page that says

Alternatively, upload a recording in any supported asterisk format. Note
that if you’re using .wav, (eg, recorded with Microsoft Recorder) the
file must be PCM Encoded, 16 Bits, at 8000Hz:

?

if I just try to create a sound recording using an extension to record the message , then press submit it does not save?

If you did the whole *77 *99 to confirm and use a valid name for it, then sorry, I’m out of ideas.

I recorded a new message as you suggested in the correct format and was able to save. but when message was played in a IVR there was no sound?

Sorry , still no idea.

understanding what happens behind the scenes when creating a system recording, I might be able to troubleshoot it?

I will work if I use the feature code for the sound recording and do it from the phone?

yum install asterisk13-resample