[OpenSIPS-Users] SIP UAs Authentication based on a combination of username, password and IP address of the UA

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Aug 9 09:46:42 CEST 2010


Hi Sujeev,

You to first do standard digest authentication of the user (using the 
proxy_auth() function) - to also check the IP, add a new column in 
subscriber table (to keep the IP address) and load that column (during 
digest auth) using the load_credentials (see 
http://www.opensips.org/html/docs/modules/1.6.x/auth_db.html#id228201)...

So, once the digent auth was successfully validated, you will have the 
provisioned IP loaded into a script variable, so you can easyly check it 
against $si (source IP of the message).

Regards,
Bogdan

Sujeev wrote:
> Hi everyone,
> I've a small OpenSIPs setup with 1500 ATAs.  those ATAs are on a LAN 
> and have a static IP address(Private).
> I want to authenticate those ATAs with a combination of username + 
> password + IP of ATA on MySQL or Postgresql database.
>
> example;
> ATA 1
> ------
> IP : 10.2.222.4
> Username : 10001
> Password : 10001
>
> I added these info into a DB. When ATA 1 uses IP address "10.2.222.4" 
> ATA can register with my OpenSIPs server.
> When ATA 1 uses IP address 10.2.222.5 the registration should be failed.
> Is that possible? if yes please tell me how.
>
>
> Thank you.
>
> Sujeev
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro




More information about the Users mailing list