Loops…..

#!/bin/sh
#
# Convert Music On Hold to native codecs.
#
for y in ulaw alaw
do
    for x in /var/lib/asterisk/moh/*.gsm;
    do
        asterisk -rx "file convert $x /var/lib/asterisk/moh/`basename $x .gsm`.$y";
    done
done

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.