Try setting from_pattern and tag to non-NULL values (empty is fine, but
not NULL).
Saúl Ibarra wrote:
Hi all,
I'm a little stuck here :-/ I can't get allow_trusted function from
the premissions module to word. I'm receiving the following error:
May 26 18:36:24 [18825] DBG:core:parse_msg: method: <PUBLISH>
May 26 18:36:24 [18825] DBG:core:parse_msg: uri:
<sip:saghul@10.69.69.1:5070>
May 26 18:36:24 [18825] DBG:core:parse_msg: version: <SIP/2.0>
May 26 18:36:24 [18825] DBG:core:parse_headers: flags=2
May 26 18:36:24 [18825] DBG:core:parse_via_param: found param type
232, <branch> = <z9hG4bK1f7d.e63e45e5.0>; state=16
May 26 18:36:24 [18825] DBG:core:parse_via: end of header reached,
state=5
May 26 18:36:24 [18825] DBG:core:parse_headers: via found, flags=2
May 26 18:36:24 [18825] DBG:core:parse_headers: this is the first via
May 26 18:36:24 [18825] DBG:core:receive_msg: After parse_msg...
May 26 18:36:24 [18825] DBG:core:receive_msg: preparing to run routing
scripts...
May 26 18:36:24 [18825] DBG:core:parse_headers: flags=100
May 26 18:36:24 [18825] DBG:core:parse_via_param: found param type
234, <received> = <10.69.69.2>; state=6
May 26 18:36:24 [18825] DBG:core:parse_via_param: found param type
235, <rport> = <5060>; state=6
May 26 18:36:24 [18825] DBG:core:parse_via_param: found param type
232, <branch> = <z9hG4bKqtsklyyn>; state=16
May 26 18:36:24 [18825] DBG:core:parse_via: end of header reached,
state=5
May 26 18:36:24 [18825] DBG:core:parse_headers: via found, flags=100
May 26 18:36:24 [18825] DBG:core:parse_headers: parse_headers: this is
the second via
May 26 18:36:24 [18825] DBG:maxfwd:is_maxfwd_present: value = 69
May 26 18:36:24 [18825] ERROR:permissions:allow_trusted_2: unknown
protocol udp
Configuration is realli simple:
modparam("permissions", "db_url", "mysql://...")
modparam("permissions", "db_mode", 1)
modparam("permissions", "trusted_table", "trusted")
if (!allow_trusted("$si", "$proto")) {
xlog("L_INFO","\n\n--NOT trusted! - $si - $proto");
sl_send_reply("403", "Forbidden");
exit;
}
The trusted table seems OK:
mysql> select * from trusted;
+----+------------+-------+--------------+------+
| id | src_ip | proto | from_pattern | tag |
+----+------------+-------+--------------+------+
| 1 | 10.69.69.1 | any | NULL | NULL |
+----+------------+-------+--------------+------+
What am I doing wrong?
Thanks in advance!! Regards,
--
Alex Balashov
Evariste Systems
Web :
http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (678) 237-1775