Hi Martin,
thanks for your reply.
with xlog("L_CRIT", "ACL: %$f.gw_acl"); I saw that AVP for user was
empty in PSTN route. I suppose that was because I loaded attributes
twice, first in AUTHENTICATION route and then again in PSTN route. When
I deleted loading of attributes in PSTN route it worked immedeatly.
And yes, if (!$f.gw_acl=="1") is working also :)
Sorry for trouble, and thanks again
/davor
Martin Hoffmann wrote:
Davor Jovanovic wrote:
I'm using SER2.0 (testing) and I have a
question regarding checking the
acl AVP to verify that the user is allowed to call PSTN destinations
with if (!$f.gw_acl=="1") { ...
In the "user_attrs" table I have this entry:
uid name value type flags
alice(a)xyz.hr gw_acl 1 2 61
before checking this "gw_acl" I do load attributes with
load_attrs("$fu", "$fu.uid"); but I keep entering above
"if" statement.
So I would appreciate any help about how to solve this issue, in which
tables I need to enter which values...
Seems like this should work. I would try to turn this into
if ($f.gw_acl != "1") {
just for having tryied it. Otherwise, maybe you can check the value
of the attribute by calling
xlog("L_CRIT", "ACL: %$f.gw_acl");
Then at least you know if the problem lies in loading the attribute or
in the if construct.
HTH and regards,
Martin