You might take a few ideas from this combine.sh script which works for
me. It uses the combine_wave program from
http://panteltje.com/panteltje/dvd/combine_wave-0.3.tgz and the lame
program to convert to mp3.
It converts the entire directory /var/spool/asterisk/monitor/*-in.wav
files to mp3 where the mp3 file doesn't already exist.
S.
File: combine.sh
---------------------------
#!/bin/sh
cd /var/spool/asterisk/monitor
for f in *-in.wav
do
in=$f
out=`echo $f | sed -e 's/-in.wav/-out.wav/'`
tmpwav=`echo $f | sed -e 's/-in.wav/-both.wav/'`
mp3=`echo $f | sed -e 's/-in.wav/.mp3/'`
if [ -e "$mp3" ]
then
continue
fi
# combine the two tracks into one stereo file
/usr/local/bin/combine_wave -l $in -r $out -o $tmpwav 2>/dev/null
/usr/bin/lame --silent -h -b 96 $tmpwav $mp3
# Remove temporary .wav files
test -w $tmpwav && rm $tmpwav
# Remove input files if successful
test -s $mp3 && rm $in $out
done
exit 0
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users