`

Asterisk软交换构建一个简单的语音呼叫中心

阅读更多

1Asterisk如何配置路由
  
假业应用环境要求进行这样的配置:号码范围为1xxx~9xxx。其中1000~1999号码范围为普通IP电话终端分配使用;2000~2999号码保留给一个SIP会议服务器(现阶段可利用一个软SIP电话终端进行模拟),即用户呼叫2xxx号码,都将自动把呼叫转发到SIP会议服务器;80008001作为Asterisk内建的音频会议使用;8002作为自动语言应答(呼叫中心)的号码使用(具体要求在下一项);以开头的号码(0xxxxxxxxxx,含011位)作为呼叫普通传统电话的号码使用(即PSTN),该呼叫将传递给一个电话媒体网关(有关电话媒体[MGCP协议]网关的原理请自行查找资料,在此处进行模拟配置)
2
、呼叫要求
  i.    
用户拨打8002,系统用语音提示:您好,欢迎致电微科科技,请直拨分机号,传真请按#,号码提示请按*
  ii.    
如果用户按的是1xxx号码(即上面路由配置中所说明的1000~1999所对应的普通IP终端),则自动呼通该终端,建立两者之间通话。
iii.    
如果用户按的是#,则自动呼通1999终端(该终端假定为用户传真的终端)。
iv.    
如果用户按的是*,则播放一段语音(假定该语音为公司号码报号)。该语音播放完后,又转入第(i)步,提示用户继续进行操作。
下面为Asterisk软交换配置
extensions.conf

[general] 
static=yes 
writeprotect=yes 
autofallthrough=no 
[globals] 
FAX=SIP/1999 
[incoming] 
include => interal 
include => ipphones 
include => sipphones 
include => inaucon 
include => outphones 
exten => s,1,NoOp() 
exten => s,n,Answer() 
exten => s,n,Set(TIMEOUT(digit)=10) 
exten => s,n,Set(TIMEOUT(response)=20) 
exten => s,n,Background(hello-world) 
exten => i,1,Playback(pbx-invalid) 
exten => i,n,Goto(incoming,s,1) 
exten => t,1,Playback(enterux/call-timeout) 
exten => t,n,Playback(vm-goodbye) 
exten => t,n,Hangup() 
exten => 8002,1,Goto(s,1) 
exten => *,1,Playback(agent-loginok); 
exten => *,n,Goto(s,1) 
exten => #,1,Goto(interal,1999,1)

 sip.conf

[general] 
allowguest=yes 
allowoverlap=yes 
bindport=5061 
bindaddr=0.0.0.0 
srvloopup=yes 
; 
[ipsip](!) 
;disallow=all 
;allow=ulaw 
;allow=g729 
;videosupport=yes 
;maxcallbitrate=384 
;callevents=no 
;alwaysauthreject=yes 
;g726nonstandard=yes 
;matchexterniplocally=yes 
host=dynamic 
nat=yes 
canreinvite=no 
; 
[srsip](!) 
;disallow=all 
;allow=ulaw 
;allow=g729 
;videosupport=yes 
;maxcallbitrate=384 
;callevents=no 
;alwaysauthreject=yes 
;g726nonstandard=yes 
;matchexterniplocally=yes 
host=192.168.1.35 
nat=yes 
canreinvite=no 
; 
[1000](ipsip) 
type=friend 
username=1000 
;secret=123456 
context=incoming 
; 
[1001](ipsip) 
type=friend 
username=1001 
;secret=123456 
context=incoming 
; 
[1002](ipsip) 
type=friend 
username=1002 
;secret=123456 
context=incoming 
; 
[1003](ipsip) 
type=friend 
username=1003 
;secret=123456 
context=incoming 
; 
[1004](ipsip) 
type=friend 
username=1004 
;secret=123456 
context=incoming 
; 
[1005](ipsip) 
type=friend 
username=1005 
;secret=123456 
context=incoming 
; 
[1006](ipsip) 
type=friend 
username=1006 
;secret=123456 
context=incoming 
; 
[1007](ipsip) 
type=friend 
username=1007 
;secret=123456 
context=incoming 
; 
[1008](ipsip) 
type=friend 
username=1008 
;secret=123456 
context=incoming 
; 
[1009](ipsip) 
type=friend 
username=1009 
;secret=123456 
context=incoming 
; 
[1998](ipsip) 
type=friend 
username=1998 
;secret=123456 
context=incoming 
; 
[1999](ipsip) 
type=friend 
username=1999 
;secret=123456 
context=incoming 
; 
[2000](srsip) 
type=friend 
username=2000 
;secret=123456 
context=incoming 
; 
[2001](srsip) 
type=friend 
username=2001 
;secret=123456 
context=incoming 
; 
[2002](srsip) 
type=friend 
username=2002 
;secret=123456 
context=incoming 
; 
[2003](srsip) 
type=friend 
username=2003 
;secret=123456 
context=incoming 
; 
[2004](srsip) 
type=friend 
username=2004 
;secret=123456 
context=incoming 
; 
[2005](srsip) 
type=friend 
username=2005 
;secret=123456 
context=incoming 
; 
[2006](srsip) 
type=friend 
username=2006 
;secret=123456 
context=incoming 
; 
[2007](srsip) 
type=friend 
username=2007 
;secret=123456 
context=incoming 
; 
[2008](srsip) 
type=friend 
username=2008 
;secret=123456 
context=incoming 
; 
[2009](srsip) 
type=friend 
username=2009 
;secret=123456 
context=incoming 
; 
[8000](srsip) 
type=friend 
username=8000 
;secret=123456 
context=incoming 
; 
[8000](srsip) 
type=friend 
username=8000 
;secret=123456 
context=incoming 
; 
[8001](srsip) 
type=friend 
username=8001 
;secret=123456 
context=incoming 

 然后准备两个软电话就可以进行呼叫了
下面是我跟勇哥测试的结果,还支持视频, 刚开始不支持视频,法了好大的劲还弄Asterk技术视频了,哈哈~~~

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics