Now the configuration is ready to authenticate the REGISTER
transactions. We can save the AOR in the location table to achieve persistence. This allows us to restart the server without losing the AOR records and affecting UACs. The configuration file will show the modules that have been loaded, their respective parameters, and the main sections of the code related to this chapter.
To make the authentication work, it is necessary to load the following modules:
loadmodule "db_mysql.so" loadmodule "auth.so" loadmodule "auth_db.so"
The MySQL support is added easily by including db_mysql.so
in the list of loaded modules. MySQL should be loaded before the other modules. The authentication capability is provided by the auth.so
and auth_db.so
modules. These modules are required to enable the authentication functionality:
modparam("auth_db", "calculate_ha1", 1) modparam("usrloc", "db_mode", 2)
The calculate_ha1
parameter tells the auth_db
module to use plaintext passwords...