For some reason I cannot get allow_trusted() to evaluate to true for a matching URI.
Relevant sections of the config (OpenSER 1.1): modparam("auth_db|permissions|uri_db|usrloc|domain", "db_url", "mysql://username:password@localhost/ser") modparam("permissions", "db_mode", 0) modparam("permissions", "trusted_table", "trusted") route { if (!allow_trusted()) { xlog("!allow_trusted. rs $rs si $si rm $rm ru $ru tu $tu fu $fu rr $rr"); }; }
The trusted table contains the following: +----------------+-------+--------------+------+ | src_ip | proto | from_pattern | tag | +----------------+-------+--------------+------+ | 202.200.20.200 | any | NULL | NULL | +----------------+-------+--------------+------+ 1 row in set (0.00 sec)
I can see that the following query is being executed: select proto,from_pattern,tag from trusted where src_ip='202.200.20.200'
But no match is made because the log file shows: Dec 17 15:37:56 beta /usr/local/sbin/openser[7209]: !allow_trusted. rs <null> si 147.200.20.200 rm INVITE ru sip:5551234@147.200.20.200 tu sip:5551234@147.200.20.200 fu sip:021446202@202.200.20.200 rr <null>
Could anyone provide any suggestions on what I'm doing wrong?
Regards
Cameron