After upgrading asterisk (13 -> 16.0.1) no incoming calls get through. Asterisk complains: “No matching peer for +358… from aaa.bbb.ccc.dddd:ppppp” and sends SIP/2.0 401 Unauthorized. The calls come via a SIP trunk provider (Twilio).
All ip addresses used by the trunk provider are listed in sip.conf and show up with ‘sip show peers’, yet no match is ever found. Each host is defined as
type=peer context=incoming allowguest=yes insecure=invite,port dtmfmode=rfc2833 canreinvite=no disallow=all allow=ulaw host=one ip here
If I understand it correctly, port number (typically high, changes every time) should be ignored and matching should use ip address only (insecure=port). Yet a match is never found (and hence a 401 challenge?). If I set allowguest=yes in the [general] section, everything works in that context.
There is no NAT, TLS is used. There are no users (sip show users => empty).
Any ideas why matching peers fails? Or how to debug the issue further?