浏览代码

kamctl: database creation scripts updated for new location table schema

Daniel-Constantin Mierla 10 年之前
父节点
当前提交
c3d74313a4

+ 2 - 2
utils/kamctl/db_berkeley/kamailio/location

@@ -1,5 +1,5 @@
 METADATA_COLUMNS
-id(int) ruid(str) username(str) domain(str) contact(str) received(str) path(str) expires(datetime) q(double) callid(str) cseq(int) last_modified(datetime) flags(int) cflags(int) user_agent(str) socket(str) methods(int) instance(str) reg_id(int)
+id(int) ruid(str) username(str) domain(str) contact(str) received(str) path(str) expires(datetime) q(double) callid(str) cseq(int) last_modified(datetime) flags(int) cflags(int) user_agent(str) socket(str) methods(int) instance(str) reg_id(int) server_id(int) connection_id(int) keepalive(int)
 METADATA_KEY
 1 2 3 
 METADATA_READONLY
@@ -7,4 +7,4 @@ METADATA_READONLY
 METADATA_LOGFLAGS
 0
 METADATA_DEFAULTS
-NIL|''|''|NULL|''|NULL|NULL|'2030-05-28 21:32:15'|1.0|'Default-Call-ID'|1|'1900-01-01 00:00:01'|0|0|''|NULL|NULL|NULL|0
+NIL|''|''|NULL|''|NULL|NULL|'2030-05-28 21:32:15'|1.0|'Default-Call-ID'|1|'1900-01-01 00:00:01'|0|0|''|NULL|NULL|NULL|0|0|0|0

+ 1 - 1
utils/kamctl/db_berkeley/kamailio/version

@@ -69,7 +69,7 @@ lcr_rule|2
 lcr_rule_target|
 lcr_rule_target|1
 location|
-location|6
+location|7
 location_attrs|
 location_attrs|1
 matrix|

+ 4 - 1
utils/kamctl/db_sqlite/usrloc-create.sql

