[Devil Linux]: SIP support

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
Site Admin
Posts: 1469
Joined: Fri Aug 29, 2003 8:39 pm

[Devil Linux]: SIP support

Post by ^rooker »

Right now (and I mean RIGHT now) I am trying to set up my very first SIP proxy.

Luckily, there's SER (SIP Express Router) already installed there, so I'm hoping to be successful quite fast.

First of all, there's the MySQL to be configured in order to contain future usernames:


For some strange reason, the data-dir is set to "/usr/var" which doesn't exist in this distro, and I don't think we need InnoDB support - so some things need a change:

edit /etc/my.cnf and add those 2 lines:
1) Make sure that your computer's hostname can be looked up.
2) mysql_install_db
3) chown -R mysql /var/db
4) mysqladmin -u root password 'your_password'
5) ser_mysql.sh create
User avatar
Site Admin
Posts: 1469
Joined: Fri Aug 29, 2003 8:39 pm

Starting SER

Post by ^rooker »

Now the database should be ready to contain our SER users, so let's modify /etc/ser/ser.cfg to fit our needs:

(This is now almost taken as-is from a SER HowTo at "iptel.com")
Now that we have a working MySQL database, we need to modify the configuration file for ser, located on a RedHat, installed in /etc/ser/ser.cfg. The following changes need to be made:

To enable support for the new MySQL database we need to load the appropriate module. That is accomplished by uncomment this line:

loadmodule "/usr/lib/ser/modules/mysql.so

Next we need to set SER to use the database and write changes instead of just caching them in memory. This is done by means of commenting this line:

modparam ("usrloc", "db_mode", 0)

And uncomment this line:

modparam ("usrloc", "db_mode", 2)

Note on db_modes:


Mode 0

Disables writes to the database. Contact information will not be preserved if the server is restarted.

Mode 1

Writes all changes to the database immediately. Contact information is saved to the database immediately. This can slow the response to clients as they connect.

Mode 2

Periodically writes contact information to the database based in the in memory cache.

To enable digest authentication we additionaly need to uncomment the following two lines:

loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_db.so"

We have the option of storing passwords in our database in plain text. This allows for password recovery and makes the initial setup and testing easier. To enable this feature uncomment these lines:

modparam ("auth_db", "calculate_ha1", yes)
modparam ("auth_db", "password_column", "password")

These lines work together. The first tells SER to generate a hash based on username, password and realm. The second tells SER where to look for the plain-text password in the database.

Lastly we need to update the routing section to recognize our realm.

Change (uri=="myself") to (uri=~"mydomain.com")

Uncomment these lines and change all instances of iptel.org to mydomain.com

if (!www_authorize("mydomain.com", "subscriber")) {
www_challenge("mydomain.com", "0");

We're now ready to restart ser.

/etc/init.d/ser restart
Post Reply