login | register
Sat 30 of Aug, 2008 [01:42 UTC]

voip-info.org

Discuss [1] History

Asterisk cmd Monitor Cleanup

Created by: tc0nn,Last modification on Tue 24 of May, 2005 [20:04 UTC] by jht2
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



Comments

Comments Filter
222

333script suffers from control-characters

by dzlabing, Tuesday 24 of May, 2005 [08:23:24 UTC]
it seems that du to the wiki-system the script has been ruined by control-characters inserted.