Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
install:3.0.x-to-3.1.x [2010/08/31 11:15] 212.227.35.68 modules_k/dialog: spiral detection explained |
install:3.0.x-to-3.1.x [2010/10/11 20:05] (current) 87.93.206.26 |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Upgrade from 3.0.x to 3.1.x ====== | ====== Upgrade from 3.0.x to 3.1.x ====== | ||
- | |||
- | Note: 3.1.x has not been released it, target date is September 2010. Until then, 3.1.x means GIT master branch (development version). | ||
3.0.x refers to Kamailio releases 3.0.x and SR branch sr_3.0. | 3.0.x refers to Kamailio releases 3.0.x and SR branch sr_3.0. | ||
+ | |||
+ | ===== Database Structure ===== | ||
+ | |||
+ | The structure of following DB tables that existed in v3.0.x was changed: | ||
+ | |||
+ | * dialog module | ||
+ | * dialog table | ||
+ | * table version is 5 | ||
+ | * toroute column deleted | ||
+ | * toroute_name column added | ||
+ | * dispatcher module | ||
+ | * dispatcher table | ||
+ | * table version is 4 | ||
+ | * attrs column added | ||
+ | * permissions module | ||
+ | * address table | ||
+ | * table version is 4 | ||
+ | * tag column added | ||
+ | * default value for column grp is 1 | ||
+ | * lcr module | ||
+ | * gw table removed | ||
+ | * lcr table removed | ||
+ | * lcr_gw table added | ||
+ | * lcr_rule table added | ||
+ | * lcr_rule_target table added | ||
+ | |||
+ | Next is the MySQL script to update tables for dialog, dispatcher and permissions modules. By using it, the existing data in these tables is not lost, just the structure is updated. | ||
+ | |||
+ | <code c> | ||
+ | ALTER TABLE dialog DROP COLUMN toroute; | ||
+ | ALTER TABLE dialog ADD COLUMN toroute_name VARCHAR(32); | ||
+ | UPDATE version SET table_version=5 WHERE table_name=' | ||
+ | ALTER TABLE dispatcher ADD COLUMN attrs VARCHAR(128) DEFAULT '' | ||
+ | UPDATE version SET table_version=4 WHERE table_name=' | ||
+ | ALTER TABLE address ADD COLUMN tag VARCHAR(64); | ||
+ | UPDATE version SET table_version=4 WHERE table_name=' | ||
+ | </ | ||
+ | |||
+ | ==== lcr tables ==== | ||
+ | |||
+ | You can migrate from old data and db structure of lcr module to new version by using migration script available at: | ||
+ | * http:// | ||
+ | |||
+ | If you want to do by hand or you don't have any data in lcr module tables, then next is the MySQL script to update tables for lcr module. **Beware** that by running the script as provided next, you will lose old data you had for lcr module since the new version requires new tables, therefore old tables are removed. | ||
+ | |||
+ | <code c> | ||
+ | DROP TABLE gw; | ||
+ | DROP TABLE lcr; | ||
+ | DELETE FROM version WHERE table_name=' | ||
+ | DELETE FROM version WHERE table_name=' | ||
+ | |||
+ | INSERT INTO version (table_name, | ||
+ | CREATE TABLE lcr_gw ( | ||
+ | id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, | ||
+ | lcr_id SMALLINT UNSIGNED NOT NULL, | ||
+ | gw_name VARCHAR(128), | ||
+ | ip_addr VARCHAR(15), | ||
+ | hostname VARCHAR(64), | ||
+ | port SMALLINT UNSIGNED, | ||
+ | params VARCHAR(64), | ||
+ | uri_scheme TINYINT UNSIGNED, | ||
+ | transport TINYINT UNSIGNED, | ||
+ | strip TINYINT UNSIGNED, | ||
+ | tag VARCHAR(16) DEFAULT NULL, | ||
+ | flags INT UNSIGNED DEFAULT 0 NOT NULL, | ||
+ | defunct INT UNSIGNED DEFAULT NULL, | ||
+ | CONSTRAINT lcr_id_ip_addr_port_hostname_idx UNIQUE (lcr_id, ip_addr, port, hostname) | ||
+ | ) ENGINE=MyISAM; | ||
+ | |||
+ | INSERT INTO version (table_name, | ||
+ | CREATE TABLE lcr_rule_target ( | ||
+ | id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, | ||
+ | lcr_id SMALLINT UNSIGNED NOT NULL, | ||
+ | rule_id INT UNSIGNED NOT NULL, | ||
+ | gw_id INT UNSIGNED NOT NULL, | ||
+ | priority TINYINT UNSIGNED NOT NULL, | ||
+ | weight INT UNSIGNED DEFAULT 1 NOT NULL, | ||
+ | CONSTRAINT rule_id_gw_id_idx UNIQUE (rule_id, gw_id) | ||
+ | ) ENGINE=MyISAM; | ||
+ | |||
+ | CREATE INDEX lcr_id_idx ON lcr_rule_target (lcr_id); | ||
+ | |||
+ | INSERT INTO version (table_name, | ||
+ | CREATE TABLE lcr_rule ( | ||
+ | id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, | ||
+ | lcr_id SMALLINT UNSIGNED NOT NULL, | ||
+ | prefix VARCHAR(16) DEFAULT NULL, | ||
+ | from_uri VARCHAR(64) DEFAULT NULL, | ||
+ | stopper INT UNSIGNED DEFAULT 0 NOT NULL, | ||
+ | enabled INT UNSIGNED DEFAULT 1 NOT NULL, | ||
+ | CONSTRAINT lcr_id_prefix_from_uri_idx UNIQUE (lcr_id, prefix, from_uri) | ||
+ | ) ENGINE=MyISAM; | ||
+ | </ | ||
===== Modules ===== | ===== Modules ===== | ||
- | ==== modules_k/permissions | + | ==== modules_k/auth ==== |
- | * a new column in address table to hold a tag value per record. The value is returned in peer tag avp upon address matching. | + | * module was merged into modules/ |
+ | * RPID related functions and parameters moved to siputils | ||
+ | * nonce_reuse parameter removed, you have to use one_time_nonce parameter instead | ||
+ | * PV authentication functions were re-designed. See README of the module for new prototype and more details: | ||
+ | * http:// | ||
- | ==== modules/tm ==== | ||
- | | + | ==== modules_k/ |
- | * new parameter | + | |
+ | | ||
+ | * Functions radius_www_authorize()/ | ||
+ | | ||
+ | * See http:// | ||
+ | |||
+ | ==== modules_k/ | ||
+ | |||
+ | * If configuration | ||
+ | * New callback type DLGCB_SPIRALED will be executed on detection of a spiraling message (" | ||
+ | * Changes to database: toroute column was removed, toroute_name column was added | ||
+ | |||
+ | ==== modules_k/ | ||
+ | * Changes to database: attrs column was added | ||
==== modules/lcr ==== | ==== modules/lcr ==== | ||
Line 27: | Line 134: | ||
* MI functions are not supported anymore; use RPC functions instead. | * MI functions are not supported anymore; use RPC functions instead. | ||
- | ==== modules_k/auth_radius | + | ==== modules_k/nathelper |
- | * Module is now using modules_s/ | + | * rtpproxy functionality was removed from the nathelper |
- | * Functions www_challenge()/proxy_challenge() are not anymore used to send 401/407 responses. | + | |
- | * Functions radius_www_authorize()/ | + | ==== modules_k/permissions ==== |
- | * Realm argument must now be always given when radius_www_authorize()/ | + | |
- | * See modules_s/ | + | * a new column in address table to hold a tag value per record. The value is returned |
==== modules_k/ | ==== modules_k/ | ||
* rl_drop() was dropped (same functionality can be achieved with: append_to_reply() and sl_send_reply() - see the README file. | * rl_drop() was dropped (same functionality can be achieved with: append_to_reply() and sl_send_reply() - see the README file. | ||
+ | * module moved to modules/ | ||
- | ==== modules_k/nathelper | + | ==== modules_k/sl ==== |
- | * rtpproxy functionality | + | * module |
- | ==== modules_k/dialog | + | ==== modules_k/sms ==== |
- | * If configuration parameter " | + | * module was merged in **modules/ |
- | * New callback type DLGCB_SPIRALED will be executed on detection of a spiraling message (" | + | |
+ | ==== modules/tm ==== | ||
+ | |||
+ | **IMPORTANT - pay attention to next changes** | ||
+ | * removed the auto-adjustment of timer parameters for too low values (in Kamailio 3.0.x, if the value was lower than 120, they were multiplied with 1000) | ||
+ | * all timer parameters must be set in milisecond | ||
+ | * make sure the values of **fr_inv_timer**, | ||
+ | * note that dynamic timeout values given via avps for each transaction are still in seconds | ||
+ | * you can use t_set_fr(...) functions with milisecond parameters as alternative to avps. | ||
+ | * new parameter **failure_reply_mode** to control winning branch selection (reply code) for failure_route | ||
+ | * if you used kamailio config, be sure you set this parameter to **3** in order to have same behavior as in 1.5.x or lower and 3.0.x | ||
+ | * otherwise, see t_drop_replies() function to control the behaviour per transaction inside config file, within failure_route. | ||
===== Core ===== | ===== Core ===== | ||
- | * no effect of config compat mode in core - drop() action is the same all the time | + | * no more different behaviour based on config compat mode in core |
- | * drop a reply in onreply route | + | * drop() action is the same all the time |
- | * drop the request in onsend route | + | * drop a reply in onreply route |
+ | * drop the request in onsend route | ||