Kamailio (former OpenSER) is an Open Source SIP Server released under GPL, able to handle thousands of call setups per second. Among features: asynchronous TCP, UDP and SCTP, secure communication via TLS for VoIP (voice, video), SIMPLE instant messaging and presence, ENUM, least cost routing, load balancing, routing fail-over, accounting, authentication and authorization against MySQL, Postgres, Oracle, Radius, LDAP, XMLRPC control interface, SNMP monitoring. It can be used to build large VoIP servicing platforms or to scale up SIP-to-PSTN gateways, PBX systems or media servers like Asterisk, FreeSWITCH or SEMS.
This document will be a quick c/p guide to setup Kamailio 3.1.1 on Alpinelinux 2.1, and assume that you have already installed the alpinelinux base system.
- 1 Upgrade Installation
- 2 Install Postgresql
- 3 Install SIP Router (Kamailio)
- 4 Create a few SIP ROUTER users (extensions)
- Setup postgresql
Direct logging information to syslog
The default behavior is to log activity to postmaster.log without rotation. This can result in large log files filling the ramdisk. Edit the postgresql.conf file to enable logging information to be sent to syslog (logs will appear in /var/log/messages which is rotated and older logs are automatically deleted).
The following command will update the file correctly.
Start postgresql and enable auto start
Create file for Kamailio to start after pg-restore when booting:
Install SIP Router (Kamailio)
Configuration of Kamailio
Edit the kamctlrc file - uncomment and/or change the following variables. Please note that in your production environment it is recommended that usernames and passwords be customized (defaults as used below should be avoided if at all possible) for added security.
Create the Kamailio database
Start Kamailio and setup for auto start on reboot
Create a few SIP ROUTER users (extensions)
Xlite (or other Software-based IP Phone) can be used for this preliminary test. You can register a soft-phone or sip-phone with the account "5000" and password "5000", using the SIP-Router aip as "domain" and other one with 5001 and call each other.