浏览代码

kamctl: added db creation scripts for topos module

Daniel-Constantin Mierla 9 年之前
父节点
当前提交
ee4c74d681

+ 10 - 0
utils/kamctl/db_berkeley/kamailio/topos_d

@@ -0,0 +1,10 @@
+METADATA_COLUMNS
+id(int) rectime(datetime) callid(str) a_uuid(str) b_uuid(str) a_contact(str) b_contact(str) a_tag(str) b_tag(str) a_rr(str) b_rr(str) iflags(int) a_uri(str) b_uri(str) r_uri(str) a_srcip(str) b_srcip(str)
+METADATA_KEY
+2 3 4 
+METADATA_READONLY
+0
+METADATA_LOGFLAGS
+0
+METADATA_DEFAULTS
+NIL|NIL|''|''|''|''|''|NIL|NIL|NIL|NIL|0|NIL|NIL|NIL|''|''

+ 10 - 0
utils/kamctl/db_berkeley/kamailio/topos_t

@@ -0,0 +1,10 @@
+METADATA_COLUMNS
+id(int) rectime(datetime) callid(str) a_uuid(str) b_uuid(str) direction(int) x_via(str)
+METADATA_KEY
+2 3 4 5 
+METADATA_READONLY
+0
+METADATA_LOGFLAGS
+0
+METADATA_DEFAULTS
+NIL|NIL|''|''|''|0|NIL

+ 4 - 0
utils/kamctl/db_berkeley/kamailio/version

@@ -116,6 +116,10 @@ speed_dial|
 speed_dial|2
 speed_dial|2
 subscriber|
 subscriber|
 subscriber|6
 subscriber|6
+topos_d|
+topos_d|1
+topos_t|
+topos_t|1
 trusted|
 trusted|
 trusted|6
 trusted|6
 uacreg|
 uacreg|

+ 40 - 0
utils/kamctl/db_sqlite/topos-create.sql

@@ -0,0 +1,40 @@
+CREATE TABLE topos_d (
+    id INTEGER PRIMARY KEY NOT NULL,
+    rectime TIMESTAMP WITHOUT TIME ZONE NOT NULL,
+    callid VARCHAR(255) DEFAULT '' NOT NULL,
+    a_uuid VARCHAR(255) DEFAULT '' NOT NULL,
+    b_uuid VARCHAR(255) DEFAULT '' NOT NULL,
+    a_contact VARCHAR(128) DEFAULT '' NOT NULL,
+    b_contact VARCHAR(128) DEFAULT '' NOT NULL,
+    a_tag VARCHAR(64) NOT NULL,
+    b_tag VARCHAR(64) NOT NULL,
+    a_rr TEXT NOT NULL,
+    b_rr TEXT NOT NULL,
+    iflags INTEGER DEFAULT 0 NOT NULL,
+    a_uri VARCHAR(128) NOT NULL,
+    b_uri VARCHAR(128) NOT NULL,
+    r_uri VARCHAR(128) NOT NULL,
+    a_srcip VARCHAR(50) DEFAULT '' NOT NULL,
+    b_srcip VARCHAR(50) DEFAULT '' NOT NULL
+);
+
+CREATE INDEX topos_d_rectime_idx ON topos_d (rectime);
+CREATE INDEX topos_d_a_callid_idx ON topos_d (callid);
+
+INSERT INTO version (table_name, table_version) values ('topos_d','1');
+
+CREATE TABLE topos_t (
+    id INTEGER PRIMARY KEY NOT NULL,
+    rectime TIMESTAMP WITHOUT TIME ZONE NOT NULL,
+    callid VARCHAR(255) DEFAULT '' NOT NULL,
+    a_uuid VARCHAR(255) DEFAULT '' NOT NULL,
+    b_uuid VARCHAR(255) DEFAULT '' NOT NULL,
+    direction INTEGER DEFAULT 0 NOT NULL,
+    x_via TEXT NOT NULL
+);
+
+CREATE INDEX topos_t_rectime_idx ON topos_t (rectime);
+CREATE INDEX topos_t_a_callid_idx ON topos_t (callid);
+
+INSERT INTO version (table_name, table_version) values ('topos_t','1');
+

+ 1 - 0
utils/kamctl/dbtext/kamailio/topos_d

@@ -0,0 +1 @@
+id(int,auto) rectime(int) callid(string) a_uuid(string) b_uuid(string) a_contact(string) b_contact(string) a_tag(string) b_tag(string) a_rr(string) b_rr(string) iflags(int) a_uri(string) b_uri(string) r_uri(string) a_srcip(string) b_srcip(string) 

