Automated Converting Voicemail

I am wondering if anyone knows of a method that would automate a conversion of VM and Conference recordings from a .WAV to something smaller, like a .FLAC file.

For voicemail you should read

http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/Voicemail_id263499.html

in your voicemail.conf file add/edit

format=wav49

and only a *.WAV file would be created (about a 90% saving in disk usage)

For monitored/conference calls then use sox in your “post call recording script” something like

sox inputfile.wav outputfile.ogg

or

sox inputfile.wav -g -t wav test_outputfiles.WAV

if you have the sox “extra formats” then for ease of use acosss Operating systems

sox inputfile.wav outputfile.mp3