Hello team!
I see a lot of pjsip logs where endpoints send to Asterisk OPTIONS request with frequency like it doing a ping of server, but Aasterisk each time answering “401 Unauthorized”.
Is it wrong configuration of endpoints where they don’t include authorization headers in OPTIONS request? Or it’s wrong configuration of Asterisk where he cannot authorize them?
Whether it would be adjustable is up to the remote endpoint. It is the one sending the OPTIONS request. As for the security log it’s stating that it challenged for authentication, which it did.
My concern here - should I try to get these “OPTIONS - UNAUTHORIZED” dialogs have “OPTIONS - AUTHORIZED” in somehow way?
Are they so frequently, not because UAC every time receive “Unauthorized”, and in case if he will be Authorized he will send, for example “OPTIONS” once in a 10 minutes?
That would be dependent on the behavior of the remote side. I can’t answer that with certainty as I do not know. Generally OPTIONS is frequently sent as a keep alive/ping, so even with auth that may not change things.
And my last question. Am I right that though UAC itself registered, because I see it in ‘pjsip show endpoints’ output, Asterisk send “Unauthorized” because “Options” request itself don’t has authorization header, but not because it’s a bug and Asterisk should consider all registered endpoints in “pjsip list endpoints” as trusted and don’t ask send Uac to Asterisk Authorization token?
All requests from an endpoint are challenged for authentication. Endpoints aren’t “trusted” if they register. That merely tells Asterisk where to send calls destined for them.