Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
install:3.1.x-to-3.2.x [2010/10/16 15:44] – 87.95.117.155 | install:3.1.x-to-3.2.x [2012/03/02 22:26] (current) – Fix typo acc -> htable. tr | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Database Structure ===== | ===== Database Structure ===== | ||
- | ==== modules/lcr tables | + | This sections presents notes, listed by modules, about the structure of database |
- | | + | ==== modules_k/ |
- | * Added new lcr_gw table column ' | + | |
- | * Increased | + | * table **acc** |
- | * Script modules/ | + | * callid column has now the size varchar(255) |
+ | * table **missed_calls** | ||
+ | * callid column in has now the size varchar(255) | ||
+ | |||
+ | ==== modules_k/ | ||
+ | |||
+ | * table **htable** | ||
+ | * table version is 2 | ||
+ | * new column: expires INT DEFAULT 0 NOT NULL | ||
+ | |||
+ | ==== modules_k/ | ||
+ | |||
+ | * table **dialog_vars** | ||
+ | * new table that holds per-dialog custom values | ||
+ | * the new table has to be created, see SQL command below | ||
+ | ==== modules/lcr ==== | ||
+ | |||
+ | * table **lcr_gw** | ||
+ | * table version is 2. | ||
+ | | ||
+ | * Added new lcr_gw table column ' | ||
+ | * Dropped unique index lcr_id_ip_addr_port_hostname_idx | ||
+ | * Added new index: CREATE INDEX lcr_id_idx ON lcr_gw | ||
+ | * Script modules/ | ||
+ | |||
+ | ==== modules_k/ | ||
+ | |||
+ | * table **active_watchers** | ||
+ | * callid column has now the size varchar(255) | ||
+ | |||
+ | ==== modules_k/ | ||
+ | |||
+ | * table **pua** | ||
+ | * table version is 7 | ||
+ | * call_id column has now the size varchar(255) | ||
+ | * pres_id column has now the size varchar(255) | ||
+ | |||
+ | ==== modules_k/ | ||
+ | |||
+ | * table **rls_presentity** | ||
+ | * table version is 1 | ||
+ | * content_type column has now the size varchar(255) | ||
+ | * callid column has now the size varchar(255) | ||
+ | * contact column has now the size varchar(128) | ||
+ | |||
+ | ==== modules_k/ | ||
+ | |||
+ | * table **sip_trace** | ||
+ | * table version is 3 | ||
+ | * new columns: time_us INT UNSIGNED DEFAULT 0 NOT NULL | ||
+ | * msg column has the type: MEDIUMTEXT | ||
+ | |||
+ | ==== modules_k/ | ||
+ | |||
+ | * table **xcap** | ||
+ | * table version is 4 | ||
+ | * doc column has the type: MEDIUMBLOB | ||
+ | * doc_uri column has now the size varchar(255) | ||
+ | |||
+ | ==== SQL Commands ==== | ||
+ | |||
+ | You can use next SQL commands (made for MySQL) to update the structure of existing tables in v3.1.x for v3.2.0: | ||
+ | |||
+ | <code sql> | ||
+ | |||
+ | ALTER TABLE acc MODIFY callid VARCHAR(255) DEFAULT '' | ||
+ | ALTER TABLE missed_calls MODIFY callid VARCHAR(255) DEFAULT '' | ||
+ | |||
+ | INSERT INTO version (table_name, | ||
+ | CREATE TABLE dialog_vars ( | ||
+ | id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, | ||
+ | hash_entry INT(10) UNSIGNED NOT NULL, | ||
+ | hash_id INT(10) UNSIGNED NOT NULL, | ||
+ | dialog_key VARCHAR(128) NOT NULL, | ||
+ | dialog_value VARCHAR(512) NOT NULL | ||
+ | ) ENGINE=MyISAM; | ||
+ | CREATE INDEX hash_idx ON dialog_vars (hash_entry, | ||
+ | |||
+ | UPDATE version SET table_version=2 WHERE table_name=" | ||
+ | ALTER TABLE htable MODIFY key_value VARCHAR(128) DEFAULT '' | ||
+ | ALTER TABLE htable ADD COLUMN expires INT DEFAULT 0 NOT NULL; | ||
+ | |||
+ | UPDATE version SET table_version=2 WHERE table_name=" | ||
+ | ALTER TABLE lcr_gw DROP INDEX lcr_id_ip_addr_port_hostname_idx; | ||
+ | ALTER TABLE lcr_gw ADD prefix VARCHAR(16) DEFAULT NULL; | ||
+ | ALTER TABLE lcr_gw MODIFY tag VARCHAR(64) DEFAULT NULL; | ||
+ | CREATE INDEX lcr_id_idx ON lcr_gw (lcr_id); | ||
+ | |||
+ | ALTER TABLE active_watchers MODIFY callid VARCHAR(255) NOT NULL, | ||
+ | |||
+ | UPDATE version SET table_version=7 WHERE table_name=" | ||
+ | ALTER TABLE pua MODIFY pres_id VARCHAR(255) NOT NULL; | ||
+ | ALTER TABLE pua MODIFY call_id VARCHAR(255) NOT NULL; | ||
+ | |||
+ | UPDATE version SET table_version=1 WHERE table_name=" | ||
+ | ALTER TABLE rls_presentity MODIFY content_type VARCHAR(255) NOT NULL; | ||
+ | ALTER TABLE rls_presentity MODIFY callid VARCHAR(255) NOT NULL; | ||
+ | ALTER TABLE rls_presentity MODIFY contact VARCHAR(128) NOT NULL; | ||
+ | |||
+ | UPDATE version SET table_version=3 WHERE table_name=" | ||
+ | ALTER TABLE sip_trace ADD COLUMN time_us INT UNSIGNED DEFAULT 0 NOT NULL; | ||
+ | ALTER TABLE sip_trace MODIFY msg MEDIUMTEXT NOT NULL; | ||
+ | |||
+ | UPDATE version SET table_version=4 WHERE table_name=" | ||
+ | ALTER TABLE xcap MODIFY doc MEDIUMBLOB NOT NULL; | ||
+ | ALTER TABLE xcap MODIFY doc_uri VARCHAR(255) NOT NULL; | ||
+ | |||
+ | </ | ||
===== Modules ===== | ===== Modules ===== | ||
Line 22: | Line 129: | ||
* [to|from]_any_gw() syntax has changed from [to|from]_any_gw([ip_addr]) to [to|from]_any_gw([ip_addr, | * [to|from]_any_gw() syntax has changed from [to|from]_any_gw([ip_addr]) to [to|from]_any_gw([ip_addr, | ||
+ | ==== modules/ | ||
+ | |||
+ | * force_rtp_proxy() removed | ||
+ | * use rtpproxy_offer() when it is SDP offer (mainly on INVITE request) and rtpproxy_answer() when it is SDP answer (mainly on INVITE replies) | ||
+ | * new alternative is to use rtpproxy_manage() which does the detection of SDP offer/ | ||
==== modules/ | ==== modules/ | ||
* New function is_int(pvar) that returns true if pvar argument has integer value. | * New function is_int(pvar) that returns true if pvar argument has integer value. |