@@ -1,4 +1,4 @@
-INSERT INTO version (table_name, table_version) values ('location','6');
+INSERT INTO version (table_name, table_version) values ('location','7');
 CREATE TABLE location (
     id INTEGER PRIMARY KEY NOT NULL,
     ruid VARCHAR(64) DEFAULT '' NOT NULL,
@@ -19,6 +19,9 @@ CREATE TABLE location (
     methods INTEGER DEFAULT NULL,
     instance VARCHAR(255) DEFAULT NULL,
     reg_id INTEGER DEFAULT 0 NOT NULL,
+    server_id INTEGER DEFAULT 0 NOT NULL,
+    connection_id INTEGER DEFAULT 0 NOT NULL,
+    keepalive INTEGER DEFAULT 0 NOT NULL,
     CONSTRAINT location_ruid_idx UNIQUE (ruid)
 );
 

+ 1 - 1
utils/kamctl/dbtext/kamailio/location

@@ -1 +1 @@
-id(int,auto) ruid(string) username(string) domain(string,null) contact(string) received(string,null) path(string,null) expires(int) q(double) callid(string) cseq(int) last_modified(int) flags(int) cflags(int) user_agent(string) socket(string,null) methods(int,null) instance(string,null) reg_id(int) 
+id(int,auto) ruid(string) username(string) domain(string,null) contact(string) received(string,null) path(string,null) expires(int) q(double) callid(string) cseq(int) last_modified(int) flags(int) cflags(int) user_agent(string) socket(string,null) methods(int,null) instance(string,null) reg_id(int) server_id(int) connection_id(int) keepalive(int) 

+ 1 - 1
utils/kamctl/dbtext/kamailio/version

@@ -29,7 +29,7 @@ imc_rooms:1
 lcr_gw:3
 lcr_rule:2
 lcr_rule_target:1
-location:6
+location:7
 location_attrs:1
 matrix:1
 missed_calls:4

+ 4 - 1
utils/kamctl/mysql/usrloc-create.sql

@@ -1,4 +1,4 @@
-INSERT INTO version (table_name, table_version) values ('location','6');
+INSERT INTO version (table_name, table_version) values ('location','7');
 CREATE TABLE location (
     id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
     ruid VARCHAR(64) DEFAULT '' NOT NULL,
@@ -19,6 +19,9 @@ CREATE TABLE location (
     methods INT(11) DEFAULT NULL,
     instance VARCHAR(255) DEFAULT NULL,
     reg_id INT(11) DEFAULT 0 NOT NULL,
+    server_id INT(11) DEFAULT 0 NOT NULL,
+    connection_id INT(11) DEFAULT 0 NOT NULL,
+    keepalive INT(11) DEFAULT 0 NOT NULL,
     CONSTRAINT ruid_idx UNIQUE (ruid)
 );
 

+ 4 - 1
utils/kamctl/oracle/usrloc-create.sql

@@ -1,4 +1,4 @@
-INSERT INTO version (table_name, table_version) values ('location','6');
+INSERT INTO version (table_name, table_version) values ('location','7');
 CREATE TABLE location (
     id NUMBER(10) PRIMARY KEY,
     ruid VARCHAR2(64) DEFAULT '',
@@ -19,6 +19,9 @@ CREATE TABLE location (
     methods NUMBER(10) DEFAULT NULL,
     instance VARCHAR2(255) DEFAULT NULL,
     reg_id NUMBER(10) DEFAULT 0 NOT NULL,
+    server_id NUMBER(10) DEFAULT 0 NOT NULL,
+    connection_id NUMBER(10) DEFAULT 0 NOT NULL,
+    keepalive NUMBER(10) DEFAULT 0 NOT NULL,
     CONSTRAINT location_ruid_idx  UNIQUE (ruid)
 );
 

+ 4 - 1
utils/kamctl/postgres/usrloc-create.sql

@@ -1,4 +1,4 @@
-INSERT INTO version (table_name, table_version) values ('location','6');
+INSERT INTO version (table_name, table_version) values ('location','7');
 CREATE TABLE location (
     id SERIAL PRIMARY KEY NOT NULL,
     ruid VARCHAR(64) DEFAULT '' NOT NULL,
@@ -19,6 +19,9 @@ CREATE TABLE location (
     methods INTEGER DEFAULT NULL,
     instance VARCHAR(255) DEFAULT NULL,
     reg_id INTEGER DEFAULT 0 NOT NULL,
+    server_id INTEGER DEFAULT 0 NOT NULL,
+    connection_id INTEGER DEFAULT 0 NOT NULL,
+    keepalive INTEGER DEFAULT 0 NOT NULL,
     CONSTRAINT location_ruid_idx UNIQUE (ruid)
 );
 

+ 12 - 0
utils/kamctl/xhttp_pi/pi_framework.xml

@@ -878,6 +878,9 @@
 		<column><field>methods</field><type>DB1_INT</type></column>
 		<column><field>instance</field><type>DB1_STR</type></column>
 		<column><field>reg_id</field><type>DB1_INT</type></column>
+		<column><field>server_id</field><type>DB1_INT</type></column>
+		<column><field>connection_id</field><type>DB1_INT</type></column>
+		<column><field>keepalive</field><type>DB1_INT</type></column>
 	</db_table>
 	<!-- Declaration of location_attrs table-->
 	<db_table id="location_attrs">
@@ -4312,6 +4315,9 @@
 				<col><field>methods</field></col>
 				<col><field>instance</field></col>
 				<col><field>reg_id</field></col>
+				<col><field>server_id</field></col>
+				<col><field>connection_id</field></col>
+				<col><field>keepalive</field></col>
 			</query_cols>
 		</cmd>
 		<cmd><cmd_name>add</cmd_name>
@@ -4336,6 +4342,9 @@
 				<col><field>methods</field></col>
 				<col><field>instance</field></col>
 				<col><field>reg_id</field></col>
+				<col><field>server_id</field></col>
+				<col><field>connection_id</field></col>
+				<col><field>keepalive</field></col>
 			</query_cols>
 		</cmd>
 		<cmd><cmd_name>update</cmd_name>
@@ -4363,6 +4372,9 @@
 				<col><field>methods</field></col>
 				<col><field>instance</field></col>
 				<col><field>reg_id</field></col>
+				<col><field>server_id</field></col>
+				<col><field>connection_id</field></col>
+				<col><field>keepalive</field></col>
 			</query_cols>
 		</cmd>
 		<cmd><cmd_name>delete</cmd_name>

+ 9 - 0
utils/kamctl/xhttp_pi/usrloc-mod

@@ -23,6 +23,9 @@
 				<col><field>methods</field></col>
 				<col><field>instance</field></col>
 				<col><field>reg_id</field></col>
+				<col><field>server_id</field></col>
+				<col><field>connection_id</field></col>
+				<col><field>keepalive</field></col>
 			</query_cols>
 		</cmd>
 		<cmd><cmd_name>add</cmd_name>
@@ -47,6 +50,9 @@
 				<col><field>methods</field></col>
 				<col><field>instance</field></col>
 				<col><field>reg_id</field></col>
+				<col><field>server_id</field></col>
+				<col><field>connection_id</field></col>
+				<col><field>keepalive</field></col>
 			</query_cols>
 		</cmd>
 		<cmd><cmd_name>update</cmd_name>
@@ -74,6 +80,9 @@
 				<col><field>methods</field></col>
 				<col><field>instance</field></col>
 				<col><field>reg_id</field></col>
+				<col><field>server_id</field></col>
+				<col><field>connection_id</field></col>
+				<col><field>keepalive</field></col>
 			</query_cols>
 		</cmd>
 		<cmd><cmd_name>delete</cmd_name>

+ 3 - 0
utils/kamctl/xhttp_pi/usrloc-table

@@ -21,6 +21,9 @@
 		<column><field>methods</field><type>DB1_INT</type></column>
 		<column><field>instance</field><type>DB1_STR</type></column>
 		<column><field>reg_id</field><type>DB1_INT</type></column>
+		<column><field>server_id</field><type>DB1_INT</type></column>
+		<column><field>connection_id</field><type>DB1_INT</type></column>
+		<column><field>keepalive</field><type>DB1_INT</type></column>
 	</db_table>
 	<!-- Declaration of location_attrs table-->
 	<db_table id="location_attrs">