[OpenSIPS-Users] Autehntification from DB with AVPOPS module ?
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Thu Apr 29 18:47:57 CEST 2010
Hi Sam,
Use the auth module (pv_www_authorize and pv_proxy_authorize ) functions
to do auth with a password you have form other place (and not from
subscriber table).
Regards,
Bogdan
samoh wrote:
> Hi everybody,
>
>
> Can I do the autehntification from DB with AVPOPS and UAC modules ?
>
> I want to do the authentification from DB (no opensips DB) but I don't know
> how to proceed.
>
> I don't know if my start's code is right ? (befor, I'd like to test on
> opesips DB):
>
> modparam("avpops","db_url","mysql://opensips:opensipsrw@localhost/opensips")
> modparam("avpops","avp_table","subscriber")
>
> modparam("uac", "auth_username_avp", "$avp(i:1)")
> modparam("uac", "auth_password_avp", "$avp(i:2)")
> modparam("uac", "auth_realm_avp", "$avp(i:3)")
>
> avp_db_query("SELECT username, password, realm FROM subscriber WHERE where
> username='$tu'", "$avp(i:1);$avp(i:2);$avp(i:3)");
>
> can anyone help me please ?.
>
> Thanks.
>
> Sam.
>
--
Bogdan-Andrei Iancu
www.voice-system.ro
More information about the Users
mailing list