User Tools

Site Tools


Upgrade Kamailio from v5.0.x to v5.1.0 (stable)

The page contains the details about the changes that were made to old components during the development of v5.1.0 compared with what existed in v5.0.x. It does not include the brand new modules, focusing on how to upgrade database and configuration file from v5.0.x to run with Kamailio v5.1.0.

Previous Stable Release

If you look for the guidelines to upgrade to previous stable release, see:


Following tokens are used to mark the changes:

  • INF - the change doesn't really have any direct impact - no action required in old config
  • CPM - the change was used with the new value via explicit parameter in default config file from old releases
  • RCM - the change is recommended to be done if you had an explicit different or lower value for this parameter in old config


Removed Modules

  • none

Renamed Modules

  • acc_diameter has been split for acc module

Internal Libraries

  • no major change that impacts the configuration file



  • no major change that impacts the configuration file


  • increased size of dialplan table repl_exp field to 256 chars

MySQL Database Structure

Run following SQL statements in MySQL client to upgrade database structure from v5.0 to v5.1:

ALTER TABLE lcr_rule ADD COLUMN mt_tvalue VARCHAR(128) DEFAULT NULL AFTER request_uri;
UPDATE version SET table_version=3 WHERE TABLE_NAME='lcr_rule';
UPDATE version SET table_version=9 WHERE TABLE_NAME='location';
ALTER TABLE active_watchers CHANGE COLUMN reason reason VARCHAR(64) DEFAULT NULL; -- # was varchar(64) NOT NULL
ALTER TABLE domain_attrs DROP INDEX domain_attrs_idx; -- # was UNIQUE (did,name,value)
ALTER TABLE domain_attrs ADD INDEX domain_attrs_idx (did,name);
-- ALTER TABLE lcr_rule ADD COLUMN mt_tvalue varchar(128) DEFAULT NULL;
-- ALTER TABLE location CHANGE COLUMN contact contact varchar(512) NOT NULL DEFAULT ''; # was varchar(255) NOT NULL DEFAULT ''
ALTER TABLE topos_d ADD INDEX a_uuid_idx (a_uuid);
ALTER TABLE topos_d ADD INDEX b_uuid_idx (b_uuid);
ALTER TABLE topos_t ADD INDEX x_vbranch_idx (x_vbranch);
ALTER TABLE topos_t ADD INDEX a_uuid_idx (a_uuid);
install/upgrade/5.0.x-to-5.1.0.txt · Last modified: 2017/12/09 09:30 by miconda