can anyone tell me how to set asterisk to record all phonecall

Home » Asterisk Users » can anyone tell me how to set asterisk to record all phonecall
Asterisk Users 4 Comments

Hi all,
I need to use asterisk to record all phonecall I have test using
mixmonitor to record a call.
Now I need to set the configure file to let asterisk auto record all
calls. I have searched many
document but still can not succeed. My version is 1.8beta and I prefer
using mixmonitor.

Regards!

4 thoughts on - can anyone tell me how to set asterisk to record all phonecall

  • 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.

  • 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 default iconextensions.conf

  • In my asterisk config files, extensions_additional.conf do not exist so
    should I set [macro-record-enable]
    in extensions_additional.conf or in extensions.conf? My version is
    1.8.0beta5

  • Un-top-posting…

    Please do not copy me privately. I obviously already read the mailing list