登录  
 加关注
查看详情
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

baikgd的博客

技术是工具,生活是目的,更好的生活是目标!

 
 
 

日志

 
 

Asterisk 录音文件实现  

2009-11-16 13:57:33|  分类: Asterisk |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

[macro-sky]
exten => s,1,NoOp(${TIMESTAMP})
exten => s,n,NoOp(${TIMESTAMP:2:6})
exten => s,n,NoOp(${TIMESTAMP:2})
exten => s,n,NoOp(${CALLERIDNUM})
exten => s,n,NoOp(${CALLERID(num)})
exten => s,n,NoOp(${MACRO_EXTEN})
exten => s,n,NoOp(${EXTEN})
exten => s,n,NoOp(${UNIQUEID})
exten => s,n,Set(CALLFILENAME=/var/spool/asterisk/monitor/test/${TIMESTAMP:2:6}/${TIMESTAMP:2}-${CALLERIDNUM}-${MACRO_EXTEN}-${UNIQUEID}.wav)
exten => s,n,SetCDRUserField(${CALLFILENAME})
exten => s,n,MixMonitor(${CALLFILENAME}||/usr/local/bin/wav2mp3 ${CALLFILENAME})

[skyw]
exten => _X.,1,macro(sky,${CALLERIDNUM})
exten => _X.,n,Dial(SIP/${EXTEN}@HK_EX2,60,tT)
exten => _X.,n,hangup()

 

执行效果:

Executing Macro("SIP/3001-09eaa290", "sky|3001") in new stack
    -- Executing NoOp("SIP/3001-09eaa290", "20091116-120708") in new stack
    -- Executing NoOp("SIP/3001-09eaa290", "091116") in new stack
    -- Executing NoOp("SIP/3001-09eaa290", "091116-120708") in new stack
    -- Executing NoOp("SIP/3001-09eaa290", "3001") in new stack
    -- Executing NoOp("SIP/3001-09eaa290", "3001") in new stack
    -- Executing NoOp("SIP/3001-09eaa290", "1000") in new stack
    -- Executing NoOp("SIP/3001-09eaa290", "s") in new stack
    -- Executing NoOp("SIP/3001-09eaa290", "1258344428.154") in new stack
    -- Executing Set("SIP/3001-09eaa290", "CALLFILENAME=/var/spool/asterisk/monitor/test/091116/091116-120708-3001-1000-1258344428.154.wav") in new stack
    -- Executing SetCDRUserField("SIP/3001-09eaa290", "/var/spool/asterisk/monitor/test/091116/091116-120708-3001-1000-1258344428.154.wav") in new stack
    -- Executing MixMonitor("SIP/3001-09eaa290", "/var/spool/asterisk/monitor/test/091116/091116-120708-3001-1000-1258344428.154.wav||/usr/local/bin/wav2mp3 /var/spool/asterisk/monitor/test/091116/091116-120708-3001-1000-1258344428.154.wav") in new stack
    -- Executing Dial("SIP/3001-09eaa290", "SIP/1000@HK_EX2|60|tT") in new stack
    -- Called 1000@HK_EX2

 

  评论这张
 
阅读(2193)| 评论(0)

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018