As a followup to my previous post about Asterisk and IPv6, I have another problem. I use Asterisk 16.3.0 on OpenWrt 19.07.1.
When trying to register, I get the following error:
[2020-02-23 11:58:32] ERROR[2268] pjproject: sip_transport. Error processing 658 bytes packet from UDP 2001:4090:4008::173:5060 : PJSIP syntax error exception when parsing 'Via' header on line 2 col 137:
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP [xxxx:xxx:xxxx:xxxx:4e09:d4ff:fe29:519d]:5060;rport=5060;branch=z9hG4bKPj94e73f11-1bb3-431e-ac7c-e9194d32eedf;received=[xxxx:xxx:xxxx:xxxx:4e09:d4ff:fe29:519d]
From: <sip:<mynumber>@sip.easybell.de>;tag=c1a92b9e-1c05-487d-b035-e5adeadfc925
To: <sip:<mynumber>@sip.easybell.de>;tag=95c37a12bff1a2c36d72bf8333176544.7855
Call-ID: c386c746-6955-4810-acd3-7b41c1e69371
CSeq: 34992 REGISTER
P-NGCP-Auth-IP: 192.168.251.44
P-NGCP-Auth-UA: Asterisk PBX 16.3.0
WWW-Authenticate: Digest realm="sip.easybell.de", nonce="XlJqBV5SaNn3vR1ObujCXmPDwu5xynvu"
Server: Sipwise NGCP Proxy 7.X
Content-Length: 0
-- end of packet.
Apart from the syntax error, there are two things that irritate me about this:
- 401 Unauthorized: I can register successfully with the same username/password when using IPv4
- P-NGCP-Auth-IP: 192.168.251.44: where is that address coming from?
Does anyone have an idea what might be the problem here?
my pjsip.conf:
[global]
type = global
endpoint_identifier_order = username,ip
[acl]
type = acl
deny = 0.0.0.0/0.0.0.0
permit = [2001:4090:4008::173] ; sip.easybell.de
[transport_udp]
type=transport
protocol=udp
bind = ::
[reg_easybell]
type = registration
transport = transport_udp
contact_user = <mynumber>
client_uri = sip:<mynumber>@sip.easybell.de
server_uri = sip:sip.easybell.de
outbound_auth = auth_easybell
line = yes
endpoint = in_easybell
[auth_easybell]
type = auth
auth_type = userpass
realm = sip.easybell.de
username = <mynumber>
password = <password>
[aor_easybell]
type = aor
contact = sip:sip.easybell.de
[id_easybell]
type = identify
match = sip.easybell.de
endpoint = in_easybell
[in_easybell]
type = endpoint
transport = transport_udp
context = lantiq1_inbound
disallow = all
allow = alaw,ulaw,g722
[out_easybell]
type = endpoint
transport = transport_udp
context = out_easybell
disallow = all
allow = alaw,ulaw,g722
callerid = <mynumber>
from_user = <mynumber>
from_domain = sip.easybell.de
outbound_auth = auth_easybell
aors = aor_easybell
[out_id_easybell]
type = identify
match = localhost
endpoint = out_easybell