The target of the OPTIONS request is identified by the Request-URI,
which could identify another UA or a SIP server. If the OPTIONS is
addressed to a proxy server, the Request-URI is set without a user
part, similar to the way a Request-URI is set for a REGISTER request.
Currently OPTIONS-Pings get an 401 Unauthorized when the userpart is skipped (which is fine with RFC).
Is there a way to modify this behaviour in Asterisk 13+?
Authentication occurs at a higher level than all of the modules which handle requests. If you turn on debug does it actually find the endpoint? (It’s identified based on the user portion of the From) If not then you could enable the anonymous endpoint which directs all unidentified requests to the anonymous endpoint. Otherwise there is no way to control it. I also assume you mean our behavior of how we handle incoming OPTIONS requests.
You assumed corrent
PJSIP rejects the endpoint as it can not be matched.
I will check the anonymous part. Can I add anonymous and map it to a locked down dialplan (just Hangup 21)?