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@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