asterisk 录音合并,查分,执行命令等等

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 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值