ast: inbound and outbound must be separate - some trunks get confused seeing more than one contact & fail to register

This commit is contained in:
mpmc 2023-06-24 17:02:27 +01:00
parent 72f5bcca59
commit 38a38391ec
3 changed files with 18 additions and 10 deletions

View File

@ -19,3 +19,8 @@ local_net = 172.16.0.0/12
local_net = 192.168.0.0/16
local_net = 127.0.0.0/8
local_net = 10.0.0.0/8
;
; Load trunk identify block
#tryinclude pjsip_identify_trunk_one.conf

View File

@ -0,0 +1,8 @@
;
; /etc/asterisk/pjsip_identify_trunk_one.conf
;
; This is needed for inbound calls from local trunk.
[trunk-one]
type = identify
match = 192.168.255.2
endpoint = trunk-one

View File

@ -4,6 +4,7 @@
; For a local system to register as a trunk.
;
[trunk-one](trunk-defaults)
; Accept inbound auth for this trunk.
accepts_auth = yes
@ -20,15 +21,9 @@ inbound_auth/password = BedknobsArentSupposedToWorkThatWayUNLESSYOUREBRAVE
; name in your dialplan.
endpoint/context = from-trunk-one
; Only one registration please.
; Max contacts should be one.
aor/max_contacts = 1
[trunk-one]
; An identify block is needed for this trunk to match for incoming calls.
type = identify
; IP / hostname.
match = 192.168.255.2
; What endpoint does this identify block belong to?
endpoint = trunk-one
; When simultaneous logins from the same account exceed max_contacts, disconnect
; the oldest session.
aor/remove_existing = yes