Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
install:1.0.x-to-1.1.x [2011/08/26 09:54] – 109.254.49.8 | install:1.0.x-to-1.1.x [2012/03/22 12:37] (current) – removed spam 80.250.1.245 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Migrating OpenSER v1.0.x to v1.1.x ====== | ||
+ | |||
+ | This page is dedicated to the differences between versions 1.0.x and 1.1.x of OpenSER. The aim is to ease the upgrade to v1.1.x. | ||
+ | |||
+ | ===== OpenSER Database Structure ===== | ||
+ | |||
+ | In this section are listed the changes in database structure. | ||
+ | |||
+ | ==== lcr table ==== | ||
+ | |||
+ | * new columns | ||
+ | |||
+ | * table version: 2 | ||
+ | |||
+ | MySQL queries: | ||
+ | |||
+ | |||
+ | alter table gw add column strip TINYINT UNSIGNED after transport; | ||
+ | |||
+ | update version set table_version = 2 where table_name = ' | ||
+ | |||
+ | ==== location and aliases tables ==== | ||
+ | |||
+ | * new columns | ||
+ | |||
+ | * table version: 1003 | ||
+ | |||
+ | MySQL queries: | ||
+ | |||
+ | update version set table_version =1003 where table_name = ' | ||
+ | |||
+ | update version set table_version =1003 where table_name = ' | ||
+ | |||
+ | alter table location add column path varchar(255) default NULL after received; | ||
+ | |||
+ | alter table location add column methods int(11) default NULL after socket; | ||
+ | |||
+ | alter table location change column last_modified last_modified datetime NOT NULL default " | ||
+ | |||
+ | |||
+ | ==== re_grp table ==== | ||
+ | |||
+ | * new table (grp module) | ||
+ | |||
+ | * table version: 1 | ||
+ | |||
+ | ==== silo table ==== | ||
+ | |||
+ | * new column | ||
+ | |||
+ | alter table silo add column snd_time INTEGER NOT NULL DEFAULT 0; | ||
+ | |||
+ | update version set table_version = 4 where table_name = ‘silo’ ; | ||
+ | |||
+ | * table version: 4 | ||
+ | |||
+ | ==== sip_trace table ==== | ||
+ | |||
+ | * new table (siptrace module) | ||
+ | |||
+ | * table version: 1 | ||
+ | |||
+ | ==== trusted table ==== | ||
+ | |||
+ | * new columns | ||
+ | |||
+ | * table version: 3 | ||
+ | |||
+ | MySQL queries: | ||
+ | alter table trusted add column tag varchar(32) DEFAULT NULL; | ||
+ | |||
+ | |||
+ | |||
+ | ===== OpenSER Core ===== | ||
+ | |||
+ | This section reflects changes in core which affects configuration file or application behaviour. | ||
+ | |||
+ | ==== forward functions ==== | ||
+ | |||
+ | Forward functions use same syntax as t_relay(). They get the parameter as a destination address in format ' | ||
+ | |||
+ | forward(" | ||
+ | |||
+ | forward_[proto](" | ||
+ | |||
+ | forward(uri: | ||
+ | |||
+ | more: http:// | ||
+ | |||
+ | |||
+ | ==== pseudo variables ==== | ||
+ | |||
+ | * The pseudo-variables can have variable-length name. | ||
+ | |||
+ | Take care now to use parenthesis to mark pseudo-variable name when needed -- $ru is the same as $(ru). If you do not use parenthesis, | ||
+ | |||
+ | Examples: | ||
+ | |||
+ | < | ||
+ | avp_printf(" | ||
+ | -- this will print the pseudo-variable with name ' | ||
+ | |||
+ | avp_printf(" | ||
+ | -- this will print the username of request URI concatenated with ' | ||
+ | |||
+ | avp_printf(" | ||
+ | -- are equivalent -- '/' | ||
+ | </ | ||
+ | |||
+ | * OpenSER 1.1.x allows modules to export pseudo variables. | ||
+ | |||
+ | E.g. the tlsops module (with patch http:// | ||
+ | |||
+ | * $tls_version | ||
+ | * $tls_description | ||
+ | * $tls_cipher_info | ||
+ | * $tls_cipher_bits | ||
+ | * $tls_[peer|my]_version | ||
+ | * $tls_[peer|my]_serial | ||
+ | * $tls_[peer|my]_[subject|issuer] | ||
+ | * $tls_[peer|my]_[subject|issuer]_cn | ||
+ | * $tls_[peer|my]_[subject|issuer]_locality | ||
+ | * $tls_[peer|my]_[subject|issuer]_country | ||
+ | * $tls_[peer|my]_[subject|issuer]_state | ||
+ | * $tls_[peer|my]_[subject|issuer]_organization | ||
+ | * $tls_[peer|my]_[subject|issuer]_unit | ||
+ | * $tls_[peer|my]_san_email | ||
+ | * $tls_[peer|my]_san_hostname | ||
+ | * $tls_[peer|my]_san_uri | ||
+ | * $tls_[peer|my]_san_ip | ||
+ | * $tls_peer_verified | ||
+ | * $tls_peer_revoked | ||
+ | * $tls_peer_expired | ||
+ | * $tls_peer_selfsigned | ||
+ | * $tls_peer_notBefore | ||
+ | * $tls_peer_notAfter | ||
+ | |||
+ | ==== TLS core ==== | ||
+ | |||
+ | The TLS core was extended to provide not only tls server domains, but also tls client domains. This means for each outgoing request you can specify the TLS parameters (cert, CA ...). The selection can be done depending on a certain AVP or on the destination socket of the request (ip:port). There were further some changes in the syntax to make it more consistent (refer to section " | ||
+ | |||
+ | ===== OpenSER Modules ===== | ||
+ | |||
+ | This section reflects changes in modules which affects configuration file or application behaviour. | ||
+ | |||
+ | ==== avpops ==== | ||
+ | |||
+ | The naming schema in parameter given to exported functions of avpops module has changed. From now on you have to use: | ||
+ | |||
+ | * $avp(i: | ||
+ | |||
+ | * $avp(s: | ||
+ | |||
+ | * $avp(alias) - e.g., $avp(foo) | ||
+ | |||
+ | example: in v1.0.x was ' | ||
+ | -- print to AVP having integer ID 10 | ||
+ | example: in v1.0.x was ' | ||
+ | -- check if AVP having integer ID 3 is equal to integer 1 | ||
+ | |||
+ | avp_pushto(" | ||
+ | |||
+ | avp_pushto(" | ||
+ | |||
+ | ==== tm ==== | ||
+ | |||
+ | The set of relaying functions ' | ||
+ | |||
+ | t_relay_to_udp(" | ||
+ | |||
+ | ==== lcr ==== | ||
+ | |||
+ | The lcr module can operate in two modes: | ||
+ | * non-caching mode (default one in 1.0.x). | ||
+ | For preserving the old behaviour, set the db_mode param to non-caching mode: | ||
+ | |||
+ | modparam(" | ||
+ | |||
+ | * caching mode (default one in 1.1.0). | ||
+ | The from_uri_column of the lcr table must be transitioned from db matching (special characters ' | ||
+ | |||
+ | ===== OpenSER Configuration ===== | ||
+ | |||
+ | This section reflects changes in configuration file format. | ||
+ | |||
+ | ==== TLS ==== | ||
+ | |||
+ | Note: the following text is based on current CVS+the TLS patch (http:// | ||
+ | |||
+ | * " | ||
+ | * " | ||
+ | * new parameter " | ||
+ | * parameter " | ||
+ | * " | ||
+ | * " | ||
+ | |||
+ | For more details refer to the TLS README in tls/ | ||
+ | |||
+ | ===== OpenSER Internals ===== | ||
+ | |||
+ | Stuff that should concern the developers. | ||
+ | |||
+ | * struct int_str has changed from {str*, int} in {str, int} | ||
+ | |||
+ | * struct module_exports has changed | ||
+ | |||
+ | ===== OpenSER Tools ===== | ||
+ | |||
+ | This section reflects changes in OpenSER tools which affects configuration file or application behaviour. | ||
+ | |||
+ | ==== openser_gen_ha1 ==== | ||
+ | |||
+ | * the tool has been removed, same functionality being given by: | ||
+ | |||
+ | echo -n ' | ||
+ | |||
+ | ==== openserctl ==== | ||
+ | |||
+ | The OpenSER control tool (openserctl) has a new version. It includes the functionalities from several old tools with similar functionality: | ||
+ | |||
+ | Right now it has a plug-in model, so you can customize it to fit your needs. You can select mysql or postgres as database backend and fifo or unixsockets as communication protocol with OpenSER. | ||
+ | |||
+ | By default, openserctl installs with only FIFO support, all the other components requiring non-standard modules. For example, the component which enables MySQL backend in installed only when mysql modules is intalled. This allow better dependency rules for packaging. | ||
+ | |||
+ | openserctl components are installed in '/ | ||
+ | |||
+ | In addition, there is a configuration file for ' | ||
+ | |||
+ | In this file, you can configure openserctl do load desired extensions. You have to edit it and read the comments for further instructions. | ||
+ | |||
+ | Also, you can create a .openserctlrc file in your home directory for a personal customization of openserctl. | ||
+ | |||
+ | If you encounter troubles, here is manual way of getting the new openserctl work: | ||
+ | |||
+ | Download it from cvs: | ||
+ | |||
+ | http:// | ||
+ | |||
+ | All files containing openserctl in the name should be downloaded. Then place the files on the local file system as follows: | ||
+ | |||
+ | openserctl => / | ||
+ | |||
+ | openserctlrc => / | ||
+ | |||
+ | openserctl.{base, | ||
+ | |||
+ | Edit now / | ||
+ | |||
+ | DBENGINE=MYSQL | ||
+ | |||
+ | CTLENGINE=FIFO | ||
+ | |||
+ | Do: chmod +x / | ||
+ | |||
+ | Also, you can set the database parameters - the comments in / | ||
+ | |||
+ | Now you can use / | ||
+ | |||
+ | In addition, new functions were added, better help message and error handling. | ||
+ | |||
+ | ===== Installation Stuff ===== | ||
+ | |||
+ | {{indexmenu> | ||