[Asterisk-java-users] Account authorization?
Brought to you by:
srt
From: Cord <co...@tv...> - 2007-05-25 08:58:13
|
=0D=0AHello list! I'm quite new to programming Asterisk-Java. I wrote a servlet which successfully calls an originate action with the giv= en parameters. My problem is related to the setAccount method: I have to authenticate the account, so if the given password is not right, = I reject calling the originate, else I do it. I would like to achive the same funcionality, which is in the Asterisk2Bill= ing php goodness: function login ($user, $pass) {=20 =09global $DBHandle; =09[...]=09 =09$QUERY =3D "SELECT userid, perms, confaddcust, groupid FROM cc_ui_authen= WHERE login =3D '".$user."' AND password =3D '".$pass."'"; =09$res =3D $DBHandle -> query($QUERY); =09if (!$res) { =09=09$errstr =3D $DBHandle->ErrorMsg(); =09=09return (false); =09} =09[...] } =20 I don't understand PHP much, but I have read about the DB handling of aster= isk-java, but no clue how to match the user password. How can I access Asterisk's database, where can I read about the scheme, et= c. Thanks in advance! =09Attila |