<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16481" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>A quem interessar...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Dae pessoal, seguinte, tive problemas em
gravar as ligações do asterisk durante o dia, pois estava
utilizando</FONT></DIV>
<DIV><FONT face=Arial size=2>toda cpu da maquina, entaum montei esse script
q roda de madrugada, lista tudo e transforma pra mp3.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>*Necessita ter o sox instalado na
maquina</FONT></DIV>
<DIV><FONT face=Arial size=2>*no exemplo ta coletando as gravacoes do diretorio
monitor</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>abraço</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>---------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2>extensions.conf</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>exten => _.,1,Answer<BR>exten =>
_.,2,Set(HORIGEM=${CALLERID})<BR>exten =>
_.,3,Set(CALLFILENAME=${DNID}/${TIMESTAMP}__.${HORIGEM}.__)<BR>exten =>
_.,4,Monitor(wav,/monitor/${CALLFILENAME},m)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2> -------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2>#!/usr/bin/perl<BR>@lista = `find *.wav
/monitor/*|grep in.wav`;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>foreach $linha_1(@lista){<BR>chomp
$linha_1;<BR>$linha_1 =~ s/ /\\ /g;<BR>$linha_1 =~ s/\"/\\"/g;<BR>$linha_1 =~
s/\</\\</g;<BR>$linha_1 =~ s/\>/\\>/g;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$linha_1_tmp = $linha_1;<BR>$linha_1_tmp =~
s/\.wav$/-tmp\.wav/;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$linha_2 = $linha_1;<BR>$linha_2 =~
s/in\.wav$/out\.wav/;<BR>$linha_2_tmp = $linha_2;<BR>$linha_2_tmp =~
s/\.wav$/-tmp\.wav/;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$linha_final = $linha_1;<BR>$linha_final =~
s/-in\.wav$/\.mp3/;<BR>`/usr/local/bin/sox $linha_1 -c 2 $linha_1_tmp pan
-1`;<BR>`/usr/local/bin/sox $linha_2 -c 2 $linha_2_tmp pan 1`;<BR>`soxmix
$linha_1_tmp $linha_2_tmp $linha_final`;<BR>`rm -f $linha_1_tmp`;<BR>`rm -f
$linha_1`;<BR>`rm -f $linha_2_tmp`;<BR>`rm -f
$linha_2`;<BR>
}<BR>--------------------------------------------------------------------------------------------------</FONT></DIV></BODY></HTML>