Asterisk cmd Monitor Cleanup

Monitor Cleanup
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


Monitor Cleanup
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


Created by: tc0nn, Last modification: Tue 24 of May, 2005 (20:04 UTC) by jht2
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+