Ja, dankjewel.
Hieronder vrijwel dezelfde pjsip.conf
. Dit zijn de verschillen:
- Mijn Asterisk zit achter het modem dat NAT doet. Daarom definieer ik wat mijn vast IPv4-adres is ( 82.NNN.NNN.NNN ) zoals Asterisk weet hoe de buitenwereld haar ziet.
- Mijn interne netwerk is 192.168.0.0/24
- Ik heb twee VoIP toestellen. Interne nummers zijn 1107 en 1109
- Die 1107 en 1109 komen uit basic-pbx van Asterisk source. Daar komt ook de context DCS-Incoming vandaan.
- Op 192.168.0.9 zit een test Asterisk, gesprekken van die SIP trunk landen ook in context DCS-Incoming. Daarmee kan ik binnenkomen gesprekken testen zonder dat ik via de (dure) telefoniewolk ga.
;================================ TRANSPORTS ==
; Our primary transport definition for UDP communication behind NAT.
transport-udp-nat]
type = transport
protocol = udp
bind = 0.0.0.0
; NAT settings
local_net = 192.168.0.0/24
external_media_address = 82.NNN.NNN.NNN
external_signaling_address = 82.NNN.NNN.NNN
;================================ CONFIG FOR SIP ITSP ==
; Registration for KPN VoIP
dkpn-auth]
type = auth
auth_type = userpass
username = aabaNNNNNNN@ims.imscore.net
password = PA55W0RDPA55W0RD
dkpn-trunk]
type = registration
outbound_auth = kpn-auth
transport = transport-udp-nat
server_uri = sip:ims.imscore.net
client_uri = sip:+31NNNNNNNNN@ims.imscore.net
contact_user = inbound-kpn
outbound_proxy = sip:voip1-ext.kpn.net\;lr
retry_interval = 60
dkpn-aor]
type = aor
contact = sip:ims.imscore.net
outbound_proxy = sip:voip1-ext.kpn.net\;lr
dkpn-out]
type = endpoint
context = DCS-Incoming
disallow = all
allow = alaw
outbound_auth = kpn-auth
aors = kpn-aor
outbound_proxy = sip:voip1-ext.kpn.net\;lr
from_user = +31NNNNNNNNN
from_domain = ims.imscore.net
dkpn-id]
type = identify
endpoint = kpn-out
match = voip1-ext.kpn.net
;================================ ENDPOINT TEMPLATES ==
; Our primary endpoint template for internal desk phones.
endpoint-internal-d70](!)
type = endpoint
context = Long-Distance
allow = !all,alaw
direct_media = no
trust_id_outbound = yes
device_state_busy_at = 1
dtmf_mode = rfc4733
dauth-userpass](!)
type = auth
auth_type = userpass
daor-single-reg](!)
type = aor
max_contacts = 1
;================================ ENDPOINT DEFINITIONS ==
; Below are the definitions for all staff devices, listed by department.
;
; Super Awesome Company uses the MAC address of their devices for the auth
; username and the extension number for the name of the endpoint, auth and
; aor objects. If your phones must use the same user ID and auth name then
; you will need to customize the endpoints accordingly.
;================================ MANAGEMENT ==
;Lindsey Freddie
;President for Life
d1107](endpoint-internal-d70)
auth = 1107
aors = 1107
callerid = Lindsey Freddie <1107>
d1107](auth-userpass)
password = PA55W0RDPA55W0RD
username = 1107
d1107](aor-single-reg)
mailboxes = 1107@example
;================================
;Terry Jules
;Director of Sales
d1109](endpoint-internal-d70)
auth = 1109
aors = 1109
callerid = Lin Phone <1109>
d1109](auth-userpass)
password = PA55W0RDPA55W0RD
username = 1109
d1109](aor-single-reg)
mailboxes = 1109@example
;================================
dmy-itsp]
type = endpoint
aors = my-itsp
outbound_auth = my-itsp-auth
disallow = all
allow = alaw
context = DCS-Incoming
dmy-itsp]
type = aor
contact = sip:192.168.0.9
qualify_frequency = 15
dmy-itsp-auth]
type = auth
auth_type = userpass
username = my_username
password = PA55W0RDPA55W0RD
; >my-itsp-reg]
type = registration
; outbound_auth = my-itsp-auth
; server_uri = sip:192.168.0.9
; client_uri = sip:my_username@192.168.0.9
dmy-itsp-identify]
type = identify
endpoint = my-itsp
match = 192.168.0.9
;================================
P.S. dit is met Asterisk 16.16, dat is een LTS versie.