Documentation -> Migration -> Migration from 2.3.x to 2.4.x
This page has been visited 11679 times.
This section is meant to provide useful help in migrating your OpenSIPS installations from the 2.3.0 version to 2.4.x.
You can find the all the new additions in the 2.4.x 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.x 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 2.4 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.
2.3 Core MI commands
- the output format of MI cache_fetch has changed. It is easier to parse now, but backwards-incompatible nevertheless!
2.4 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
- OpenSIPS startup no longer gets aborted if any of the Redis servers are down. To restore the old behavior, set the new shutdown_on_error modparam to 1.
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 CLUSTERER
- the ls_seq_no and top_seq_no columns from the clusterer table were removed and are no longer required for the topology establishing mechanism.
3.4 DIALOG
- match_dialog() does NOT do DID_FALLBACK matching by default anymore, and will inherit the matching behavior of the dlg_match_mode modparam
- reduce the dialog replication related module parameters: accept_replicated_dialogs and replicate_dialogs_to to a single parameter:
dialog_replication_cluster.
- reduce the profile replication related module parameters: accept_replicated_profiles and replicate_profiles_to to a single parameter:
profile_replication_cluster.
3.5 DROUTING
- gateway type 0 has been fixed: it no longer erroneously matches all types. This is relevant for you if you use something like is_from_gw(partition, type)
- reduce the replication related module parameters: accept_replicated_status and replicate_status_to to a single parameter: status_replication_cluster.
3.6 FRAUD_DETECTION
- the module now uses local time instead of UTC time. The former behavior can be restored by enabling use_utc_time.
3.7 LOAD_BALANCER
- reduce the replication related module parameters: accept_replicated_status and replicate_status_to to a single parameter: status_replication_cluster.
3.8 RATELIMIT
- reduce the replication related module parameters: accept_pipes_from and replicate_pipes_to to a single parameter: pipe_replication_cluster.
3.9 TOPOLOGY_HIDING
3.10 STATISTICS
- the behavior for script-defined statistics which include multiple ":" symbols (e.g. "method:register:auth") has changed. Read this commit for more info