In this chapter, you will learn how to use the database backends to authenticate the SIP requests and save data such as location and aliases tables. We will use MySQL as the reference database, but most examples can be easily adapted to any other supported database. This chapter is divided in two parts. In the first one, you will learn how to implement the authentication, and in the second one, you will learn how to deal with calls in each direction.
In this chapter, we will cover the following topics:
Configuring MySQL for the authentication
Using the
opensipsctl
utility for basic operations such as adding usersChanging the
opensips.cfg
script to connect to a databaseImplementing the persistence for the location tables
Implementing the aliases tables
Using the group module and ACL to authorize resources
Authenticating users by their IP addresses using the permissions module
Restarting the server without losing the location records
Dealing correctly with inbound...