asterisk PJSIP to AVM Fritzbox
To make asterisk PBX registering to an AVM Fritzbox try this in pjsip_wizard.conf:
[trunk_defaults](!)
type = wizard
transport = transport-udp
aor/qualify_frequency = 30
endpoint/allow = !all,g722,alaw
[MY_USER](trunk_defaults)
remote_hosts = 192.168.178.1:5060
sends_auth = yes
sends_registrations = yes
aor/contact = sip:MY_USER@1192.168.178.1:5060
outbound_auth/username = MY_USER
outbound_auth/password = MY_PASS
registration/client_uri = sip:MY_USER@192.168.178.1:5060
endpoint/context = fritzbox-incoming
To handle the called extension try this in extension.conf:
[fritzbox-incoming]
exten => s,1,Verbose(0,Incoming from FRITZ-Box)
same => n,Set(CALLED_URI=${PJSIP_HEADER(read,P-Called-Party-ID)})
same => n,Set(CALLED_URI=${CUT(CALLED_URI,@,1)})
same => n,Set(CALLED_URI=${CUT(CALLED_URI,:,2)})
same => n,Goto(sip-incoming,${CALLED_URI},1)
The result should be:
*CLI> pjsip show registrations
<Registration/ServerURI..............................> <Auth....................> <Status.......>
===============================================================
fritzbox-reg-0/sip:192.168.178.1:5060 fritzbox-oauth Registered (exp. ??s)
Objects found: 1
Considering a "Thank you"?