+ 1 - 0
utils/kamctl/dbtext/kamailio/topos_t

@@ -0,0 +1 @@
+id(int,auto) rectime(int) callid(string) a_uuid(string) b_uuid(string) direction(int) x_via(string) 

+ 2 - 0
utils/kamctl/dbtext/kamailio/version

@@ -53,6 +53,8 @@ silo:8
 sip_trace:4
 sip_trace:4
 speed_dial:2
 speed_dial:2
 subscriber:6
 subscriber:6
+topos_d:1
+topos_t:1
 trusted:6
 trusted:6
 uacreg:2
 uacreg:2
 uid_credentials:7
 uid_credentials:7

+ 40 - 0
utils/kamctl/mysql/topos-create.sql

@@ -0,0 +1,40 @@
+CREATE TABLE `topos_d` (
+    `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+    `rectime` DATETIME NOT NULL,
+    `callid` VARCHAR(255) DEFAULT '' NOT NULL,
+    `a_uuid` VARCHAR(255) DEFAULT '' NOT NULL,
+    `b_uuid` VARCHAR(255) DEFAULT '' NOT NULL,
+    `a_contact` VARCHAR(128) DEFAULT '' NOT NULL,
+    `b_contact` VARCHAR(128) DEFAULT '' NOT NULL,
+    `a_tag` VARCHAR(64) NOT NULL,
+    `b_tag` VARCHAR(64) NOT NULL,
+    `a_rr` MEDIUMTEXT NOT NULL,
+    `b_rr` MEDIUMTEXT NOT NULL,
+    `iflags` INT(10) UNSIGNED DEFAULT 0 NOT NULL,
+    `a_uri` VARCHAR(128) NOT NULL,
+    `b_uri` VARCHAR(128) NOT NULL,
+    `r_uri` VARCHAR(128) NOT NULL,
+    `a_srcip` VARCHAR(50) DEFAULT '' NOT NULL,
+    `b_srcip` VARCHAR(50) DEFAULT '' NOT NULL
+);
+
+CREATE INDEX rectime_idx ON topos_d (`rectime`);
+CREATE INDEX a_callid_idx ON topos_d (`callid`);
+
+INSERT INTO version (table_name, table_version) values ('topos_d','1');
+
+CREATE TABLE `topos_t` (
+    `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+    `rectime` DATETIME NOT NULL,
+    `callid` VARCHAR(255) DEFAULT '' NOT NULL,
+    `a_uuid` VARCHAR(255) DEFAULT '' NOT NULL,
+    `b_uuid` VARCHAR(255) DEFAULT '' NOT NULL,
+    `direction` INT DEFAULT 0 NOT NULL,
+    `x_via` MEDIUMTEXT NOT NULL
+);
+
+CREATE INDEX rectime_idx ON topos_t (`rectime`);
+CREATE INDEX a_callid_idx ON topos_t (`callid`);
+
+INSERT INTO version (table_name, table_version) values ('topos_t','1');
+

+ 56 - 0
utils/kamctl/oracle/topos-create.sql

@@ -0,0 +1,56 @@
+CREATE TABLE topos_d (
+    id NUMBER(10) PRIMARY KEY,
+    rectime DATE,
+    callid VARCHAR2(255) DEFAULT '',
+    a_uuid VARCHAR2(255) DEFAULT '',
+    b_uuid VARCHAR2(255) DEFAULT '',
+    a_contact VARCHAR2(128) DEFAULT '',
+    b_contact VARCHAR2(128) DEFAULT '',
+    a_tag VARCHAR2(64),
+    b_tag VARCHAR2(64),
+    a_rr CLOB,
+    b_rr CLOB,
+    iflags NUMBER(10) DEFAULT 0 NOT NULL,
+    a_uri VARCHAR2(128),
+    b_uri VARCHAR2(128),
+    r_uri VARCHAR2(128),
+    a_srcip VARCHAR2(50) DEFAULT '',
+    b_srcip VARCHAR2(50) DEFAULT ''
+);
+
+CREATE OR REPLACE TRIGGER topos_d_tr
+before insert on topos_d FOR EACH ROW
+BEGIN
+  auto_id(:NEW.id);
+END topos_d_tr;
+/
+BEGIN map2users('topos_d'); END;
+/
+CREATE INDEX topos_d_rectime_idx  ON topos_d (rectime);
+CREATE INDEX topos_d_a_callid_idx  ON topos_d (callid);
+
+INSERT INTO version (table_name, table_version) values ('topos_d','1');
+
+CREATE TABLE topos_t (
+    id NUMBER(10) PRIMARY KEY,
+    rectime DATE,
+    callid VARCHAR2(255) DEFAULT '',
+    a_uuid VARCHAR2(255) DEFAULT '',
+    b_uuid VARCHAR2(255) DEFAULT '',
+    direction NUMBER(10) DEFAULT 0 NOT NULL,
+    x_via CLOB
+);
+
+CREATE OR REPLACE TRIGGER topos_t_tr
+before insert on topos_t FOR EACH ROW
+BEGIN
+  auto_id(:NEW.id);
+END topos_t_tr;
+/
+BEGIN map2users('topos_t'); END;
+/
+CREATE INDEX topos_t_rectime_idx  ON topos_t (rectime);
+CREATE INDEX topos_t_a_callid_idx  ON topos_t (callid);
+
+INSERT INTO version (table_name, table_version) values ('topos_t','1');
+

