Child pages
  • Server configurations
Skip to end of metadata
Go to start of metadata

Here we are going to show how to configure common SIP severs to work with QoffeeSIP based products.

Kamailio SIP Server

NOTES

  • This guide was written using Debian GNU/Linux 7 (Wheezy) but you could easily adapt it to another distro. (we appreciate feedback)
  • Now, Kamailio stable (4.0) supports websockets so we're using official Debian repo of the project:

STEPS

  • Download and install GPG keys:
wget http://deb.kamailio.org/kamailiodebkey.gpg
apt-key add kamailiodebkey.gpg
  • Add repos to you sources.list: (We are using stable for Squeeze, but official doc includes repos for different versions of Kamailio and Ubuntu/Debian) (/etc/apt/sources.list)
deb http://deb.kamailio.org/kamailio wheezy main
deb-src http://deb.kamailio.org/kamailio wheezy main
  • Upgrade apt-get tree:
apt-get update
  • Search for kamailio packages and install desired modules and main packages. 
apt-cache search kamailio
apt-get install kamailio kamailio-websocket-modules kamailio-mysql-modules
  • Initial config, change next lines in /etc/kamailio/kamctlrc.
DBENGINE=MYSQL
SIP_DOMAIN=<SERVER_IP> 
  • Create needed databases, you have to answer "yes" to all questions made by the installer.
kamdbctl create
  • Now we need to configure Kamailio to use MYSQL authentication. (/etc/kamailio/kamailio.cfg file)
#!define WITH_MYSQL 
#!define WITH_AUTH
#!define WITH_USRLOCDB
  • Edit Kamailio default config file (/etc/default/kamailio)
RUN_KAMAILIO=yes
  • Finally, you can add some users/extensions: (default DB password is "kamailiorw")
kamctl add 100@<SERVER_IP> 100

At this point an instance of Kamailio should be running but it doesn't support websockets, we still have to add some lines to our kamailio.cfg file. The correct way to do it is to copy (and customize) these lines from configuration example provided with the module (examples/websocket.cfg). You should notice that it uses SQLite and we are doing it with MYSQL so you should change also one more line. We have published this Gist with a real example which works. You only have to change "SERVER_IP" for yours one like in all this guide. If you want GRUU support it's needed to add it arround line 363 (QoffeeSIP works in both cases):

modparam("registrar", "gruu_enabled", 1)

 

MAINTENANCE

You can upgrade Kamailio like any other Debian package now, only one thing, take a look to the default kamailio.cfg to see if any important change was made.

  • No labels