Converting Sound Files With Asterisk

From Integrics Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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