+ 40 - 0
utils/kamctl/postgres/topos-create.sql

@@ -0,0 +1,40 @@
+CREATE TABLE topos_d (
+    id SERIAL PRIMARY KEY NOT NULL,
+    rectime TIMESTAMP WITHOUT TIME ZONE NOT NULL,
+    callid VARCHAR(255) DEFAULT '' NOT NULL,
+    a_uuid VARCHAR(255) DEFAULT '' NOT NULL,
+    b_uuid VARCHAR(255) DEFAULT '' NOT NULL,
+    a_contact VARCHAR(128) DEFAULT '' NOT NULL,
+    b_contact VARCHAR(128) DEFAULT '' NOT NULL,
+    a_tag VARCHAR(64) NOT NULL,
+    b_tag VARCHAR(64) NOT NULL,
+    a_rr TEXT NOT NULL,
+    b_rr TEXT NOT NULL,
+    iflags INTEGER DEFAULT 0 NOT NULL,
+    a_uri VARCHAR(128) NOT NULL,
+    b_uri VARCHAR(128) NOT NULL,
+    r_uri VARCHAR(128) NOT NULL,
+    a_srcip VARCHAR(50) DEFAULT '' NOT NULL,
+    b_srcip VARCHAR(50) DEFAULT '' NOT NULL
+);
+
+CREATE INDEX topos_d_rectime_idx ON topos_d (rectime);
+CREATE INDEX topos_d_a_callid_idx ON topos_d (callid);
+
+INSERT INTO version (table_name, table_version) values ('topos_d','1');
+
+CREATE TABLE topos_t (
+    id SERIAL PRIMARY KEY NOT NULL,
+    rectime TIMESTAMP WITHOUT TIME ZONE NOT NULL,
+    callid VARCHAR(255) DEFAULT '' NOT NULL,
+    a_uuid VARCHAR(255) DEFAULT '' NOT NULL,
+    b_uuid VARCHAR(255) DEFAULT '' NOT NULL,
+    direction INTEGER DEFAULT 0 NOT NULL,
+    x_via TEXT NOT NULL
+);
+
+CREATE INDEX topos_t_rectime_idx ON topos_t (rectime);
+CREATE INDEX topos_t_a_callid_idx ON topos_t (callid);
+
+INSERT INTO version (table_name, table_version) values ('topos_t','1');
+

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

@@ -746,6 +746,40 @@
 		<column><field>table_name</field><type>DB1_STR</type></column>
 		<column><field>table_name</field><type>DB1_STR</type></column>
 		<column><field>table_version</field><type>DB1_INT</type></column>
 		<column><field>table_version</field><type>DB1_INT</type></column>
 	</db_table>
 	</db_table>
