Migration from 2.3.x to 2.4.x
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.
DB migration
Section titled “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_4where :
- 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
Script migration
Section titled “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):
Global Parameters
Section titled “Global Parameters”- poll_method: epoll_et and epoll_lt keywords have been replaced with the epoll keyword (which behaves as old epoll_lt).
Core keywords
Section titled “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.
- removed af keyword along with INET, INET6 core values, use the new
$afcore variable instead and test it’s value against “INET” or “INET6” string values; - removed dst_ip and src_ip, use
$Riand$sicore variables instead; - removed dst_port and src_port, use
$Rpand$spcore variables instead; - removed uri, from_uri and to_uri, use
$ru,$fuand$tucore variables instead; - removed method, use
$rmcore variable instead; - removed status, use
$rscore variable instead; - removed proto keyword along with UDP, TCP, WS, etc. core values, use
$pr/$protocore 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
$mlcore variable instead.
Core MI commands
Section titled “Core MI commands”- the output format of MI cache_fetch has changed. It is easier to parse now, but backwards-incompatible nevertheless!
Statistics migration
Section titled “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.
Module migration
Section titled “Module migration”CACHEDB_REDIS
Section titled “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.
CGRATES
Section titled “CGRATES”- The old
$cgrretvariable has been deprecated - it’s behavior has been replaces by the newly added$cgr_ret(name)variable. Replace in your script all$cgrrettokens 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.
CLUSTERER
Section titled “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.
DIALOG
Section titled “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.
DROUTING
Section titled “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.
FRAUD_DETECTION
Section titled “FRAUD_DETECTION”- the module now uses local time instead of UTC time. The former behavior can be restored by enabling use_utc_time.
LOAD_BALANCER
Section titled “LOAD_BALANCER”- reduce the replication related module parameters: accept_replicated_status and replicate_status_to to a single parameter: status_replication_cluster.
RATELIMIT
Section titled “RATELIMIT”- reduce the replication related module parameters: accept_pipes_from and replicate_pipes_to to a single parameter: pipe_replication_cluster.
TOPOLOGY_HIDING
Section titled “TOPOLOGY_HIDING”-
- topology_hiding_match() does NOT do DID_FALLBACK matching by default anymore, and will inherit the matching behavior of the dlg_match_mode modparam
STATISTICS
Section titled “STATISTICS”- the behavior for script-defined statistics which include multiple ”:” symbols (e.g. “method:register:auth”) has changed. Read this commit for more info