I am trying to bring up the anthentication module. Here are the list of what I have done.
1. Create MySQL tables and modify the permissions (SER could connect MySQL successfully) 2. Modify SER configuration (See below)
loadmodule "//usr/lib/ser/modules/mysql.so" loadmodule "//usr/lib/ser/modules/auth.so" modparam("usrloc", "db_url", "sql://ser:heslo@localhost/ser") modparam("usrloc", "db_mode", 2) modparam("auth", "db_url", "sql://ser:heslo@localhost/ser") modparam("auth", "user_column", "user_id") modparam("auth", "calculate_ha1", yes) modparam("auth", "password_column", "password")
if (uri=~"sip.abcd.com") { if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication if (!www_authorize("sip.abcd.com", "subscriber")) { www_challenge("sip.abcd.com", "0"); break; };
save("location"); break; };
After all these changes, SER could start without problem. But it seems that the Auth module doesn't take effect. For whatever username/password (whether it's included in the subscriber table or not), SER just allow the registration.
What maybe the problem? Is there anything wrong with the configuration?
Thanks.