Migration from 3.1.x to 3.2.0
This section is meant to provide useful help in migrating your OpenSIPS installations from the 3.1.0 version to 3.2.0.
You can find the all the new additions in the 3.2.0 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 3.1.x MySQL DB to the 3.2.x format using the opensips-cli tool :
$ opensips-cli -x database migrate 3.1_to_3.2 opensips_3_1 opensips_3_2where :
- opensips_3_1 is the existing DB name corresponding to version 3.1.x format
- opensips_3_2 is the DB name to be created for 3.2.x format
See the opensips-cli documentation for more details.
Script migration
Section titled “Script migration”The following is the full list of backwards-incompatible syntax or functional changes in the OpenSIPS configuration script:
- example
Global Parameters
Section titled “Global Parameters”- example
Core Variables
Section titled “Core Variables”- (only for 3.2.4 or earlier) the
$rTpseudo-variable (topmost route type) has been replaced by$route(route call stack). The equivalent syntax is$(route[-1]{s.select,0,[}). The$rTvariable has been re-introduced starting with 3.2.5, for backwards-compatibility reasons.
Core keywords
Section titled “Core keywords”- example
Core functions
Section titled “Core functions”- example
Core MI commands
Section titled “Core MI commands”- example
Statistics migration
Section titled “Statistics migration”- example
Module migration
Section titled “Module migration”ACC module
Section titled “ACC module”- The acc_created_avp_name parameter has been completely dropped, as it was no longer being used.
PROTO_TLS module
Section titled “PROTO_TLS module”- one of the tls_wolfssl or tls_openssl TLS library modules has to be loaded before tls_mgm
PROTO_WSS module
Section titled “PROTO_WSS module”- one of the tls_wolfssl or tls_openssl TLS library modules has to be loaded before tls_mgm
TLS_MGM module
Section titled “TLS_MGM module”- if the tls_mgm module is only used for the management of TLS certificates and parameters by modules like db_mysql, rabbitmq etc. (and not for TLS operations by transport modules like proto_tls etc.) then the new tls_library module parameter must be set to none. Otherwise, tls_mgm will not start unless you also load tls_openssl or tls_wolfssl, even though they are not actually used in this case.
B2B_LOGIC module
Section titled “B2B_LOGIC module”- the B2B scenario logic is now implemented via OpenSIPS scripting instead of XML files. Check this tutorial for more details and examples of XML scenarios and their equivalent OpenSIPS script implementation.
- In order to simplify the migration effort, you have the option to use a legacy b2b_logic_xml module, that will be obsoleted with the next OpenSIPS 3.3 release. Use this only as a temporary solution until you properly migrate to the new variant of the b2b_logic_module.
CFGUTILS module
Section titled “CFGUTILS module”- the time_string parameter of check_time_rec() has been extended with a leading timezone field. Although we made strings such as “20200101T…|…” backwards-compatible with the current implementation, strings such as “|20200101T…” will now break your logic unless you prepend your input with the “timezone |” string. To use the system timezone, just prepend an empty-string timezone followed by the delimiter, i.e. ”|”.
- time recurrences: the byyearday, bymonth and byweekno integers are now 1-indexed instead of 0-indexed (per RFC 5545)! Make sure to convert any such data accordingly, otherwise your time recurrence strings will no longer match as expected following an upgrade to 3.2
DIALPLAN module
Section titled “DIALPLAN module”- the timerec column syntax has been normalized. Firstly, the “dtend” field has been added, so the final column value has been made compatible with the input of check_time_rec(). Secondly, the leading “timezone” field has been added, so it must be prepended accordingly — in order to keep using the system timezone, just prepend a ”|” string.
- time recurrences: the byyearday, bymonth and byweekno integers are now 1-indexed instead of 0-indexed (per RFC 5545)! Make sure to convert any such data accordingly, otherwise your time recurrence strings will no longer match as expected following an upgrade to 3.2
Dialog module
Section titled “Dialog module”- the E_DLG_STATE_CHANGED parameters have changed. The hash_id and hash_entry parameters were replaced by id and db_id, to be more consistent with the output of dlg_list and what OpenSIPS advertises in the Record-Route header. If you are listening for this event in your external application, or directly in OpenSIPS script using the EVI interface, make sure you adapt the
$paramnames to the new format.
DROUTING module
Section titled “DROUTING module”- the timerec column syntax has been normalized. Firstly, the “dtend” field has been added, so the final column value has been made compatible with the input of check_time_rec(). Secondly, the leading “timezone” field has been added, so it must be prepended accordingly — in order to keep using the system timezone, just prepend a ”|” string.
- time recurrences: the byyearday, bymonth and byweekno integers are now 1-indexed instead of 0-indexed (i.e. week 0 becomes week 1, per RFC 5545)! Make sure to convert any such data accordingly, otherwise your time recurrence strings will no longer match as expected following an upgrade to 3.2