A database is needed to support a number of functions within ser. Namely authentication and accounting. In our configuration we have used MySQL, other databases can be supported but will require a different setup.
We are assuming that you have a working MySQL database with a root password. Of course, you will also need the development MySQL package loaded as it contains the header files for the source code.
To support MySQL, three steps are needed :-
Modify the source, rebuild and reinstall the binaries
Modify MySQL to support the database and tables needed
Modify the ser.cfg to use the database
All the source has already been loaded, what we need to change is the Makefile so that we now include the MySQL module. Edit the file src/sip_router/Makefile and at the line starting exclude_modules= remove the reference to mysql. Save the file and then recompile the code with the command make all. Reinstall the binaries by taking root privileges and executing make install.
MySQL needs to be modified to support the SER database and tables. Again take on root privileges and execute make dbinstall. You will be asked for the root MySQL password and also the realm that you want. This is configurable, but normally you use the IP address of the sip server.
Now replace the ser.cfg file with the one that supports MySQL and restart the sip server.