+	<!-- Declaration of topos_d table-->
+	<db_table id="topos_d">
+		<table_name>topos_d</table_name>
+		<db_url_id>mysql</db_url_id>
+		<column><field>id</field><type>DB1_INT</type></column>
+		<column><field>rectime</field><type>DB1_DATETIME</type></column>
+		<column><field>callid</field><type>DB1_STR</type></column>
+		<column><field>a_uuid</field><type>DB1_STR</type></column>
+		<column><field>b_uuid</field><type>DB1_STR</type></column>
+		<column><field>a_contact</field><type>DB1_STR</type></column>
+		<column><field>b_contact</field><type>DB1_STR</type></column>
+		<column><field>a_tag</field><type>DB1_STR</type></column>
+		<column><field>b_tag</field><type>DB1_STR</type></column>
+		<column><field>a_rr</field><type>DB1_BLOB</type></column>
+		<column><field>b_rr</field><type>DB1_BLOB</type></column>
+		<column><field>iflags</field><type>DB1_INT</type></column>
+		<column><field>a_uri</field><type>DB1_STR</type></column>
+		<column><field>b_uri</field><type>DB1_STR</type></column>
+		<column><field>r_uri</field><type>DB1_STR</type></column>
+		<column><field>a_srcip</field><type>DB1_STR</type></column>
+		<column><field>b_srcip</field><type>DB1_STR</type></column>
+	</db_table>
+	<!-- Declaration of topos_t table-->
+	<db_table id="topos_t">
+		<table_name>topos_t</table_name>
+		<db_url_id>mysql</db_url_id>
+		<column><field>id</field><type>DB1_INT</type></column>
+		<column><field>rectime</field><type>DB1_DATETIME</type></column>
+		<column><field>callid</field><type>DB1_STR</type></column>
+		<column><field>a_uuid</field><type>DB1_STR</type></column>
+		<column><field>b_uuid</field><type>DB1_STR</type></column>
+		<column><field>direction</field><type>DB1_INT</type></column>
+		<column><field>x_via</field><type>DB1_BLOB</type></column>
+	</db_table>
 	<!-- Declaration of uacreg table-->
 	<!-- Declaration of uacreg table-->
 	<db_table id="uacreg">
 	<db_table id="uacreg">
 		<table_name>uacreg</table_name>
 		<table_name>uacreg</table_name>
@@ -3823,6 +3857,136 @@
 			</query_cols>
 			</query_cols>
 		</cmd>
 		</cmd>
 	</mod>
 	</mod>
+	<!-- topos_d provisionning -->
+	<mod><mod_name>topos_d</mod_name>
+		<cmd><cmd_name>show</cmd_name>
+			<db_table_id>topos_d</db_table_id>
+			<cmd_type>DB1_QUERY</cmd_type>
+			<query_cols>
+				<col><field>id</field><link_cmd>update</link_cmd></col>
+				<col><field>rectime</field></col>
+				<col><field>callid</field></col>
+				<col><field>a_uuid</field></col>
+				<col><field>b_uuid</field></col>
+				<col><field>a_contact</field></col>
+				<col><field>b_contact</field></col>
+				<col><field>a_tag</field></col>
+				<col><field>b_tag</field></col>
+				<col><field>a_rr</field></col>
+				<col><field>b_rr</field></col>
+				<col><field>iflags</field></col>
+				<col><field>a_uri</field></col>
+				<col><field>b_uri</field></col>
+				<col><field>r_uri</field></col>
+				<col><field>a_srcip</field></col>
+				<col><field>b_srcip</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>add</cmd_name>
+			<db_table_id>topos_d</db_table_id>
+			<cmd_type>DB1_INSERT</cmd_type>
+			<query_cols>
+				<col><field>rectime</field></col>
+				<col><field>callid</field></col>
+				<col><field>a_uuid</field></col>
+				<col><field>b_uuid</field></col>
+				<col><field>a_contact</field></col>
+				<col><field>b_contact</field></col>
+				<col><field>a_tag</field></col>
+				<col><field>b_tag</field></col>
+				<col><field>a_rr</field></col>
+				<col><field>b_rr</field></col>
+				<col><field>iflags</field></col>
+				<col><field>a_uri</field></col>
+				<col><field>b_uri</field></col>
+				<col><field>r_uri</field></col>
+				<col><field>a_srcip</field></col>
+				<col><field>b_srcip</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>update</cmd_name>
+			<db_table_id>topos_d</db_table_id>
+			<cmd_type>DB1_UPDATE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+			<query_cols>
+				<col><field>rectime</field></col>
+				<col><field>callid</field></col>
+				<col><field>a_uuid</field></col>
+				<col><field>b_uuid</field></col>
+				<col><field>a_contact</field></col>
+				<col><field>b_contact</field></col>
+				<col><field>a_tag</field></col>
+				<col><field>b_tag</field></col>
+				<col><field>a_rr</field></col>
+				<col><field>b_rr</field></col>
+				<col><field>iflags</field></col>
+				<col><field>a_uri</field></col>
+				<col><field>b_uri</field></col>
+				<col><field>r_uri</field></col>
+				<col><field>a_srcip</field></col>
+				<col><field>b_srcip</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>delete</cmd_name>
+			<db_table_id>topos_d</db_table_id>
+			<cmd_type>DB1_DELETE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+		</cmd>
+	</mod>
+	<!-- topos_t provisionning -->
+	<mod><mod_name>topos_t</mod_name>
+		<cmd><cmd_name>show</cmd_name>
+			<db_table_id>topos_t</db_table_id>
+			<cmd_type>DB1_QUERY</cmd_type>
+			<query_cols>
+				<col><field>id</field><link_cmd>update</link_cmd></col>
+				<col><field>rectime</field></col>
+				<col><field>callid</field></col>
+				<col><field>a_uuid</field></col>
+				<col><field>b_uuid</field></col>
+				<col><field>direction</field></col>
+				<col><field>x_via</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>add</cmd_name>
+			<db_table_id>topos_t</db_table_id>
+			<cmd_type>DB1_INSERT</cmd_type>
+			<query_cols>
+				<col><field>rectime</field></col>
+				<col><field>callid</field></col>
+				<col><field>a_uuid</field></col>
+				<col><field>b_uuid</field></col>
+				<col><field>direction</field></col>
+				<col><field>x_via</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>update</cmd_name>
+			<db_table_id>topos_t</db_table_id>
+			<cmd_type>DB1_UPDATE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+			<query_cols>
+				<col><field>rectime</field></col>
+				<col><field>callid</field></col>
+				<col><field>a_uuid</field></col>
+				<col><field>b_uuid</field></col>
+				<col><field>direction</field></col>
+				<col><field>x_via</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>delete</cmd_name>
+			<db_table_id>topos_t</db_table_id>
+			<cmd_type>DB1_DELETE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+		</cmd>
+	</mod>
 	<!-- uacreg provisionning -->
 	<!-- uacreg provisionning -->
 	<mod><mod_name>uacreg</mod_name>
 	<mod><mod_name>uacreg</mod_name>
 		<cmd><cmd_name>show</cmd_name>
 		<cmd><cmd_name>show</cmd_name>

