Module: sip-router
Branch: master
Commit: dbb012c32ec34cafc7cef3e5af66f6dc3f61c303
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=dbb012c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Oct 9 13:05:36 2011 +0200
srdb1/kamctl: dialog_vars table added to dialog group
- dialog_vars is used by dialog module and created at once with dialog
table, otherwise the module does not start
---
lib/srdb1/schema/kamailio-dialog.xml | 1 +
lib/srdb1/schema/kamailio-dialog_vars.xml | 12 ------------
utils/kamctl/db_berkeley/kamailio/mtrees | 2 --
utils/kamctl/db_berkeley/kamailio/version | 6 ++++--
utils/kamctl/db_sqlite/dialog-create.sql | 11 +++++++++++
utils/kamctl/db_sqlite/dialog_vars-create.sql | 11 -----------
utils/kamctl/dbtext/kamailio/dialog_vars | 2 +-
utils/kamctl/dbtext/kamailio/mtrees | 1 -
utils/kamctl/dbtext/kamailio/version | 3 ++-
utils/kamctl/kamdbctl.base | 2 +-
utils/kamctl/mysql/dialog-create.sql | 11 +++++++++++
utils/kamctl/mysql/dialog_vars-create.sql | 11 -----------
utils/kamctl/oracle/dialog-create.sql | 19 +++++++++++++++++++
utils/kamctl/oracle/dialog_vars-create.sql | 19 -------------------
utils/kamctl/postgres/dialog-create.sql | 11 +++++++++++
utils/kamctl/postgres/dialog_vars-create.sql | 11 -----------
16 files changed, 61 insertions(+), 72 deletions(-)
diff --git a/lib/srdb1/schema/kamailio-dialog.xml b/lib/srdb1/schema/kamailio-dialog.xml
index 6b6f36a..e8bf152 100644
--- a/lib/srdb1/schema/kamailio-dialog.xml
+++ b/lib/srdb1/schema/kamailio-dialog.xml
@@ -9,4 +9,5 @@
<database
xmlns:xi="http://www.w3.org/2001/XInclude">
<name>Dialog support</name>
<xi:include href="dialog.xml"/>
+ <xi:include href="dialog_vars.xml"/>
</database>
diff --git a/lib/srdb1/schema/kamailio-dialog_vars.xml
b/lib/srdb1/schema/kamailio-dialog_vars.xml
deleted file mode 100644
index bd62410..0000000
--- a/lib/srdb1/schema/kamailio-dialog_vars.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE database PUBLIC "-//kamailio.org//DTD DBSchema V1.1//EN"
- "http://kamailio.org/pub/kamailio/dbschema/dtd/1.1/dbschema.dtd" [
-
- <!ENTITY % entities SYSTEM "entities.xml">
- %entities;
-]>
-
-<database
xmlns:xi="http://www.w3.org/2001/XInclude">
- <name>Dialog Variables support</name>
- <xi:include href="dialog_vars.xml"/>
-</database>
diff --git a/utils/kamctl/db_berkeley/kamailio/mtrees
b/utils/kamctl/db_berkeley/kamailio/mtrees
index 1a31057..be0dd78 100644
--- a/utils/kamctl/db_berkeley/kamailio/mtrees
+++ b/utils/kamctl/db_berkeley/kamailio/mtrees
@@ -8,5 +8,3 @@ METADATA_LOGFLAGS
0
METADATA_DEFAULTS
NIL|''|''|''
-mtrees|
-mtrees|1
diff --git a/utils/kamctl/db_berkeley/kamailio/version
b/utils/kamctl/db_berkeley/kamailio/version
index f5c5a19..3f6666b 100644
--- a/utils/kamctl/db_berkeley/kamailio/version
+++ b/utils/kamctl/db_berkeley/kamailio/version
@@ -28,8 +28,8 @@ dbaliases|
dbaliases|1
dialog|
dialog|5
-METADATA_DEFAULTS
-NIL|NIL|NIL|NIL|NIL
+dialog_vars|
+dialog_vars|1
dialplan|
dialplan|1
dispatcher|
@@ -72,6 +72,8 @@ missed_calls|
missed_calls|3
mtree|
mtree|1
+mtrees|
+mtrees|1
pdt|
pdt|1
pl_pipes|
diff --git a/utils/kamctl/db_sqlite/dialog-create.sql
b/utils/kamctl/db_sqlite/dialog-create.sql
index bb086a5..b21c992 100644
--- a/utils/kamctl/db_sqlite/dialog-create.sql
+++ b/utils/kamctl/db_sqlite/dialog-create.sql
@@ -27,3 +27,14 @@ CREATE TABLE dialog (
CREATE INDEX dialog_hash_idx ON dialog (hash_entry, hash_id);
+INSERT INTO version (table_name, table_version) values
('dialog_vars','1');
+CREATE TABLE dialog_vars (
+ id INTEGER PRIMARY KEY NOT NULL,
+ hash_entry INTEGER NOT NULL,
+ hash_id INTEGER NOT NULL,
+ dialog_key VARCHAR(128) NOT NULL,
+ dialog_value VARCHAR(512) NOT NULL
+);
+
+CREATE INDEX dialog_vars_hash_idx ON dialog_vars (hash_entry, hash_id);
+
diff --git a/utils/kamctl/db_sqlite/dialog_vars-create.sql
b/utils/kamctl/db_sqlite/dialog_vars-create.sql
deleted file mode 100644
index 860a87d..0000000
--- a/utils/kamctl/db_sqlite/dialog_vars-create.sql
+++ /dev/null
@@ -1,11 +0,0 @@
-INSERT INTO version (table_name, table_version) values
('dialog_vars','1');
-CREATE TABLE dialog_vars (
- id INTEGER PRIMARY KEY NOT NULL,
- hash_entry INTEGER NOT NULL,
- hash_id INTEGER 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, hash_id);
-
diff --git a/utils/kamctl/dbtext/kamailio/dialog_vars
b/utils/kamctl/dbtext/kamailio/dialog_vars
index d39ef42..c593498 100644
--- a/utils/kamctl/dbtext/kamailio/dialog_vars
+++ b/utils/kamctl/dbtext/kamailio/dialog_vars
@@ -1 +1 @@
-id(int,auto) hash_entry(int) hash_id(int) dialog_key(string) dialog_value(string)
+id(int,auto) hash_entry(int) hash_id(int) dialog_key(string) dialog_value(string)
diff --git a/utils/kamctl/dbtext/kamailio/mtrees b/utils/kamctl/dbtext/kamailio/mtrees
index d4d806a..de72e59 100644
--- a/utils/kamctl/dbtext/kamailio/mtrees
+++ b/utils/kamctl/dbtext/kamailio/mtrees
@@ -1,2 +1 @@
id(int,auto) tname(string) tprefix(string) tvalue(string)
-mtrees:1
diff --git a/utils/kamctl/dbtext/kamailio/version b/utils/kamctl/dbtext/kamailio/version
index f1516c8..823cd6f 100644
--- a/utils/kamctl/dbtext/kamailio/version
+++ b/utils/kamctl/dbtext/kamailio/version
@@ -9,7 +9,7 @@ carrierroute:3
cpl:1
dbaliases:1
dialog:5
-id(int,auto) hash_entry(int) hash_id(int) dialog_key(string) dialog_value(string)
+dialog_vars:1
dialplan:1
dispatcher:4
domain:1
@@ -31,6 +31,7 @@ location:1004
matrix:1
missed_calls:3
mtree:1
+mtrees:1
pdt:1
pl_pipes:1
presentity:3
diff --git a/utils/kamctl/kamdbctl.base b/utils/kamctl/kamdbctl.base
index d0d6fd1..1de9e32 100644
--- a/utils/kamctl/kamdbctl.base
+++ b/utils/kamctl/kamdbctl.base
@@ -35,7 +35,7 @@ INSTALL_PRESENCE_TABLES=${INSTALL_PRESENCE_TABLES:-ask}
STANDARD_TABLES=${STANDARD_TABLES:-version acc dbaliases domain grp
uri speed_dial lcr_gw lcr_rule lcr_rule_target pdt subscriber
location re_grp trusted address missed_calls usr_preferences
- aliases silo dialog dispatcher dialplan}
+ aliases silo dialog dialog_vars dispatcher dialplan}
EXTRA_TABLES=${EXTRA_TABLES:-imc_members imc_rooms cpl sip_trace domainpolicy
carrierroute carrier_name domain_name carrierfailureroute userblacklist
globalblacklist htable purplemap uacreg pl_pipes}
diff --git a/utils/kamctl/mysql/dialog-create.sql b/utils/kamctl/mysql/dialog-create.sql
index 77ba968..6d73ca0 100644
--- a/utils/kamctl/mysql/dialog-create.sql
+++ b/utils/kamctl/mysql/dialog-create.sql
@@ -27,3 +27,14 @@ CREATE TABLE dialog (
CREATE INDEX hash_idx ON dialog (hash_entry, hash_id);
+INSERT INTO version (table_name, table_version) values
('dialog_vars','1');
+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, hash_id);
+
diff --git a/utils/kamctl/mysql/dialog_vars-create.sql
b/utils/kamctl/mysql/dialog_vars-create.sql
deleted file mode 100644
index c8787e6..0000000
--- a/utils/kamctl/mysql/dialog_vars-create.sql
+++ /dev/null
@@ -1,11 +0,0 @@
-INSERT INTO version (table_name, table_version) values
('dialog_vars','1');
-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, hash_id);
-
diff --git a/utils/kamctl/oracle/dialog-create.sql
b/utils/kamctl/oracle/dialog-create.sql
index f06cbc4..9fdc370 100644
--- a/utils/kamctl/oracle/dialog-create.sql
+++ b/utils/kamctl/oracle/dialog-create.sql
@@ -35,3 +35,22 @@ BEGIN map2users('dialog'); END;
/
CREATE INDEX dialog_hash_idx ON dialog (hash_entry, hash_id);
+INSERT INTO version (table_name, table_version) values
('dialog_vars','1');
+CREATE TABLE dialog_vars (
+ id NUMBER(10) PRIMARY KEY,
+ hash_entry NUMBER(10),
+ hash_id NUMBER(10),
+ dialog_key VARCHAR2(128),
+ dialog_value VARCHAR2(512)
+);
+
+CREATE OR REPLACE TRIGGER dialog_vars_tr
+before insert on dialog_vars FOR EACH ROW
+BEGIN
+ auto_id(:NEW.id);
+END dialog_vars_tr;
+/
+BEGIN map2users('dialog_vars'); END;
+/
+CREATE INDEX dialog_vars_hash_idx ON dialog_vars (hash_entry, hash_id);
+
diff --git a/utils/kamctl/oracle/dialog_vars-create.sql
b/utils/kamctl/oracle/dialog_vars-create.sql
deleted file mode 100644
index 9dbaea7..0000000
--- a/utils/kamctl/oracle/dialog_vars-create.sql
+++ /dev/null
@@ -1,19 +0,0 @@
-INSERT INTO version (table_name, table_version) values
('dialog_vars','1');
-CREATE TABLE dialog_vars (
- id NUMBER(10) PRIMARY KEY,
- hash_entry NUMBER(10),
- hash_id NUMBER(10),
- dialog_key VARCHAR2(128),
- dialog_value VARCHAR2(512)
-);
-
-CREATE OR REPLACE TRIGGER dialog_vars_tr
-before insert on dialog_vars FOR EACH ROW
-BEGIN
- auto_id(:NEW.id);
-END dialog_vars_tr;
-/
-BEGIN map2users('dialog_vars'); END;
-/
-CREATE INDEX dialog_vars_hash_idx ON dialog_vars (hash_entry, hash_id);
-
diff --git a/utils/kamctl/postgres/dialog-create.sql
b/utils/kamctl/postgres/dialog-create.sql
index 3ee4d2e..c72c5ca 100644
--- a/utils/kamctl/postgres/dialog-create.sql
+++ b/utils/kamctl/postgres/dialog-create.sql
@@ -27,3 +27,14 @@ CREATE TABLE dialog (
CREATE INDEX dialog_hash_idx ON dialog (hash_entry, hash_id);
+INSERT INTO version (table_name, table_version) values
('dialog_vars','1');
+CREATE TABLE dialog_vars (
+ id SERIAL PRIMARY KEY NOT NULL,
+ hash_entry INTEGER NOT NULL,
+ hash_id INTEGER NOT NULL,
+ dialog_key VARCHAR(128) NOT NULL,
+ dialog_value VARCHAR(512) NOT NULL
+);
+
+CREATE INDEX dialog_vars_hash_idx ON dialog_vars (hash_entry, hash_id);
+
diff --git a/utils/kamctl/postgres/dialog_vars-create.sql
b/utils/kamctl/postgres/dialog_vars-create.sql
deleted file mode 100644
index ccc7d68..0000000
--- a/utils/kamctl/postgres/dialog_vars-create.sql
+++ /dev/null
@@ -1,11 +0,0 @@
-INSERT INTO version (table_name, table_version) values
('dialog_vars','1');
-CREATE TABLE dialog_vars (
- id SERIAL PRIMARY KEY NOT NULL,
- hash_entry INTEGER NOT NULL,
- hash_id INTEGER NOT NULL,
- dialog_key VARCHAR(128) NOT NULL,
- dialog_value VARCHAR(512)
-);
-
-CREATE INDEX dialog_vars_hash_idx ON dialog_vars (hash_entry, hash_id);
-