IP Based Authentication

Hi
I would like to setup ip based authentication in asterisk. i.e. Asterisk should allow the user to register if it is from the specified ip irrespective of the user id. I tried out some options like insecure in sip.conf which dint work out.
Help on this would be appreciated. Thanks in advance.

Regards
Niranjan