Hi, in order to implement a ACL system for incoming calls I've
created a table "acl" with those columns:
- priority
- from_username
- from_domain
- to_username
- group_from
- group_to
- type | action
In that tables I store rules, and my idea is to work as a firewall:
the first match is ejecuted (action=ALLOW or action=REJECT) and exit.
But I can't do it since I don't know how to use all the AVP's JUST
for the first row, then for the second:
avp_db_query("SELECT
priority,from_username,from_domain,to_username,group_from,group_to,type,action FROM
acl",
"$avp(s:priority);$avp(s:from_username);$avp(s:from_domain);$avp(s:to_username);$avp(s:group_from);$avp(s:group_to);$avp(s:type);$avp(s:action)");
This query results in many rows, but I can't analize each row, I just
can compare each AVP with a value, but for that AVP they are possible
all the values of any row.
Because this I'm thinking in using the "exec" module to call a system
script. Is not possible to access to tjhe query result by rows?
Thanks for any help.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es