Hi,
Here is a tricky sample config to check if a user is calling from a
registered device and if not, deny the call:
$var(temp) = $ruri;
$ruri = $fu;
if(!registered("location")) {
sl_send_reply("403","Forbidden auth ID");
xlog("<ARIF> Not Found\n");
exit;
}
$ruri = $var(temp);
Thanks,
ARIF
-----Original Message-----
From: users-bounces(a)lists.kamailio.org
[mailto:users-bounces@lists.kamailio.org] On Behalf Of Juha Heinanen
Sent: Sunday, October 19, 2008 3:44 PM
To: users(a)lists.kamailio.org
Subject: Re: [Kamailio-Users] Check if a user is calling from
aregistereddevice and if not, deny the call!
Arif-Uz-Zaman writes:
I've already tested with the following config but
no luck. Since the
following config check only whether callee is registered or not. Not the
caller.
if(!registered("location")) {
sl_send_reply("403","Forbidden auth ID");
exit;
}
indeed the function should take a pseudo variable that contains aor used
for checking.
Is there any other suggestions?
save r-uri, store caller's aor to r-uri and call the above function.
then restore r-uri.
-- juha
_______________________________________________
Users mailing list
Users(a)lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users