aterisk monitor 指定录音阶段是否录回铃音

Monitor(file_format:[urlbase],[fname_base,[options]]])

Arguments

  • file_format
    • file_format - optional, if not set, defaults to wav
    • urlbase
  • fname_base - if set, changes the filename used to the one specified.
  • options
    • m - when the recording ends mix the two leg files into one and delete the two leg files. If the variable MONITOR_EXEC is set, the application referenced in it will be executed instead of soxmix/sox and the raw leg files will NOT be deleted automatically. soxmix/sox or MONITOR_EXEC is handed 3 arguments, the two leg files and a target mixed file name which is the same as the leg file names only without the in/out designator.
      If MONITOR_EXEC_ARGS is set, the contents will be passed on as additional arguments to MONITOR_EXEC. Both MONITOR_EXEC and the Mix flag can be set from the administrator interface.
    • b - Don't begin recording unless a call is bridged to another channel.
    • B( interval ) - Play a periodic beep while this call is being recorded.
      • interval - Interval, in seconds. Default is 15.
    • i - Skip recording of input stream (disables m option).
    • o - Skip recording of output stream (disables m option)

 

 

上面是在wiki上看到的  主要参数是b参数控制,加b接通后才录音,不加b振铃就开始录音了 可以听到回铃音或者彩铃

1、接通开始录音

exten => s,n(record),MixMonitor(${WAVPATH}${CALLFILENAME:0:-4}.wav,b,/usr/local/bin/lame -b 32 --resample 8 -a ${WAVPATH}${CALLFILENAME:0:-4}.wav ${WAVPATH}${CALLFILENAME} && rm -rf ${WAVPATH}${CALLFILENAME:0:-4}.wav)

2、拨打开始录音,包括振铃音

exten => s,n(record),MixMonitor(${WAVPATH}${CALLFILENAME:0:-4}.wav,,/usr/local/bin/lame -b 32 --resample 8 -a ${WAVPATH}${CALLFILENAME:0:-4}.wav ${WAVPATH}${CALLFILENAME} && rm -rf ${WAVPATH}${CALLFILENAME:0:-4}.wav)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值