一.安装Freepbx
1.下载freepbx镜像


最新版本:https://www.freepbx.org/downloads/


历史版本:https://downloads.freepbxdistro.org/ISO/


本地 : \\ssfps04\Dept_Folder\IT\NET\Telecom\Asterisk\ISO


2.虚拟机加载镜像

 

3.安装过程

 

 

 

 

 

 

 


4.修改ip
vi /etc/sysconfig/network-scripts/ifcfg-eth0
5.web打开配置界面,创建账号

 

6.登陆

 

7.初始化配置

二.配置Freepbx
1.配置分机


从顶部菜单点击Applications


从下拉菜单中点击Extensions

 

 


2.配置Trunk

从菜单顶部登录,点击 Connectivity
从下拉菜单中点击 Trunks

选择Chan_sip

 

输入trunk name

 

配置Dial Pattern Manipulation Rules 拨号模式匹配可以在中继出局前对已拨号码进行号码编辑或号码变换。

 

配置outgoing

 

配置incoming

 

3.配置Outbound Routes

从顶部菜单点击 Connectivity
从下拉菜单中点击 Outbound Routes
ADD Outbound Route

输入Route Name,调用Trunk

 

配置拨号规则,拨号匹配模式将对比用户拨打的号码,匹配成功后,发送呼叫到一个中继线路

 

4.配置Inbound Routes

从顶部菜单,点击 Connectivity
从下拉菜单中点击 Inbound Routes

 


5.配置Conferences

从菜单顶部,点击 Applications
在下拉菜单中点击 Conferences

 

 

6.配置Ring Group

从菜单顶部,点击 Applications
在下拉菜单中点击 Ring Groups

 

 

7.配置Queues

从菜单顶部,点击 Applications
在下拉菜单中点击 Queues

 

 


8.配置Time Groups

从菜单顶部,点击 Applications
在下拉菜单中点击 Time Groups

 

 

9.配置Time Conditions

从菜单顶部,点击 Applications
在下拉菜单中点击 Time Conditions

 

 

10.Dialplan


登陆系统后台


8000会议桥


vi /etc/asterisk/extensions_custom.conf
exten => _80004XXXX,1,Answer()
exten => _80004XXXX,2,Wait(1)
exten => _80004XXXX,3,SayDigits(${EXTEN:4})
exten => _80004XXXX,4,Playback(/var/lib/asterisk/sounds/these-are-currently)
exten => _80004XXXX,5,MeetMeCount(8000${EXTEN:4})
exten => _80004XXXX,6,Playback(/var/lib/asterisk/sounds/user)
exten => _80004XXXX,7,MeetMe(8000${EXTEN:4},dT)


8286+分机号直拨对方手机

vi /etc/asterisk/extensions_mobile.conf
exten => _8286xxxxx,1,Set(CALLERIDNUM=51530888)
exten => _8286xxxxx,2,Set(CALLERID(all)=51530888)
exten => _8286xxxxx,3,Dial(SIP/PSTN01/xxxxxxxxxxx)
exten => _8286xxxxx,998,Set(MEXTEN=${EXTEN})
exten => _8286xxxxx,999,Goto(custom-mobile-menu,s,1)

分机号无人接听转语音,该功能需要分机号调用自定义目的地,再由自定义目的地调用dialplan

vi /etc/asterisk/extensions_custom.conf
[custom-mobile-menu]
include => custom-mobile
exten => s,1,Set(time=1)
exten => s,2,Background(custom/noanswer-1-mext-2-operator-3-voicemail-0-ope)
exten => s,3,NoOp(Mobile Following set to '${MEXTEN}')
exten => s,4,Set(TIMEOUT(digit)=8)
exten => 0,1,Goto(0-operator,s,1)
exten => 0,2,Hangup()
exten => 1,1,Goto(mobile,${MEXTEN},1)
exten => 1,2,Hangup()
exten => 2,1,Goto(2-localexten,s,1)
exten => 2,2,Hangup()
exten => 3,1,Voicemail(${MEXTEN:4},u)
exten => 3,2,Hangup()
exten => t,1,Set(time=${time} + 1)
exten => t,2,GotoIf($[${time} < 4]?3:h,1)
exten => t,3,Goto(s,2)
exten => i,1,Set(time=${time} + 1)
exten => i,2,GotoIf($[${time} < 4]?3:h,1)
exten => i,3,BackGround('invalid')
exten => i,4,Goto(s,2)
exten => h,1,BackGround(goodbye)
exten => h,2,Hangup

[0-operator]
exten => s,1,Goto(ext-queues,0,1)
exten => s,2,Hangup

[2-localexten]
include => ext-local
exten => s,1,Set(time=1)
exten => s,2,Background(custom/ext-dial)
exten => s,3,WaitExten(8)
exten => t,1,Set(time=${time} + 1)
exten => t,2,GotoIf($[${time} < 4]?3:h,1)
exten => t,3,Goto(s,2)
exten => i,1,Set(time=${time} + 1)
exten => i,2,GotoIf($[${time} < 4]?3:h,1)
exten => i,3,BackGround('invalid')
exten => i,4,Goto(s,2)
exten => h,1,BackGround(goodbye)
exten => h,2,Hangup

拓扑

 

转载于:https://www.cnblogs.com/shixiaomin/p/10855473.html

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