I
I
Igor2019-05-06 10:52:24
Asterisk
Igor, 2019-05-06 10:52:24

Playing mp3 via CDR Report?

Hello . There is such a task that all the recordings of conversations were in mp3 format, the script converted the recordings of gsm and wav conversations (different servers) into mp3 format. If you download the recordings on a PC, then you can play them from any player, but you can’t listen through the CDR Report in FreePBX 13, it gives an error:
Exception

Unable to find an intermediary converter for /var/spool/asterisk/monitor/2019/04/17/out-номертелефона-1000-20190417-185204-155124.331.mp3
File:/var/www/html/admin/libraries/media/Media/Media.php:299
(screen attached)
can anyone come across such a situation or know how to solve I will be glad of any help, since I have been trying to set it up for 3 days but nothing happens.
P.S.
gsm and wav formats are reproduced in CDR Report without problems.
5ccfe78d3b38a449993942.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Makarov, 2019-05-06
@atsman

I struggled with this myself for a long time. the solution turned out to be simple - when converting a file to mp3, you just need to update the file name in the database.

S
Sergey Ryzhkin, 2019-05-06
@Franciz

Perhaps in the line "File:/var/www/html/admin/libraries/media/Media/Media.php:299" the number 299 means a line in the specified file.
Try to open this file on this line and see what command it is trying to execute there. maybe there will be some default converter that you don't have.
UPD:
Look at this entry, there is the 14th but I think the difference is not great: Clack-clack
If it doesn't help, google for the phrase: "FreePBX mp3"

I
Igor, 2019-05-09
@Igor2208

This is how I do it) for the sake of the test, I installed FreePBX (Sangoma) 14 from the iso image, everything works.
but at 13 he didn’t want to start from sources.
the script itself
#!/bin/bash
cdrdb=asteriskcdrdb
cdrtable=cdr
astdbuser=freepbxuser
astdbuserpass=Passwd123
for i in `find /var/spool/asterisk/monitor/ -type f -name "*.wav"`
do
if [ -e "$i" ]; then
file=`basename "$i" .wav`;
dir=`dirname "$i"`;
ffmpeg -i "$i" -acodec libmp3lame -y "$dir/$file.mp3";
rm -f "$dir/$file.wav";.
mysql --user="$astdbuser" --password="$astdbuserpass" --database="$cdrdb" --execute='UPDATE '
fi
done

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question