Login | Register

Documentation

Documentation -> Migration -> Migration from 2.3.x to 3.0.0

This page has been visited 275 times.


This section is meant to provide useful help in migrating your OpenSIPS installations from the 2.3.0 version to 3.0.0.

You can find the all the new additions in the 3.0.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 3.0.0 format by using the opensipsdbctl tool :

   # opensipsdbctl migrate opensips_2_3 opensips_2_4

where :

  • 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 3.0 format

NOTE:

  • 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.
  • the output format of MI cache_fetch has changed. It is easier to parse now, but backwards-incompatible nevertheless!

2.3  Statistics migration

Following the rework of the LOAD reporting, the old load related statistics tcp-load and udp:int_ip:int_port-load should be replaced with load or load-all statistics.

3.  Module migration

3.1  CACHEDB_REDIS

  • a8db3e45cdf

3.2  CGRATES

  • The old $cgrret variable has been deprecated - it's behavior has been replaces by the newly added $cgr_ret(name) variable. Replace in your script all $cgrret tokens with $cgr_ret.
  • The new module uses by default the SessionSv1 cgrates interface. In order to use the old SMGenericV1 interface, you must set the compat_mode parameter to 1.

3.3  DROUTING

  • c0cdc66b2fe90

3.4  STATISTICS

  • 92de4ffc060e

Page last modified on March 28, 2018, at 02:33 PM