Hi, I set:
------------------------------------------- dst_blacklist = gw:{( any , GW_IP, 0 , "" )}
[...] t_on_branch("ON_BRANCH_TO_USER");
if (!lookup("location")) { if ($rc == -5) xlog("L_WARN", "WARN: Fraudulent Contact !!! \n"); sl_send_reply("404", "Not Registered"); exit; }
t_relay();
[...]
branch_route[ON_BRANCH_TO_USER] { use_blacklist("gw"); } -------------------------------------------
I do a fraudulent REGISTER for an AoR (with GW_IP in "Contact" header) and when calling that AoR I get a correct "473 Filtered destination". But I don't see the WARN, so "lookup(location)" didn't reply -5. Why not? the IP in Contact column for taht AoR is GW_IP, why "lookup(location)" doesn't realize of it?
It supposed that "lookup()" returns -5 if the destination is filtered (black listed): http://www.openser.org/docs/modules/1.3.x/tm.html#AEN336
Maybe it's a bug?