Migration from 3.2.x to 3.3.0
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.
DB migration
Section titled “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_3where :
- 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.
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”- the tcp_listen_backlog has been dropped and completely removed by the tcp_socket_backlog parameter.
Core Variables
Section titled “Core Variables”- The
$Rivariable has been dropped, replaced by the$socket_in(ip)variable. - The
$Rpvariable has been dropped, replaced by the$socket_in(port)variable. - The
$prand$protovariables have been dropped, replaced by the$socket_in(proto)variable. - The
$afvariable has been dropped, replaced by the$socket_in(af)variable. - The
$fsvariable has been dropped, replaced by the$socket_outvariable. - The
$rT(top route type) variable has been dropped, replaced by the$route.typevariable. Equivalent syntax is:$(route.type[-1])
Core keywords
Section titled “Core keywords”- example
Core functions
Section titled “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.
Core MI commands
Section titled “Core MI commands”- example
Statistics migration
Section titled “Statistics migration”- example
Module migration
Section titled “Module migration”B2B_LOGIC_XML module
Section titled “B2B_LOGIC_XML module”- The b2b_logic_xml module has been dropped - replace it with b2b_logic module.
CGRateS module
Section titled “CGRateS module”- The
$cgrretvariable has been dropped, replaced by the$cgr_retvariable.
DIALOG module
Section titled “DIALOG module”- the default replicate_profiles_timer has been increased to 200 ms, up from 10 ms.
DIALPLAN module
Section titled “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.
DISPATCHER module
Section titled “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”.
DROUTING module
Section titled “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”.
GROUP module
Section titled “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.
MEDIA_EXCHANGE module
Section titled “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.
RATELIMIT module
Section titled “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.
RTPPROXY module
Section titled “RTPPROXY module”- The rtpproxy_tout parameter has been dropped, completely replaced by the rtpproxy_timetout parameter.
SIPREC module
Section titled “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
$siprecvariable. 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
$fsor 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.