Converting Sound Files With Asterisk

From Integrics Wiki
Revision as of 00:03, 25 February 2015 by Dcunningham (talk | contribs) (Created page with "This shell script will convert file formats using Asterisk. As an example, it converts the Enswitch sound files from g722 to gsm: <code>cd /opt/enswitch/current/sounds/en/<br...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, 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