Migration from 3.5.x to 3.6.x
This section is meant to provide useful help in migrating your OpenSIPS installations from the 3.5.x version to 3.6.x.
You can find the all the new additions in the 3.6 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.5.x MySQL DB to the 3.6.x format using the opensips-cli tool :
$ opensips-cli -x database migrate 3.5_to_3.6 opensips_3_5 opensips_3_6where :
- opensips_3_5 is the existing DB name corresponding to version 3.5.x format
- opensips_3_6 is the DB name to be created for 3.6.x format
See the opensips-cli documentation for more details.
Subscriber table
Section titled “Subscriber table”email_addressandrpidcolumns have been completely dropped from the subscriber table = if you want to preserve the columns in your setup, you need to manually add them to the new migrated table and copy the values from the old one.
Script migration
Section titled “Script migration”The following is the full list of backwards-incompatible syntax or functional changes in the OpenSIPS configuration script:
- none
Module migration
Section titled “Module migration”Event_route module
Section titled “Event_route module”- the event_route module has been completely dropped and merged into core. Thus, you no longer need to load the module in your script, as it will be automatically loaded at startup. In order to migrate, simply delete the loadmodule “event_route.so” line from your script.
Prometheus module
Section titled “Prometheus module”- paramameter script_route_avp_result has been dropped, and its behavior has been replaced with the newly added return values. Check the script_route documentation for more information.
RabbitMQ module
Section titled “RabbitMQ module”- the rabbitmq module has been completely merged into the event_rabbitmq module. In order to migrate, you need to remove the loadmodule “rabbitmq.so” line and add the loadmoule “event_rabbitmq.so” line, in case it was not previously loaded.
Registrar module
Section titled “Registrar module”- for the attr_avp, the behavior is changed: it is still read from AVPs at save() time, but the contact attributes are now pushed back (at lookup() time) into message branch attributes
$msg.branch.attr()- see example here.
SIPREC module
Section titled “SIPREC module”- the
media_ipparameter in the$siprechas been dropped, being fully replaced with themediaparameter.
Deprecated functions / parameters
Section titled “Deprecated functions / parameters”The following functions / parameters are marked as deprecated - they still work 100% as before, but they will be removed in the future releases, being replaced by new functions / parameters.
So heads up and consider replacing them in time:
-
$bf, to be replaced by$msg.branch.flags -
$branch, to be replaced by$msg.branch -
$branch.fields, to be replaced by$msg.branch.uri -
$branch.flag, to be replaced by$msg.branch.flag() -
append_branch(), to be replaced by append_msg_branch()
Modules
Section titled “Modules”- TM variable
$T_branch_last_reply_codeto be replaced by$tm.branch.last_received
Packaging migration
Section titled “Packaging migration”- On Debian and Fedora/Redhat, the opensips-berkeley-module, opensips-mysql-module, opensips-postgres-module and opensips-sqlite-module packages no longer come with the associated database schemas for each backend - instead, four new packages are being built, namely opensips-berkeley-dbschema, opensips-mysql-dbschema, opensips-postgres-dbschema and opensips-sqlite-dbschema, which contain the corresponding database schema for each backend. Since there is no cross dependency between the module and the dbschema, if one needs the schema as well, it needs to be installed the dbschema package separately. This change is being done on purpose, to be able to install the dbschema files on separate machines, and use them separately to install (for example using opensips-cli).