Converting Sound Files With Asterisk

From Integrics Wiki
Jump to navigation Jump to search

This shell script will convert file formats using Asterisk. As an example, it converts the Enswitch sound files from g722 to gsm:

cd /opt/enswitch/current/sounds/en/
for oldfile in `find . -name "*.g722"` do

newfile=`echo $oldfile | sed 's/g722/gsm/'`
asterisk -rx "file convert $oldfile $newfile"

done