Is that possible to identify endpoints with auth_username -> ip order with PJSIP?
What I want to do is:
- first authenticate a request by Authorization header, if authenticated, route to endpoint A based on auth_username.
- If not authenticated, check src IP and if it matches, route the request to another endpoint B.
- Otherwise, reject the request.
I have tried “endpoint_identifer_order=auth_usrename,ip” setting, but if the request comes from the src IP which matches the identifier definition, the request is not challenged.
Is it possible to let Asterisk behaves as above?