+ 130 - 0
utils/kamctl/xhttp_pi/topos-mod

@@ -0,0 +1,130 @@
+	<!-- topos_d provisionning -->
+	<mod><mod_name>topos_d</mod_name>
+		<cmd><cmd_name>show</cmd_name>
+			<db_table_id>topos_d</db_table_id>
+			<cmd_type>DB1_QUERY</cmd_type>
+			<query_cols>
+				<col><field>id</field><link_cmd>update</link_cmd></col>
+				<col><field>rectime</field></col>
+				<col><field>callid</field></col>
+				<col><field>a_uuid</field></col>
+				<col><field>b_uuid</field></col>
+				<col><field>a_contact</field></col>
+				<col><field>b_contact</field></col>
+				<col><field>a_tag</field></col>
+				<col><field>b_tag</field></col>
+				<col><field>a_rr</field></col>
+				<col><field>b_rr</field></col>
+				<col><field>iflags</field></col>
+				<col><field>a_uri</field></col>
+				<col><field>b_uri</field></col>
+				<col><field>r_uri</field></col>
+				<col><field>a_srcip</field></col>
+				<col><field>b_srcip</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>add</cmd_name>
+			<db_table_id>topos_d</db_table_id>
+			<cmd_type>DB1_INSERT</cmd_type>
+			<query_cols>
+				<col><field>rectime</field></col>
+				<col><field>callid</field></col>
+				<col><field>a_uuid</field></col>
+				<col><field>b_uuid</field></col>
+				<col><field>a_contact</field></col>
+				<col><field>b_contact</field></col>
+				<col><field>a_tag</field></col>
+				<col><field>b_tag</field></col>
+				<col><field>a_rr</field></col>
+				<col><field>b_rr</field></col>
+				<col><field>iflags</field></col>
+				<col><field>a_uri</field></col>
+				<col><field>b_uri</field></col>
+				<col><field>r_uri</field></col>
+				<col><field>a_srcip</field></col>
+				<col><field>b_srcip</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>update</cmd_name>
+			<db_table_id>topos_d</db_table_id>
+			<cmd_type>DB1_UPDATE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+			<query_cols>
+				<col><field>rectime</field></col>
+				<col><field>callid</field></col>
+				<col><field>a_uuid</field></col>
+				<col><field>b_uuid</field></col>
+				<col><field>a_contact</field></col>
+				<col><field>b_contact</field></col>
+				<col><field>a_tag</field></col>
+				<col><field>b_tag</field></col>
+				<col><field>a_rr</field></col>
+				<col><field>b_rr</field></col>
+				<col><field>iflags</field></col>
+				<col><field>a_uri</field></col>
+				<col><field>b_uri</field></col>
+				<col><field>r_uri</field></col>
+				<col><field>a_srcip</field></col>
+				<col><field>b_srcip</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>delete</cmd_name>
+			<db_table_id>topos_d</db_table_id>
+			<cmd_type>DB1_DELETE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+		</cmd>
+	</mod>
+	<!-- topos_t provisionning -->
+	<mod><mod_name>topos_t</mod_name>
+		<cmd><cmd_name>show</cmd_name>
+			<db_table_id>topos_t</db_table_id>
+			<cmd_type>DB1_QUERY</cmd_type>
+			<query_cols>
+				<col><field>id</field><link_cmd>update</link_cmd></col>
+				<col><field>rectime</field></col>
+				<col><field>callid</field></col>
+				<col><field>a_uuid</field></col>
+				<col><field>b_uuid</field></col>
+				<col><field>direction</field></col>
+				<col><field>x_via</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>add</cmd_name>
+			<db_table_id>topos_t</db_table_id>
+			<cmd_type>DB1_INSERT</cmd_type>
+			<query_cols>
+				<col><field>rectime</field></col>
+				<col><field>callid</field></col>
+				<col><field>a_uuid</field></col>
+				<col><field>b_uuid</field></col>
+				<col><field>direction</field></col>
+				<col><field>x_via</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>update</cmd_name>
+			<db_table_id>topos_t</db_table_id>
+			<cmd_type>DB1_UPDATE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+			<query_cols>
+				<col><field>rectime</field></col>
+				<col><field>callid</field></col>
+				<col><field>a_uuid</field></col>
+				<col><field>b_uuid</field></col>
+				<col><field>direction</field></col>
+				<col><field>x_via</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>delete</cmd_name>
+			<db_table_id>topos_t</db_table_id>
+			<cmd_type>DB1_DELETE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+		</cmd>
+	</mod>

