Documentation -> Migration -> Migration from 3.2.x to 3.3.0
This page has been visited 3931 times.
This section is meant to provide useful help in migrating your OpenSIPS installations from the 3.2.0 version to 3.3.0.
You can find the all the new additions in the 3.3.0 release compiled under this page. The ChangeLog may help your understanding of the migration / update process.
Make sure you don't carry a left-over Makefile.conf file in your OpenSIPS source tree if migrating to a new branch! This configuration file, generated by make menuconfig, is usually not compatible with the one of a previous major release!
1. DB migration
You can migrate your 3.2.x MySQL DB to the 3.3.x format using the opensips-cli tool :
# opensips-cli -x database migrate 3.2_to_3.3 opensips_3_2 opensips_3_3
where :
- opensips_3_2 is the existing DB name corresponding to version 3.2.x format
- opensips_3_3 is the DB name to be created for 3.3.x format
See the opensips-cli documentation for more details.
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
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:
2.1 Global Parameters
- the tcp_listen_backlog has been dropped and completely removed by the tcp_socket_backlog parameter.
2.2 Core Variables
- The $Ri variable has been dropped, replaced by the $socket_in(ip) variable.
- The $Rp variable has been dropped, replaced by the $socket_in(port) variable.
- The $pr and $proto variables have been dropped, replaced by the $socket_in(proto) variable.
- The $af variable has been dropped, replaced by the $socket_in(af) variable.
- The $fs variable has been dropped, replaced by the $socket_out variable.
- The $rT (top route type) variable has been dropped, replaced by the $route.type variable. Equivalent syntax is: $(route.type[-1])
2.3 Core keywords
2.4 Core functions
- the rewritehost function has been dropped and completely replaced by the sethost function.
- the rewritehostport function has been dropped and completely replaced by the sethostport function.
- the rewriteuser function has been dropped and completely replaced by the setuser function.
- the rewriteuserpass function has been dropped and completely replaced by the setuserpass function.
- the rewriteport function has been dropped and completely replaced by the setport function.
- the rewriteuri function has been dropped and completely replaced by the seturi function.
2.5 Core MI commands
2.6 Statistics migration
3. Module migration
3.1 B2B_LOGIC_XML module
- The b2b_logic_xml module has been dropped - replace it with b2b_logic module.
3.2 CGRateS module
- The $cgrret variable has been dropped, replaced by the $cgr_ret variable.
3.3 DIALOG module
3.4 DIALPLAN module
- the "attrs_pvar" output variable of dp_translate() is now always set on a successful translation, helping avoid both unwanted bugs and boilerplate script code. See the updated docs for more details.
3.5 DISPATCHER module
- if you are using the clustering support without a sharing tag and relying on the fact that all the nodes will ping all the destinations, in order to maintain this behavior you will have now to set the cluster_probing_mode modparam to "all".
3.6 DROUTING module
- The W flag of the do_routing function has been completely dropped. Its functionality has been replaced by the new sort_alg column of the dr_rules or dr_carriers tables. See the Dynamic Routing DB schema for more details.
- if using is_from_gw() / goes_to_gw() / dr_is_gw() functions note that there is a new extra parameter "carrier_attrs_pvar" before the last "partition" parameter. If you use the partitions, you will have to insert one extra empty param before the "partition" parameter!!
- if using route_to_gw() functions note that there is a new extra parameter "carrier_attrs_pvar" before the last "partition" parameter. If you use the partitions, you will have to insert one extra empty param before the "partition" parameter!!
- if you are using the clustering support without a sharing tag and relying on the fact that all the nodes will ping all the gateways, in order to maintain this behavior you will have now to set the cluster_probing_mode modparam to "all".
3.7 GROUP module
- The is_user_in function has been dropped, replaced by the db_is_user_in function.
- The get_user_group function has been dropped, replaced by the db_get_user_group function.
3.8 MEDIA_EXCHANGE module
- Media exchange forking mode no longer works through the rtpproxy module, but has been integrated with the rtp_relay module. Therefore, if you were using media exchange forking capabilities, you need to convert your script to engage RTP Relay sessions on your calls.
3.9 RATELIMIT module
- The ratelimit pipes replication module has been changed - instead of replicating all pipes, the rl_check function can receive a /b prefix, indicating that the pipe should be replicated over bin, or /r if it should be replicated over cachedb.
- the default repl_timer_interval has been increased to 200 ms, up from 10 ms.
3.10 RTPPROXY module
- The rtpproxy_tout parameter has been dropped, completely replaced by the rtpproxy_timetout parameter.
3.11 SIPREC module
- siprec_start_recording function no longer receives a set of data as parameters - the group, caller, callee, media_ip, headers parameters have been pulled out and are now provisioned through the new $siprec variable. If you were passing any of these optional arguments to the function, you should move them as $siprec(param). Note that the media_ip parameter has been deprecated in the favor of a more flexible media parameter.
- if you were forcing a custom socket to the SIPREC SRS using the $fs or force_send_socket command, you need to set the new socket through the $siprec(socket) variable.
- the rtpproxy_sock parameter has been completely dropped, as the media node is taken automatically from the rtp_relay context. In order to migrate, simply remove the parameter from the siprec_start_recording call.
- the media_port_min and media_port_max parameters have been moved to the RTPProxy module under the name of generated_sdp_port_min and generated_sdp_port_max accordingly.