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

baikgd的博客

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

 
 
 

日志

 
 

Asterisk背景音乐播放不了的解决方法  

2010-05-22 16:11:50|  分类: Asterisk |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

现时服务器上配置如下:

exten => _110,1,macro(record-test)
exten => _110,2,Read(NUM,test/400-1,1,,,3)
exten => _110,3,Execif($['X${NUM}'='X1'],Goto,${EXTEN},18)
exten => _110,4,Execif($['X${NUM}'='X2'],Goto,${EXTEN},18)
exten => _110,5,Execif($['X${NUM}'='X3'],Goto,${EXTEN},18)
exten => _110,6,Execif($['X${NUM}'='X4'],Goto,${EXTEN},18)
exten => _110,7,Execif($['X${NUM}'='X5'],Goto,${EXTEN},18)
exten => _110,8,Execif($['X${NUM}'='X7'],Goto,${EXTEN},18)
exten => _110,9,Execif($['X${NUM}'='X0'],Goto,${EXTEN},18)
exten => _110,10,Read(NUM,test/400-1,1,,,3)
exten => _110,11,Execif($['X${NUM}'='X1'],Goto,${EXTEN},18)
exten => _110,12,Execif($['X${NUM}'='X2'],Goto,${EXTEN},18)
exten => _110,13,Execif($['X${NUM}'='X3'],Goto,${EXTEN},18)
exten => _110,14,Execif($['X${NUM}'='X4'],Goto,${EXTEN},18)
exten => _110,15,Execif($['X${NUM}'='X5'],Goto,${EXTEN},18)
exten => _110,16,Execif($['X${NUM}'='X7'],Goto,${EXTEN},18)
exten => _110,17,Execif($['X${NUM}'='X0'],Goto,${EXTEN},18)
exten => _110,18,Playback(beep)
exten => _110,19,Queue(queue-test|tT|||300)
exten => _110,n,Hangup

[root@localhost asterisk]# cat musiconhold.conf
;
; Music on Hold -- Sample Configuration
;

[default]
mode=files
directory=/var/lib/asterisk/moh-default

[root@localhost asterisk]# ll /var/lib/asterisk/moh-default -d
drwxr-xr-x 2 asterisk asterisk 4096 May 21 12:25 /var/lib/asterisk/moh-default
[root@localhost asterisk]# ll /var/lib/asterisk/moh-default  
total 108
-rw-r--r-- 1 asterisk asterisk 102432 Feb 25  2008 music-on-hold.gsm
[root@localhost asterisk]#

 

[root@localhost asterisk]# cat queues_TEST.conf
[queue-TEST]

queue-youarenext = queue-youarenext            ;       ("You are now first in line.")
queue-thereare = queue-thereare                ;       ("There are")
queue-callswaiting = queue-callswaiting        ;       ("calls waiting.")
queue-holdtime = queue-holdtime                ;       ("The current est. holdtime is")
queue-minutes = queue-minutes                  ;       ("minutes.")
queue-seconds = queue-seconds                  ;       ("seconds.")
queue-thankyou = queue-thankyou                ;       ("Thank you for your patience.")
queue-lessthan = queue-less-than               ;       ("less than")
queue-reporthold = queue-reporthold            ;       ("Hold time")
periodic-announce = queue-periodic-announce
eventwhencalled = yes
eventmemberstatus = yes


announce-frequency = 0
announce-holdtime = no
joinempty = yes
leavewhenempty = no
maxlen = 0
memberdelay = 0
musiconhold = default
periodic-announce =  /var/lib/asterisk/sounds/TEST/400-2
periodic-announce-frequency = 12

reportholdtime = no
retry = 1
servicelevel = 30
strategy = rrmemory
timeout = 16
weight = 50
wrapuptime = 2

member => SIP/2343,1
member => SIP/3434,1
member => SIP/3434,2
member => SIP/3423,2

 

musiconhold定义为default,periodic-announce 为定义在Queue等12秒时播放的语音文件,但是musiconhold死活不生效,

都检查过一遍还是不行,要做以下修改:

exten => _110,18,Playback(beep)
exten => _110,19,Queue(queue-test|tT|||300)
Queue前要有一个动作Playback才能生效,还要重启Asterisk程序本身才能应用起来。

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

历史上的今天

评论

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

页脚

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