record agents

jayrod422
Joined: Thu 12 of Oct, 2006

Re: record agents

Posted:Tue 17 of Feb, 2009 (20:31 UTC)
Set the file name in the dial plan and use sox to change the audio file type

here is how i setup monitor to record calls and then use sox/lame to make a mp3

exten => _1NXXNXXXXXX,n,Set(CALLFILENAME=${EXTEN}_${STRFTIME(,,%C%y%m%d)}_${STRFTIME(,,%H%M%S)}_${CALLERID(num)})
exten => _1NXXNXXXXXX,n,Set(CALLFILEDIR=/tmp/space/)
exten => _1NXXNXXXXXX,n,Monitor(wav,${CALLFILEDIR}${CALLFILENAME})
exten => _1NXXNXXXXXX,n,Dial(SIP/${EXTEN}@fedcom)

exten => h,1,system(sox -m ${CALLFILEDIR}${CALLFILENAME}-in.wav ${CALLFILEDIR}${CALLFILENAME}-out.wav ${CALLFILEDIR}${CALLFILENAME}.wav)
exten => h,n,system(lame --preset voice -v -B 64 -a ${CALLFILEDIR}${CALLFILENAME}.wav /recordings/${CALLFILENAME}.mp3)
exten => h,n,system(rm ${CALLFILEDIR}${CALLFILENAME}.wav)
exten => h,n,system(rm ${CALLFILEDIR}${CALLFILENAME}-in.wav)
exten => h,n,system(rm ${CALLFILEDIR}${CALLFILENAME}-out.wav)

enjoy

contact me off list if you want jayrod422 at fed-com.com
jmcf
Joined: Wed 07 of Jan, 2009

record agents

Posted:Wed 21 of Jan, 2009 (17:45 UTC)
hello,
how can I change the filename format for agents's calls recorded ?

I know I can change the directory where asterisk puts the files, but can I change the filename format ?

thx
jmcf