Documentation -> Migration -> Migration from 2.3.x to 2.4.0
This page has been visited 622 times.
This section is meant to provide useful help in migrating your OpenSIPS installations from the 2.3.0 version to 2.4.0.
You can find the all the new additions in the 2.4.0 release compiled under this page. The ChangeLog may help your understanding of the migration / update process.
Make sure you don't have any Makefile.conf files in your sources' root before starting the migration. The configuration file generated by 'menuconfig is not compatible with the one in older version!
1. DB migration
You can migrate your 2.3.x MySQL DB to the 2.4.0 format by using the opensipsdbctl tool :
# opensipsdbctl migrate opensips_2_3 opensips_2_4
- opensips_2_3 is the existing DB name corresponding to version 2.3.x format
- opensips_2_4 is the DB name to be created for 2.4 format
- the old database will not be deleted, altered or changed - it will not be touched at all
- new database will be created and data from old DB will be imported into it
NOTE that the migration tool is available only for MYSQL databases!
NOTE that the default MySQL DB engine is now InnoDB!
Back to Table of Contents
2. Script migration
The following is the full list of backwards-incompatible syntax or functional changes in the OpenSIPS configuration script (some of them are fixes):
2.1 Global Parameters
- poll_method: epoll_et and epoll_lt keywords have been replaced with the epoll keyword (which behaves as old epoll_lt).
2.2 Core keywords
Removed the concept of core keywords. Some keywords were dropped entirely (as they were redundant) and others were replaced as functionality by other means (
new core function, new core variable etc.).
- removed myself, use the new is_myself() core function instead. NOTICE: The meaning of is_myself() is slightly different. Rather than comparing against a SIP URI as before, is_myself() now compares against a hostname, alias or IP which is given as a parameter. For example, !(uri == myself) is now equivalent to !is_myself("$rd"). This little migration detail may save you hours of script troubleshooting :)
- removed af keyword along with INET, INET6 core values, use the new $af core variable instead and test it's value against "INET" or "INET6" string values;
- removed dst_ip and src_ip, use $Ri and $si core variables instead;
- removed dst_port and src_port, use $Rp and $sp core variables instead;
- removed uri, from_uri and to_uri, use $ru, $fu and $tu core variables instead;
- removed method, use $rm core variable instead;
- removed status, use $rs core variable instead;
- removed proto keyword along with UDP, TCP, WS, etc. core values, use $pr/$proto core variable instead and test it's value against "udp", "tcp", "ws" etc. string values;
- removed msg:len keyword along with max_len core value, use $ml core variable instead.
3. Module migration