Login | Register


Documentation -> Migration -> Migration from 2.1.x to 2.2.0

This page has been visited 6134 times.

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

You can find the all the new additions in the 2.2.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 1.10.x MySQL DB to the 1.11.0 format by using the opensipsdbctl tool :

   # opensipsdbctl migrate opensips_2_1 opensips_2_2

where :

  • opensips_2_1 is the existing DB name corresponding to version 2.1.x format
  • opensips_2_2 is the DB name to be created for 2.2 format


  • 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 Core

  • mpath parameter has been changed for debian packages from the default /usr/lib/opensips/modules/ to /usr/lib/x86_64-linux-gnu/opensips/modules/; if you have your OpenSIPS installed from deb files, make sure you update it with the correct path.
  • debug global parameter was replaced by the log_level global parameter, with the same behavior and values.
  • set_debug() function was removed and its functionality replaced by $log_level as follows:
  set_debug(2); is now $log_level=2;
  set_debug() is now $log_level=NULL;
  • debug MI command was replaced by log_level MI command - the entire functionality, input and out were preserved.
  • fork options is outdated and needs to be replaced with new debug_mode parameter. Please read carefully the documentation of the debug_mode option and its behavior is not 100% similar to fork.
  • as user/uid and group/gid global parameters were removed, use the -u and -g command line parameters instead.
  • script flags were removed (setsflag(), issflagset(), resetsflag()) - former logic must be rewritten using message flags
  • bin_children became obsolete as the BIN protocol implementation is now provided by the proto_bin module.
  • bin_listen core parameter is replaced by the bin_port module parameter from proto_bin module (as a result of migrating the BIN implementation from core into a separate module)

2.2  ACC module

  • all *_flag(log_flag, db_flag...) and *_missed_flag(log_missed_flag, aaa_missed_flag...) along with failed_transaction are now parameters to do_accounting()(enable accounting) and drop_accounting()(disable accounting); the flags are not supported anymore so you have to remove them;
  • cdr_flag has been removed; cdr accounting can now be made only with do_accounting() and disabled with drop_accounting();
  • table_avp has been removed; the table name is now a parameter to do_accounting();

2.3  AVPOPS module

  • if avp_db_query is used in multi-fields queries, note than DB NULL fields are reported as string "<null>" AVPs . You need to reconsider your checks for the return data as NULL AVPs may be reported as "<null>" AVPs now.

2.4  CPL-C module

  • as the module was renamed to cpl_c, be sure an update the loadmodule and modparam statements related to this module. The name of the functions and parameters did not change.

2.5  DIALOG module

  • the ping_interval renamed as options_ping_interval (same meaning)
  • to migrate the dialog replication the clusterer support: parameter replicate_dialogs_to is an integer now pointing to a cluster ID (as defined by the clusterer module). The set of destinations must be now defined as a cluster.
  • to migrate the profile sharing the clusterer support: parameter replicate_profiles_to is an integer now pointing to a cluster ID (as defined by the clusterer module). Also you should consider setting the auth_check parameter to ON.

2.6  DIALPLAN module

  • if using the default partition, be sure to explicitly set the db_url parameter (as the default value from db_default_url will not be inherited)

2.7  DISPATCHER module

  • if using the default partition, be sure to explicitly set the db_url parameter (as the default value from db_default_url will not be inherited)


  • replace mi_xmlrpc_ng_root module parameter with the new name http_root

2.9  PROTO_TCP module

  • parameter tcp_async is now by default on, so you might need to explicitly set it in order to keep your desired setting.

2.10  PROTO_TLS module

  • the TLS domains used for tuning the TLS parameters have been moved in the tls_mgm; in order to migrate the TLS module, you have to load the tls_mgm module and move the following modparams from proto_tls to tls_mgm: tls_method, certificate, private_key, ca_list, ca_dir, ciphers_list, dh_params, ec_curve, verify_cert

2.11  RATELIMIT module

  • to migrate the profile sharing the clusterer support drop the cachedb_url and use replicate_pipes_to parameter to point to a cluster ID (as defined by the clusterer module).

2.12  SIPTRACE module

  • db_url parameter has been removed; the db URL is now part of the trace_id parameter definition.
  • trace_flag parameter has been removed; no flag needed, everything is done now using sip_trace() script function (old sip_trace()+setflag() is now achieved via sip_trace("t") - transaction level tracing).
  • trace_on flag can now be enabled/disabled per trace_id via MI
  • traced_user_avp has been removed; sip_trace now has a paramater trace_attrs which does the same thing, but pops only the first value in a variable (not an entry for each value in case of an avp);
  • duplicate_uri has been removed; it can now be defined using the trace_id both for normal sip and hep
  • table parameter has been removed; a database table can now be defined using trace_id parameter
  • trace_to_database flags has been removed; tracing can be enabled/disabled via mi on each trace_id, giving you the possibility to enable/disable tracing for a trace_id containing a database
  • duplicate_with_hep flag has been removed; now one can define via trace_id parameter any sip or hep destination (any traffic can be traced in the same time to multiple trace IDs)
  • hep_version has been removed; parameter moved inside proto_hep module
  • hep_capture_id has been removed; parameter moved inside proto_hep module
  • trace_dialog has been removed; same functionality can be achieved using sip_trace with the proper flags ( sip_trace("d",...) )
  • sip_trace function definition has changed; now it expects at least a trace_id and for advanced tracing one needs to properly set the flags and trace_attrs(old traced_user_avp); see docs!

2.13  TM module

  • t_relay() - 0x01 flag is outdated (has no effect any more). See Commit 0db7789

2.14  USRLOC module

  • parameter replicate_contacts_to is an integer now pointing to a cluster ID (as defined by the clusterer module). The set of destinations must be now defined as a cluster.

Page last modified on April 11, 2016, at 03:03 PM