[asterisk-users] can anyone tell me how to set asterisk to record all phonecall

John Wu jwjohn0 at gmail.com
Sun Mar 6 20:08:46 CST 2011


Hi Jeremy
Thanks for your reply, I did what u said, but still can not work. the
/var/spool/asterisk/monitor
do not have any file. Attachment is my extensions.conf


On Sat, Mar 5, 2011 at 12:37 PM, Jeremy Kister <asterisk-01 at jeremykister.com
> wrote:

> On 3/4/2011 9:49 PM, John Wu wrote:
>
>> I need to use asterisk to record all phonecall I have test using
>> mixmonitor to record a call.
>>
>
> this is one way it can be done
>
> make sure you have 'lame' installed.
>
> - in your extensions.conf:
>
> [global]
> VSA=/var/spool/asterisk
>
> [outbound-or-wherever-you-dial]
> exten => _XXX,1,Macro(Snoop,${EXTEN})
> exten => _XXX,n,Dial(SIP/${EXTEN},${TIMEOUT})
> exten => _XXX,n,StopMixMonitor
> ; above in case you're in some loop & Dial fails,
> ; e.g., swift+monitor crash asterisk
>
>
> [macro-Snoop]
> ; ${ARG1} channel
> exten => s,1,GotoIf($["${SNOOPING}" = "1"]?snooping)
> exten => s,n,Set(SNOOPING=1)
> exten => s,n,Set(YYYY=${STRFTIME(${EPOCH},,%Y)})
> exten => s,n,Set(MM=${STRFTIME(${EPOCH},,%m)})
> exten => s,n,Set(DD=${STRFTIME(${EPOCH},,%d)})
> exten => s,n,Set(HMS=${STRFTIME(${EPOCH},,%H%M%S)})
> exten => s,n,Set(FILENAME=${HMS}-${CALLERID(num)}-${ARG1}-${UNIQUEID})
> exten => s,n,Set(MIXMON_ARGS=mkdir -p ${VSA}/monitor/${YYYY}/${MM}/${DD} &&
> nice -n 19 /usr/local/bin/lame --silent --resample 11.025 -b 16 -t -m m
> ${VSA}/monitor/${FILENAME}.wav
> ${VSA}/monitor/${YYYY}/${MM}/${DD}/${FILENAME}.mp3 && rm -f
> ${VSA}/monitor/${FILENAME}.wav)
> exten => s,n,MixMonitor(${FILENAME}.wav,,${MIXMON_ARGS})
> exten => s,n(snooping),NoOp(snooping on ${CHANNEL})
>
>
>
> that'll end up putting a mp3 of the call in
> /var/spool/asterisk/monitor/YYYY/MM/DD/HHMMSS-CALLERID.mp3
>
> don't forget any legal issues you might have to work around, recording the
> fact that you declared the message is being recorded.
>
>
> --
>
> Jeremy Kister
> http://jeremy.kister.net./
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>              http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110307/8c77f051/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extensions.conf
Type: application/octet-stream
Size: 4497 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110307/8c77f051/attachment.obj>


More information about the asterisk-users mailing list