asterisk
configurationserverasterisk

This command converts all files from a folder into an asterisk compatible format

# either with sox
find -name '*.wav' -exec basename "{}" .wav ; |\
         xargs -iQ sox "Q".wav -t raw -b 16 -r 32000 "Q".sln32

# or with ffmpeg
find -name '*.wav' -exec bash -c 'FILE="{}" &&\
         echo $FILE "=>" ${FILE/wav/alaw}   &&\
         ffmpeg -i "$FILE" -ar 8000 -ac 1 -ab 64k -f alaw ${FILE/wav/alaw} ' \;

Folders #

folder description
/var/spool/asterisk/voicemail/default where voicemail stores files
/usr/local/etc/asterisk/ main configuration files
top