Just a little script to help cleanup those *-in.wav and *-out.wav files:
#!/usr/bin/perl
@lines=`ls -1 /var/spool/asterisk/monitor/*in.wav`;
foreach $line (@lines){
(@splits)=split("in.wav",$line);
chop(@splits[0]);
$base=@splits[0];
$base=~ s/(")/\\\"/g;
$base=~ s/( )/\\\ /g;
$base=~ s/(>)/\\\>/g;
$base=~ s/(<)/\\\</g;
print `soxmix $base-in.wav $base-out.wav $base.wav`;
`rm -f $base-*`;
}
This will look for all “in” files and try to combine them with out files. I run this nightly with crontab.
tim (somewhere near) tims net (dot) com
See also