I've spent quite some time configuring Asterisk on my VGV7510KW22 and I want to share my configuration in case it might be useful for somebody. I can use this setup for my daily phone calls without problems.
Use these configurations with care, I'm still an Asterisk noob myself. It also might be a good idea to block international or special numbers by your SIP provider (I did). I have my system running for a few weeks now and so far I found no signs of abuse.
Thanks to Plonk34 and stefan-koch, their configs were my first starting point, I also learned a lot by reading some posts on the (German) IP phone forum and this great guide (also German) got me started with PJSIP.
lantiq.conf
[interfaces]
channels = 2
per_channel_context = on ;important - otherwise calls end up in default context!
pjsip.conf
[acl]
type = acl
deny = 0.0.0.0/0.0.0.0
permit = 127.0.0.1
;permit = 192.168.1.0/24 ;uncomment if you want to connect clients from LAN
permit = 88.79.152.xxx ;nslookup <area_code>.sip.arcor.de
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5060
local_net = 127.0.0.1
local_net = 192.168.1.0/24
[reg_arcor]
type = registration
transport = transport-udp
contact_user = <area_code><your_number>
client_uri = sip:<area_code><your_number>@<area_code>.sip.arcor.de
server_uri = sip:<area_code>.sip.arcor.de
outbound_auth = auth_arcor
line = yes
endpoint = in_arcor
retry_interval = 30
forbidden_retry_interval = 300
max_retries = 10
auth_rejection_permanent = false
[auth_arcor]
type = auth
auth_type = userpass
realm = arcor.de
username = <area_code><your_number>
password = <password>
[aor_arcor]
type = aor
contact = sip:<area_code>.sip.arcor.de
[in_arcor]
type = endpoint
transport = transport-udp
context = lantiq1_inbound
disallow = all
allow = alaw,g722,ulaw
disable_direct_media_on_nat = yes
rewrite_contact = yes
[out_arcor]
type = endpoint
transport = transport-udp
disallow = all
allow = alaw,g722,ulaw
disable_direct_media_on_nat = yes
callerid = <area_code><your_number>
from_user = <area_code><your_number>
from_domain = <area_code>.sip.arcor.de
outbound_auth = auth_arcor
aors = aor_arcor
EDIT: added line option to registration, see https://blogs.asterisk.org/2016/01/27/the-pjsip-outbound-registration-line-option/
extensions.conf
[general]
static=yes
writeprotect=yes
autofallthrough=yes
[default]
exten => _X.,1,Answer()
same => n,Verbose(1,${CALLERID(num)} reached context DEFAULT by calling ${EXTEN})
same => n,Hangup()
[out_arcor]
; national numbers with country code
exten => _+49ZXX!.,1,Dial(PJSIP/${EXTEN}@out_arcor,60,Trg)
same => n,Hangup()
; national numbers called with leading 0
exten => _0Z.,1,Dial(PJSIP/${EXTEN}@out_arcor,60,Trg)
same => n,Hangup()
; local area numbers
exten => _Z.,1,Dial(PJSIP/${EXTEN}@out_arcor,60,Trg)
same => n,Hangup()
; emergency calls
exten => 110,1,Dial(PJSIP/${EXTEN}@out_arcor,60,Trg)
exten => 110,n,Hangup()
exten => 112,1,Dial(PJSIP/${EXTEN}@out_arcor,60,Trg)
exten => 112,n,Hangup()
; add rules for expensive special numbers. Get German examples from:
; https://www.linuxmaker.com//asterisk-pbx/dialplan-extensionsconf.html
exten => _0137Z.,1,Verbose(1,Blocked: ${EXTEN})
;same => n,Playback(forbidden)
same => n,Hangup()
[lantiq1_inbound]
exten => <area_code><your_number>,1,Dial(TAPI/1,60,t)
same => n,Hangup
[lantiq1]
include => out_arcor
;[lantiq2]
;include => ltq2_out
You should also set your correct country code in indications.conf
If you see a lot of errors like
ERROR[2642]: chan_lantiq.c:844 lantiq_map_rtptype_to_format: unsupported rtptype received is 0xd, forcing ulaw
see post 7
EDIT: refactored/simplified the config a bit