高级工程师
- 注册时间
- 2010-11-20
- 金币
- 2560 个
- 威望
- 10 个
- 荣誉
- 3 个
尚未签到
|
人不能闲着,闲着就想搞点事情。
edgeos 基于debian开发,debian能用的软件,它也可以!
路由器性能也够强劲、只做路由有点浪费。
折腾上软交换就可以为企业家庭用户组建自己的电话网。
安装sterisk
come on,搞起来!!
先上设备图:
configure set system package repository wheezy components 'main contrib non-free'
set system package repository wheezy distribution wheezy
set system package repository wheezy url http://http.us.debian.org/debian
commit
save
exit
以上参考https://help.ubnt.com/hc/en-us/a ... -packages-to-EdgeOS
以下为自创
sudo apt-get update
sudo apt-get install asterisk -y
等待安装完成。
然后执行
reboot
重启一下路由器
重启完成登陆路由器执行以下命令
sudo asterisk -r
ubnt@ubnt:~$ sudo asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on ubnt (pid = 1472)
ubnt*CLI>
如果显示以上内容,就说明事情搞成了。
接下来配置asterisk,实现电脑路语音网关通话。
asterisk配置两个文件
第一个,sudo vi/etc/asterisk/sip.conf
我们先配置两个号码8000 8001
[8000]
type=friend
secert=123321
host=dynamic
context=internal
username=8000
allow=ulaw
nat=yes
callgroup=1
dtmfmode=rfc2833
[8001]
type=friend
secert=123321
host=dynamic
context=internal
username=8001
allow=ulaw
nat=yes
callgroup=1
dtmfmode=rfc2833
:wq!保存退出
sudo vi/etc/asterisk/extensions.conf
添加
[default]
[internal]
exten => 8000,1,Answer()
exten => 8000,n,Dial(SIP/8000,40,tr)
exten => 8000,n,Hangup
exten => 8001,1,Answer()
exten => 8001,n,Dial(SIP/8001,40,tr)
exten => 8001,n,Hangup
wq!保存退出
sudo service asterisk restart 重启服务
sudo asterisk -r
sip show peers
ubnt@ubnt:~$ sudo asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on ubnt (pid = 3485)
ubnt*CLI> sip show peers
Name/username Host Dyn Forcerport ACL Port Status
8000/8000 (Unspecified) D N 0 Unmonitored
8001/8001 (Unspecified) D N 0 Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline]
ubnt*CLI>
看到这个说明两个号码添加完成
可以配置电脑跟语音网关,全球的内线通话了。
速度去试一试。
8000 在线了,再配置语音网关
注册成功
测试通话,我用电话拨打电脑。
电话呼入成功,通话测试正常。
事情已搞完,enjoy yourself!
如果你认为有用,请关注转发。
By:rongbl
谢谢!
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
x
评分
-
1
查看全部评分
-
|