; ======================= GLOBAL

[global]
type = global
user_agent = Asterisk




; ======================== ACL

[acl]
type = acl
deny = 0.0.0.0/0
permit = 192.168.55.0/24
permit = 192.168.66.0/24




; ======================= TRANSPORT

[transport-tls]
type = transport
protocol = tls
bind = 192.168.66.14:5061
local_net = 192.168.55.0/24
local_net = 192.168.66.0/24
external_media_address = 1.2.3.4
external_signaling_address = 1.2.3.4
cert_file = /etc/ssl/asterisk/pbx.crt
priv_key_file = /etc/ssl/asterisk/pbx.key
method = tlsv1_2




; ======================= REGISTRATION - PROVIDER

[provider_registration](!)
type = registration
transport = transport-tls
server_uri = sip:sip.provider
retry_interval = 120
max_retries = 80
forbidden_retry_interval = 300
expiration = 600
auth_rejection_permanent = false
outbound_auth = provider_auth


[provider_auth]
type = auth
auth_type = userpass
password = PASS
username = USER
realm = sip.provider


[provider_outbound](!)
type = endpoint
transport = transport-tls
context = unspecified
allow = !all,g722,alaw
from_domain = sip.provider
timers = no
language = de
outbound_auth = provider_auth


[provider_aor_outbound](!)
type = aor
qualify_frequency = 40


[provider_inbound]
type = endpoint
transport = transport-tls
context = provider_inbound
allow = !all,g722,alaw
language = de
outbound_auth = provider_auth


[provider_ident_inbound]
type = identify
endpoint = provider_inbound
match = 5.6.7.0/24



; ====== 01234 98765

[reg_0123498765](provider_registration)
client_uri = sip:+49876498765@sip.provider
contact_user = 0123498765

[out_0123498765](provider_outbound)
aors = out_aor_0123498765
callerid = 0123498765
from_user = 0123498765

[out_aor_0123498765](provider_aor_outbound)
contact = sip:+49876498765@sip.provider


; ====== 01234 98766

[reg_0123498766](provider_registration)
client_uri = sip:+49876498766@sip.provider
contact_user = 0123498766

[out_0123498766](provider_outbound)
aors = out_aor_0123498766
callerid = 0123498766
from_user = 0123498766

[out_aor_0123498766](provider_aor_outbound)
contact = sip:+49876498766@sip.provider
