打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
利用sip将两台asterisk服务器进行相连

如有两台asterisk 服务器,ip地址为:192.168.2.96及192.168.2.97.

 

 

先分别在两台服务器的sip.conf配置文件中建立用于两台asterisk 进行通讯的sip账号,及siptrunk账号.

如下:

 

1.在96机子建立666账号,如下:

 

[666]
type=friend
secret=kentop123456
host=dynamic
username=666
context=MGConfig
disallow=all
incominglimit=360
outgoinglimit=1
allow=gsm
allow=alaw
allow=ulaw

 

再在96下建立用于通讯的97trunk,如下:

 

[97TRUNK]
type=friend
username=888
secret=kentop123456
host=192.168.2.97
dtmfmode=rfc2833
context=MGConfig
fromuser=888

insecure=very
disallow=all
allow=gsm
allow=alaw
allow=ulaw

 

2 同样,我们在97下也建立888的sip帐户

 

[888]
type=friend
secret=kentop123456
host=dynamic
username=888
context=MGConfig
disallow=all
allow=gsm
allow=ulaw
allow=alaw

 

 

建立96trunk

 

[96TRUNK]
type=friend
username=666
secret=kentop123456
host=192.168.2.96
fromuser=666
dtmfmode=rfc2833
context=MGConfig
insecure=very
disallow=all
allow=gsm

allow=ulaw
allow=alaw

 

3.在96的sip.conf中注册97的888

在 97的sip.conf中注册96的666

 

如下:

96机子:register => 888:kentop123456@192.168.2.97
97机子:register => 666:kentop123456@192.168.2.96

 

4.在两台机子extension.conf中写入同样的拨号方案

 

exten=>_96.,1,dial(SIP/97${EXTEN:2}@97TRUNK,40,r)
exten=>_97.,1,Dial(SIP/${EXTEN:2},40,r)

 

这样reload之后,只要在任意一台机子,呼96XXXX然后在另一台的机子的exten=>_97.,就会收到从呼收方发来的呼叫,这样,只要在这个exten去接收呼叫就可以了.

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
asterisk sip配置说明
深入浅出asterisk(二):chan
centos6安装asterisk(TDM400P+WIFI Phone)
Asterisk学习资料
Asterisk 数据库配置方案
asterisk 安装和asterisk_sip 控制台信息
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服