#!/bin/bash ### USE THIS SECTION FOR THE PREFERRED METHOD WITH ICECAST/ICES ### PIPE="/tmp/asterisk-pipe.$$" mknod $PIPE p mplayer -playlist http://host:port/mount.ogg.m3u -really-quiet -quiet -ao pcm:file=$PIPE -af resample=8000,pan=1:0.5:0.5,channels=1,format=mulaw 2>/dev/null | cat $PIPE 2>/dev/null rm $PIPE ### THIS IS THE MORE INTENSIVE OGG123/SOX VERSION ### #ogg123 -qZ -d pulse -o sink:moh1 -d au -f - -@ /etc/asterisk/list.m3u 2>/dev/null | sox -r 16000 -t au - -r 8000 -c 1 -t raw - 2>/dev/null # I really can't stress how much this version isn't that great. It's CPU intensive and requires pulseaudio and a bunch of other junk. # Seriously; this uses a stupid amount of processor to get the job done.