Hello
Is there a built in function that can check to see if a user exists (not registered). I have a need to send different error codes depending on whether a phone number is unallocated or it is allocated but not registered. What I require is this
if (!lookup("location")) { if (user does not exist) { sl_send_reply ("604", "Does not exist anywhere"); break; } else { sl_send_reply ("404", "Not Found"); break; }; };
if (!t_relay()) { sl_reply_error(); };
Thanks Luke
Luke Gasteiger writes:
Is there a built in function that can check to see if a user exists (not registered).
i have such a function in my radius_auth module. i call it after lookup fails in order to find out if the request uri belongs to an existing user.
if (!lookup("location")) { if (radius_does_uri_exist()) { sl_send_reply("480", "Temporarily Unavailable"); break; }; sl_send_reply("404", "Not Found"); break; };
i don't know if that function will be part of the coming, new official radius_auth module.
-- juha
i have such a function in my radius_auth module. i call it after lookup fails in order to find out if the request uri belongs to an existing user.
if (!lookup("location")) { if (radius_does_uri_exist()) { sl_send_reply("480", "Temporarily Unavailable"); break; }; sl_send_reply("404", "Not Found"); break; };
i don't know if that function will be part of the coming, new official radius_auth module.
Is the radius_auth module with that functionality available anywhere at this time?
Thanks Luke
On 30-03 11:51, jh@lohi.eng.song.fi wrote:
Luke Gasteiger writes:
Is the radius_auth module with that functionality available anywhere at this time?
it is included in uri_radius module of the cvs.
It will be included in the upcomming release. I will include all your radius related functions, even those that are not standardized because I think that other people using radius might find them useful.
I also split the modules, now there are separate modules for authentication, group membership checking and URI checking. I prefer many smaller modules than one huge containing everything.
As there are now 3 radius related modules, I also extended modparam command so it will be not necessarry to configure them separately. New modparam supports regular expressions as the module name so it is possible to do something like this:
modparam(".*radius.*", "radius_config", "/etc/radiusclient.conf")
and it will configure all loaded radius modules to use proper config file.
Jan.