Convert recordings to MP3


I am currently recording all incoming and outgoing calls to my asterisk server. It is legal in Canada.

I would like to convert the recordings to mp3 and email them, trouble is I tried using toolame and it was garbled and sux doesn’t work because I have debian and debian doesn’t seem to like mp3s for some reason…

Any ideas on how I might get my files converted?


cron + lame + mlame batch script = recorded call goodness.

  1. download and compile lame:
  2. copy mlame script from the misc directory to wherever you want (i use /usr/local)
  3. run following job whenever you want (we run after hours and then copy files to storage server, works great).

/usr/local/mlame -r -f -o "-b 16 -m m -q 9 --resample 8 --quiet" /var/spool/asterisk/monitor/*.wav

my setup is a bit more complex, since we record around 10,000 calls per day across 7 servers, so i have the encode process scripted, but the general idea is the same.


We require the recordings of meetme conferences to be in mp3 format, and we need it immediatly after the conference.

Due the nature of our problem using a cron lame script is not going to work for us. How can I excute my script when the meetme application exits, that is when the recording stops, in order to the conversion on the spot.

The Monitor application has a variable name called MONITOR_EXEC to specify a script file to be executed when the Monitor application exits. Howcome there isn’t a MEETME_EXEC?



‘r’ – Record conference (records as ${MEETME_RECORDINGFILE}
using format ${MEETME_RECORDINGFORMAT}). Default filename is
meetme-conf-rec-${CONFNO}-${UNIQUEID} and the default format is wav

theoretically if asterisk can encode straight to mp3 (i remember hearing something about a format_mp3 a while ago) couldn’t this do it on the fly? Only downside is this would constantly mp3 encode while the conference is going, which will eat some CPU…

nope, mp3 support in asterisk is limited to playback only - it cannot record in MP3 format - yet. i believe that is being looked at for 1.4 or 1.6.

however, if you can use GSM, it’s almost as small and the quality is just as good, if that would be an alternative…

as for getting the file encoded immediately after the conference, you might be able to use the ‘h’ extension to initiate the recording immediately after the conference ends, OR you could have a cron job that runs every minute to check for files to encode. either way should work just fine, i would think.