通信人家园

 找回密码
 注册

只需一步,快速开始

短信验证,便捷登录

搜索

军衔等级:

  列兵

注册:2011-8-9
跳转到指定楼层
1#
发表于 2012-8-21 11:40:35 |只看该作者 |倒序浏览
两台asterisk 服务器用SIP-trunk对接:
Server A
首先在sip.conf 里面添加trunk
[serverB]                    /对接的服务器的/
type = friend
host = 172.16.8.164           /对接的服务器的IP/
username = serverA
secret = 111
context = incoming            /对接后从服务器B呼入到服务A后在A上所走的规则/
disallow = all
allow = ulaw
然后在sip.conf 里面添加SIP分机:
[200]
type=friend
username=200
secret=200
host=dynamic
context=from-internal         /此为从SIP 200的分机呼出时所走的规则/
extensions.conf中添加以下规则:
[from-internal]
exten => _X., 1,Dial(sip/serverB/${EXTEN})
exten => _X., n, Hangup
[incoming]
exten => _X., 1, answer()
exten => _X., 2, playback(demo-instruct)
exten => _X., n, goto(2)
同理server B
首先在sip.conf 里面添加trunk
[serverA]                        /对接的服务器的/
type = friend                    
host = 172.16.42.254              /对接的服务器的IP/
username = serverB
secret = 111
context = incoming                /对接后从服务器B呼入到服务A后在A上所走的规则/
disallow = all
disallow = all
allow = ulaw
然后在sip.conf 里面添加SIP分机:
[100]
type=friend
username=100
secret=100
host=dynamic
context=from-internal
extensions.conf中添加以下规则:
[from-internal]
exten => _X., 1,Dial(sip/serverA/${EXTEN})
exten => _X., n, Hangup
[incoming]
exten => _X., 1, answer()
exten => _X., 2, playback(demo-instruct)
exten => _X., n, goto(2)

举报本楼

您需要登录后才可以回帖 登录 | 注册 |

手机版|C114 ( 沪ICP备12002291号-1 )|联系我们 |网站地图  

GMT+8, 2024-11-24 15:45 , Processed in 0.161455 second(s), 15 queries , Gzip On.

Copyright © 1999-2023 C114 All Rights Reserved

Discuz Licensed

回顶部