– Kamailio SIP Server –

Migrating OpenSER v1.3.x to Kamailio v1.4.0

Due to trademark issues, on July 28, 2008, OPENSER was renamed to KAMAILIO.

At the end of the document is the part presenting new things in v1.4.0.

Renaming Matrix

The relation between old and new names of the files provided by KAMAILIO (OPENSER).

Old Name New Name Description
openser kamailio Binary of the SIP routing application
openser.cfg kamailio.cfg Configuration file
openserctl kamctl Command line tool for management
openserdbctl kamdbctl Command line tool to create and manage database
openserctlrc kamctlrc Configuration file for command line tools
openser.8 kamailio.8 Man page
openser.cfg.5 kamailio.cfg.5 Man page for configuration file

Changes in the configuration file

Preserve configuration files

After installation of Kamailio (OPENSER) 1.4.0 from packages

* move /etc/openser/openser.cfg to /etc/kamailio/kamailio.cfg * move /etc/openser/openserctlrc to /etc/kamailio/kamctlrc

If installed from sources:

* move /usr/local/etc/openser/openser.cfg to /usr/local/etc/kamailio/kamailio.cfg * move /usr/local/etc/openser/openserctlrc to /usr/local/etc/kamailio/kamctlrc

Updates in configuration file

* change path to modules

# when installed from packages
old value: mpath="/usr/lib/openser/modules"
new value: mpath="/usr/lib/kamailio/modules"

# when installed from sources
old value: mpath="/usr/local/lib/openser/modules"
new value: mpath="/usr/local/lib/kamailio/modules"

Note: if you use a 64bit architecture, replace 'lib' with 'lib64' in above paths.

* update the name of database modules. These module have now the format: db_name - where name is the database driver name, e.g., mysql, postgres, unixodbc, berkeley, etc.

# for mysql
old value: loadmodule "mysql.so"
new value: loadmodule "db_mysql.so"
# for postgres
old value: loadmodule "postgres.so"
new value: loadmodule "db_postgres.so"

Module parameters for database URL have still the format

"driver://username:password@host/database"
old value: modparam("auth_db", "db_url", "mysql://openser:openserrw@localhost/openser"
new value (the same): modparam("auth_db", "db_url", "mysql://openser:openserrw@localhost/openser"

Updates in database scheme

The following SQL statements (for MySQL) can be used to convert a 1.3.x database to the new scheme. Please not that new tables (e.g. for carrierroute, diaplan or others are ommited at the moment.)

UPDATE version SET table_version=2 WHERE table_name='carrierroute';
UPDATE version SET table_version=2 WHERE table_name='dispatcher';
UPDATE version SET table_version=7 WHERE table_name='gw';
UPDATE version SET table_version=3 WHERE table_name='presentity';
UPDATE version SET table_version=6 WHERE table_name='pua';
UPDATE version SET table_version=2 WHERE table_name='siptrace';

ALTER TABLE carrierroute ADD flags INT(11) UNSIGNED DEFAULT 0 NOT NULL AFTER scan_prefix;
ALTER TABLE carrierroute ADD mask INT(11) UNSIGNED DEFAULT 0 NOT NULL AFTER flags;
ALTER TABLE carrierroute CHANGE comment description VARCHAR(255) DEFAULT NULL;

ALTER TABLE route_tree DROP PRIMARY KEY;
ALTER TABLE route_tree CHANGE id id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL;

ALTER TABLE dispatcher ADD flags INT DEFAULT 0 NOT NULL AFTER destination;

ALTER TABLE domainpolicy CHANGE comment description VARCHAR(255) NOT NULL;

ALTER TABLE gw CHANGE prefix tag VARCHAR(16) DEFAULT NULL;
ALTER TABLE gw CHANGE dm flags INT UNSIGNED DEFAULT 0 NOT NULL;

ALTER TABLE presentity ADD sender VARCHAR(128) NOT NULL;

ALTER TABLE pua ADD remote_contact VARCHAR(128) NOT NULL AFTER contact;

ALTER TABLE re_grp CHANGE group_id group_id INT(11) DEFAULT 0 NOT NULL;

ALTER TABLE sip_trace CHANGE date time_stamp DATETIME DEFAULT '1900-01-01 00:00:01' NOT NULL;

New in v1.4.0

New in Kamailio(OpenSER) modules

* acc module extension: it is possible to log accounting related output to a different log facility * cfgutils module new FIFO functions get_config_hash and check_config_hash for config file checks shared PV exported to configuration script debugging helpers usable from config script for abort, shm_status and pkg_status * mysql module extension: enable timeouts on connect, read and write to prevent blocking on errors * database modules renaming of all database modules, addition of the prefix 'db_', e.g. mysql is now db_mysql * ratelimit module (new module ported from ser with openims enhancements) suitable for traffic shaping control and server load control *carrierroute module extension: much more flexibility in routing and database supported failure routing, improved internal structure *dialog module internal API reworked for better flexibility direction of the message provided via the internal API new dialog callback types: * DLGCB_LOADED * DLGCB_DESTROY * DLGCB_RESPONSE_WITHIN * DLGCB_MI_CONTEXT new mi command: dlg_list_ctx *enum module enum_fquery([…]) replaced by enum_pv_query(“$fU”[,…]) *db_oracle module new database module for native access of oracle databases *userblacklist module new module for user specific and global URI blacklists * msilo module notification system refurbished - message body, content-type, from address and contact header can be dynamically specified with pseudo-variables * pdt module accepts now same destination domain bound to different prefixes internal structures and logic optimized for memory and performance * lcr module refactor module functions add pseudo-variable support remove gw_grp table * peering module new module for radius setups allowing SIP providers to verify via a broker if source or destination request is from a trusted peer * new mediaproxy module update to version 2.0 ** better performance and scalability as packets are forward in kernel space

New in Kamailio(OpenSER) core

* Overhauled DB API – uses now the 'str' datatype for more performance and safety, more common functionality integrated in the core * Extensive cleanups in database drivers – integrate common functionality into the core for more stability and maintainability * SDP parser – provides an internal API for parsing SDP * fixup functions – provides an internal API for fixing module parameters * extended module interface – its now possible to use up to 6 parameters in module functions

New in Kamailio(OpenSER) utilities

* Removal of SERWEB – the SERWEB specific parts were removed from the openserdbctl, openserctl and the database schemes * openserctl for dbtext – add SQL support to dbtext using a python module and integrate it into openserctl to better support this database

New in Kamailio(OpenSER) documentation

* Module documentation – the module documentation was migrated to the docbook-xml infrastructure * Developer guide – a developer guide has been added to repository

New in Kamailio(OpenSER) Testing Suite

* Stability improvements – better checks for available modules and necessary tools * Extensions – test more modules, tests for other databases beside MySQL

dissertation editing