Monitor setup sample

The following only works with CVS head as of 2004-06-03. It allows a user to call out by dialing 8, then the number. Any calls dialed out using 8 are recorded. The "m" option on the 2nd set will mux the in and out files.

This script requires the soxmix application to be in your path. Soxmix is part of any newer release of sox.

[record-out]
exten => _8.,1,SetVar(CALLFILENAME=${EXTEN:1}-${TIMESTAMP})
exten => _8.,2,Monitor(wav,${CALLFILENAME},m)
exten => _8.,3,Dial(ZAP/g1/${EXTEN:1})
exten => _8.,4,Congestion
exten => _8.,104,Congestion

In this case, the other party doesn't know they're being recorded.

SetVar is no longer available - Use Set instead
${TIMESTAMP} is no longer available - Use ${STRFTIME(,,%H:%M)}

Get legal advice first.

Consult a lawyer before you start recording any calls. In some jurisdictions both parties must know about calls being recorded. The first thing you need to find out is which law will apply. Will it be the law applicable where your Asterisk server is located? Or will it be the law applicable where the call terminates or originates? Or both? This also applies to employee conversations.



Audio Quality


Wav49 is smaller than wav but the quality is a LOT worse. If you want good recordings pick a good format. Drive space is cheap these days.

MP3 encoding tip: Using lame 3.96.1 to encode to mp3, there were a lot of weird audio artifacts until I turned on the --noshort option. I got the best size for quality with the options lame -b16 --noshort.

Use latest sox/soxmix

Since Asterisk-1.2.0-beta2 it is necessary to have at least sox/soxmix version 12.17.7 (better yet 12.17.8) running, as with sox version 12.17.6 and Asterisk above 1.2.0-beta1 the mixing (m option) failed for some reason and there was no hearable sound on the mixed recorded files. Installing sox 12.17.7 fixed the problem for me. To check which version of sox you have installed type sox -help or soxmix -help

For Asterisk 1.2.0 Users

Consider using MixMonitor instead if you plan to use the "m" option, MixMonitor() mixes during the call already, and that will save CPU usage spikes caused by calling soxmix as an external process at the end of the call

References



Created by: JustRumours, Last modification: Wed 15 of Feb, 2012 (18:34 UTC) by admin


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+

Page Changes | Comments

 

Featured -

Search: