Thanks Fred, attached is the portion of the config file where I am doing the check. Also,
can you let me know what you mean by "trying any number to your system"? Thank
you.
if (uri=~"sip:1[2-9][0-9]+@.*") {
if (!is_user_in("From",
"ld") && !is_user_in("To", "ld")) {
#Initally the above line was if
(!is_user_in("From", "ld") )
xlog("LOG: PSTN call but user
don't have permissions\n");
sl_send_reply("403", "No permission for
long dist calls_here_is_the error");
exit;
}
}
}
# only local users allowed to call
# if((from_uri!=myself)) {
# sl_send_reply("403", "Not Allowed");
# exit;
# }
Regards,
Arun
________________________________
From: Fred Posner <fred(a)palner.com>
To: sr-users(a)lists.sip-router.org
Sent: Monday, February 10, 2014 3:08 PM
Subject: Re: [SR-Users] Call forwarding from external did
On 02/10/2014 04:00 PM, arun Jayaprakash wrote:
Hello, I have set up call forwarding in Kamailio using
user_preference
table. When I make a call from a local extension the callfwd funcition
works. The call gets forwarded to an external did number. The problem
happens when and external call ( from a DID) comes to this extension the
call does not get forwarded. I had to comment out the following lines in
the config file to make it work:
# only local users allowed to call
# if((from_uri!=myself)) {
# sl_send_reply("403", "Not Allowed");
# exit;
# }
My question is if it is a risky think to comment out these lines? If so,
what are my options.
Thank you,
Arun
In short, yes, it is risky-- but in honesty, noone can tell from just
that portion of the config.
You can test this perhaps by trying any number to your system. Is it
also being forwarded?
A good way is to add a flag and check for the presence of that flag if
allowing a non-registered user to make an outside call.
Fred Posner, @qxork
http://palner.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users