+ 34 - 0
utils/kamctl/xhttp_pi/topos-table

@@ -0,0 +1,34 @@
+	<!-- Declaration of topos_d table-->
+	<db_table id="topos_d">
+		<table_name>topos_d</table_name>
+		<db_url_id>mysql</db_url_id>
+		<column><field>id</field><type>DB1_INT</type></column>
+		<column><field>rectime</field><type>DB1_DATETIME</type></column>
+		<column><field>callid</field><type>DB1_STR</type></column>
+		<column><field>a_uuid</field><type>DB1_STR</type></column>
+		<column><field>b_uuid</field><type>DB1_STR</type></column>
+		<column><field>a_contact</field><type>DB1_STR</type></column>
+		<column><field>b_contact</field><type>DB1_STR</type></column>
+		<column><field>a_tag</field><type>DB1_STR</type></column>
+		<column><field>b_tag</field><type>DB1_STR</type></column>
+		<column><field>a_rr</field><type>DB1_BLOB</type></column>
+		<column><field>b_rr</field><type>DB1_BLOB</type></column>
+		<column><field>iflags</field><type>DB1_INT</type></column>
+		<column><field>a_uri</field><type>DB1_STR</type></column>
+		<column><field>b_uri</field><type>DB1_STR</type></column>
+		<column><field>r_uri</field><type>DB1_STR</type></column>
+		<column><field>a_srcip</field><type>DB1_STR</type></column>
+		<column><field>b_srcip</field><type>DB1_STR</type></column>
+	</db_table>
+	<!-- Declaration of topos_t table-->
+	<db_table id="topos_t">
+		<table_name>topos_t</table_name>
+		<db_url_id>mysql</db_url_id>
+		<column><field>id</field><type>DB1_INT</type></column>
+		<column><field>rectime</field><type>DB1_DATETIME</type></column>
+		<column><field>callid</field><type>DB1_STR</type></column>
+		<column><field>a_uuid</field><type>DB1_STR</type></column>
+		<column><field>b_uuid</field><type>DB1_STR</type></column>
+		<column><field>direction</field><type>DB1_INT</type></column>
+		<column><field>x_via</field><type>DB1_BLOB</type></column>
+	</db_table>