diff --git a/asterisk/conf/pjsip.conf b/asterisk/conf/pjsip.conf index 6fb8680..b200581 100644 --- a/asterisk/conf/pjsip.conf +++ b/asterisk/conf/pjsip.conf @@ -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 + diff --git a/asterisk/conf/pjsip_identify_trunk_one.conf b/asterisk/conf/pjsip_identify_trunk_one.conf new file mode 100644 index 0000000..5e5ee2b --- /dev/null +++ b/asterisk/conf/pjsip_identify_trunk_one.conf @@ -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 diff --git a/asterisk/conf/pjsip_trunk_one.conf b/asterisk/conf/pjsip_trunk_one.conf index 6da06a5..5c8318d 100644 --- a/asterisk/conf/pjsip_trunk_one.conf +++ b/asterisk/conf/pjsip_trunk_one.conf @@ -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