Hi all,
I am attempting to only reply to NOTIFY when the request is originating from a user/device that is authenticated on kamailio already. There are 2 ways I've tried (below) but neither will work.
Any idea on what I am doing wrong or suggestions on how to do it right?
TIA, Skyler
if(is_method("NOTIFY") && is_registered("location")) { route(ROUTE_NOTIFY); }
OR ....
if(is_method("NOTIFY")) { # We only reply OK if coming from authenticated users or trusted peers if(!registered("location") || !from_any_gw("$avp(s:ip)")) { sl_send_reply("503", "Service Unavailable"); exit; }
xlog("L_INFO", "Friendly Peer Poke - M=$rm F=$fu R=$ru\n"); sl_send_reply("200", "OK"); exit; }