AstroCom-API/acSipBridge/pjsip.conf

113 lines
3.2 KiB
Plaintext

; ============================================================
; AstroCom SIP Bridge — PJSIP Configuration (chan_pjsip)
; /etc/asterisk/pjsip.conf
;
; Downstream PBXes REGISTER to this server.
; Each bridge requires three stanzas sharing the same base name:
;
; [bridgeN-pbx] type=endpoint — codecs, context, links to auth/aor
; [bridgeN-pbx] type=aor — stores the registered contact URI
; [bridgeN-pbx-auth] type=auth — username / password the PBX uses
;
; The PBX must be configured to register with:
; Registrar : sip:<this server's IP>:5060
; Username : bridgeN-pbx (must match auth.username below)
; Password : the 'password' value in [bridgeN-pbx-auth]
;
; Outbound calls to this PBX from the dialplan:
; Dial(PJSIP/${EXTEN}@bridgeN-pbx)
; Asterisk substitutes the registered contact URI automatically.
;
; Disable/remove sip.conf (or set chan_sip bindport=0) so both
; modules do not compete for port 5060.
; ============================================================
; ============================================================
; Transport — one UDP listener for all bridges
; ============================================================
[bridge-transport]
type=transport
protocol=udp
bind=0.0.0.0:5060
; For NAT — uncomment and fill in:
;local_net=192.168.0.0/16
;external_signaling_address=PUBLIC_IP
;external_media_address=PUBLIC_IP
; ============================================================
; Shared endpoint template
; ============================================================
[bridge-endpoint-tmpl](!)
type=endpoint
transport=bridge-transport
disallow=all
allow=ulaw
allow=alaw
allow=g729
dtmf_mode=rfc4733
; Force media through this server — required if either side is behind NAT
direct_media=no
; ============================================================
; BRIDGE 1
; Auth username : bridge1-pbx
; Auth password : (set below — must match PBX registration password)
; Inbound calls from this PBX land in [bridge1-from-pbx] (extensions.conf)
; ============================================================
[bridge1-pbx](bridge-endpoint-tmpl)
type=endpoint
auth=bridge1-pbx-auth
aors=bridge1-pbx
context=bridge1-from-pbx
[bridge1-pbx-auth]
type=auth
auth_type=userpass
username=bridge1-pbx
password=1242ebce8b420ee4723887ffe0a01211330851776862e6021f680f1406c94eff
[bridge1-pbx]
type=aor
max_contacts=1
remove_existing=yes
; ============================================================
; BRIDGE 2
; ============================================================
[bridge2-pbx](bridge-endpoint-tmpl)
type=endpoint
auth=bridge2-pbx-auth
aors=bridge2-pbx
context=bridge2-from-pbx
[bridge2-pbx-auth]
type=auth
auth_type=userpass
username=bridge2-pbx
password=BRIDGE2_SIP_SECRET
[bridge2-pbx]
type=aor
max_contacts=1
remove_existing=yes
; ============================================================
; Additional bridges — copy this triple and increment N
; ============================================================
;[bridge3-pbx](bridge-endpoint-tmpl)
;type=endpoint
;auth=bridge3-pbx-auth
;aors=bridge3-pbx
;context=bridge3-from-pbx
;
;[bridge3-pbx-auth]
;type=auth
;auth_type=userpass
;username=bridge3-pbx
;password=BRIDGE3_SIP_SECRET
;
;[bridge3-pbx]
;type=aor
;max_contacts=1
;remove_existing=yes