[英]Building channels/trunks between two Asterisk servers with PJSIP
新的星號版本 (>13) 使用 PJSIP 模塊而不是 chan_sip。 到目前為止,我缺少的是如何正確使用帶有星號的 PJSIP 庫的實際示例。
我想要做的是以下內容:
像這樣:[終端設備<==>Asterisk1<========>Asterisk2<==>終端設備]
到目前為止,我只找到了如何使用 chan_sip 或 IAX2 執行此操作的教程,但未找到使用 PJSIP 的教程。 還有幾個可用的教程將星號服務器綁定到外部提供程序,但這不是我想要做的。
請幫助我,至少提供有關該主題的豐富教程或信息網站的鏈接!
謝謝
在與此斗爭了兩天的大部分時間之后,這是一個有效的配置(至少在一個方向上(serverB 上的電話是遠程的,因此我無法輕松測試)。
我希望它可以幫助其他人避免我所經歷的痛苦:-)
;
; ServerA - pjsip.conf
;
[siptrunk-auth]
type = auth
auth_type = userpass
username = <USER>
password = <ASTRONGPASSWORD>
[siptrunk-aor]
type = aor
contact = sip:serverB.domain.tld
[siptrunk]
type = endpoint
context = from-serverB
allow = !all,g722,ulaw
outbound_auth = siptrunk-auth
aors = siptrunk-aor
direct_media = no
[siptrunk-registration]
type = registration
outbound_auth = siptrunk-auth
server_uri = sip:serverB.domain.tld
client_uri = sip:<USER>@serverB.domain.tld
retry_interval = 60
[siptrunk-identify]
type = identify
match = serverB.domain.tld
endpoint = siptrunk
;
; ServerB - pjsip.conf
;
; <USER> is the same <USER> as on Server A
;
[<USER>] ;
type = auth
auth_type = userpass
username = <USER>
password = <ASTRONGPASSWORD>
[<USER>]
type = aor
max_contacts = 1
[<USER>]
type = endpoint
context = from-ServerA
allow = !all,ulaw
direct_media = no
auth = <USER>
aors = <USER>
[<USER>]
type = identity
match = ServerA.domain.tld ; sometimes you might need to use the actual IP Address
endpoint = <USER>
;
; ServerA - extensions.conf
;
[to-serverB]
; route extensions starting with 6XXX to Server B
exten => _6XXX,1,Dial(PJSIP/${EXTEN}@siptrunk,,25)
same => n,Hangup()
;
; ServerB - extensions.conf
;
[to-serverA]
; route extensions starting with 7XXX to Server A
exten => _7XXX,1,Dial(PJSIP/${EXTEN}@<USER>,,25)
same => n,Hangup()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.