http://www.voip-info.org/wiki/view/Asterisk+config+features.conf
录音合并
One-touch recording exten => 123,1,Set(DYNAMIC_FEATURES=automon) ; enable One-touch exten => 123,2,Dial(SIP/phone100,,wW) ; wW allow one-touch recording IN and OUT audio will be split into two files, and will be available on your asterisk server in the following directory: /var/spool/asterisk/monitor
The two files can then be joined by using sox: soxmix *in.wav *out.wav output.wav If desired, the mixed-channel file can then be compressed into a low bitrate MP3 using lame: lame --preset voice -v -B 64 -a output.wav output.mp3 [macro-apprecord] exten => s,1,GotoIf($["${XAD}" = "0" | "${XAD}" = ""]?startrec:stoprec) exten => s,n(startrec),Playback(startmonitor) exten => s,n,Set(XAD=1) exten => s,n,Set(FILENAME=${TIMESTAMP}-OUT${CALLERID(number)}-^-${UNIQUEID}) exten => s,n,Set(MONITOR_EXEC_ARGS=&& nice -n 19 /usr/local/bin/lame -b 96 -t -F -m m --bitwidth 16 --quiet "/var/spool/asterisk/monitor/${FILENAME}.wav" "/var/spool/asterisk/monitor/${FILENAME}.mp3" && rm -f "/var/spool/asterisk/monitor/${FILENAME}.wav") exten => s,n,Monitor(wav,${FILENAME},m) exten => s,n,MacroExit exten => s,n(stoprec),StopMonitor exten => s,n,Set(XAD=0) exten => s,n,Playback(stopmonitor) exten => s,n,MacroExit