Procházet zdrojové kódy

kamctl: regenerated db script for mohqueue tables

Daniel-Constantin Mierla před 12 roky
rodič
revize
3022220043

+ 12 - 0
utils/kamctl/db_berkeley/kamailio/mohqcalls

@@ -0,0 +1,12 @@
+METADATA_COLUMNS
+id(int) mohq_id(int) call_id(str) call_status(int) call_from(str) call_contact(str) call_time(datetime)
+METADATA_KEY
+
+METADATA_READONLY
+0
+METADATA_LOGFLAGS
+0
+METADATA_DEFAULTS
+NIL|NIL|NIL|NIL|NIL|NIL|'to_date('','yyyy-mm-dd hh24:mi:ss')'
+mohqcalls|
+mohqcalls|1

+ 12 - 0
utils/kamctl/db_berkeley/kamailio/mohqueues

@@ -0,0 +1,12 @@
+METADATA_COLUMNS
+id(int) name(str) uri(str) mohdir(str) mohfile(str) debug(int)
+METADATA_KEY
+
+METADATA_READONLY
+0
+METADATA_LOGFLAGS
+0
+METADATA_DEFAULTS
+NIL|NIL|NIL|NIL|NIL|NIL
+mohqueues|
+mohqueues|1

+ 24 - 0
utils/kamctl/db_sqlite/mohqueue-create.sql

@@ -0,0 +1,24 @@
+INSERT INTO version (table_name, table_version) values ('mohqcalls','1');
+CREATE TABLE mohqcalls (
+    id INTEGER PRIMARY KEY NOT NULL,
+    mohq_id INTEGER NOT NULL,
+    call_id VARCHAR(100) NOT NULL,
+    call_status INTEGER NOT NULL,
+    call_from VARCHAR(100) NOT NULL,
+    call_contact VARCHAR(100),
+    call_time TIMESTAMP WITHOUT TIME ZONE DEFAULT 'to_date('','yyyy-mm-dd hh24:mi:ss')' NOT NULL,
+    CONSTRAINT mohqcalls_mohqcalls_idx UNIQUE (call_id)
+);
+
+INSERT INTO version (table_name, table_version) values ('mohqueues','1');
+CREATE TABLE mohqueues (
+    id INTEGER PRIMARY KEY NOT NULL,
+    name VARCHAR(25) NOT NULL,
+    uri VARCHAR(100) NOT NULL,
+    mohdir VARCHAR(100),
+    mohfile VARCHAR(100) NOT NULL,
+    debug INTEGER NOT NULL,
+    CONSTRAINT mohqueues_mohqueue_uri_idx UNIQUE (uri),
+    CONSTRAINT mohqueues_mohqueue_name_idx UNIQUE (name)
+);
+

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

@@ -0,0 +1,2 @@
+id(int,auto) mohq_id(int) call_id(string) call_status(int) call_from(string) call_contact(string,null) call_time(int) 
+mohqcalls:1

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

@@ -0,0 +1,2 @@
+id(int,auto) name(string) uri(string) mohdir(string,null) mohfile(string) debug(int) 
+mohqueues:1

+ 24 - 0
utils/kamctl/mysql/mohqueue-create.sql

@@ -0,0 +1,24 @@
+INSERT INTO version (table_name, table_version) values ('mohqcalls','1');
+CREATE TABLE mohqcalls (
+    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+    mohq_id INT(10) UNSIGNED NOT NULL,
+    call_id VARCHAR(100) NOT NULL,
+    call_status INT UNSIGNED NOT NULL,
+    call_from VARCHAR(100) NOT NULL,
+    call_contact VARCHAR(100),
+    call_time DATETIME DEFAULT 'to_date('','yyyy-mm-dd hh24:mi:ss')' NOT NULL,
+    CONSTRAINT mohqcalls_idx UNIQUE (call_id)
+);
+
+INSERT INTO version (table_name, table_version) values ('mohqueues','1');
+CREATE TABLE mohqueues (
+    id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
+    name VARCHAR(25) NOT NULL,
+    uri VARCHAR(100) NOT NULL,
+    mohdir VARCHAR(100),
+    mohfile VARCHAR(100) NOT NULL,
+    debug INT NOT NULL,
+    CONSTRAINT mohqueue_uri_idx UNIQUE (uri),
+    CONSTRAINT mohqueue_name_idx UNIQUE (name)
+);
+

+ 40 - 0
utils/kamctl/oracle/mohqueue-create.sql

@@ -0,0 +1,40 @@
+INSERT INTO version (table_name, table_version) values ('mohqcalls','1');
+CREATE TABLE mohqcalls (
+    id NUMBER(10) PRIMARY KEY,
+    mohq_id NUMBER(10),
+    call_id VARCHAR2(100),
+    call_status NUMBER(10),
+    call_from VARCHAR2(100),
+    call_contact VARCHAR2(100),
+    call_time DATE DEFAULT to_date('','yyyy-mm-dd hh24:mi:ss'),
+    CONSTRAINT mohqcalls_mohqcalls_idx  UNIQUE (call_id)
+);
+
+CREATE OR REPLACE TRIGGER mohqcalls_tr
+before insert on mohqcalls FOR EACH ROW
+BEGIN
+  auto_id(:NEW.id);
+END mohqcalls_tr;
+/
+BEGIN map2users('mohqcalls'); END;
+/
+INSERT INTO version (table_name, table_version) values ('mohqueues','1');
+CREATE TABLE mohqueues (
+    id NUMBER(10) PRIMARY KEY,
+    name VARCHAR2(25),
+    uri VARCHAR2(100),
+    mohdir VARCHAR2(100),
+    mohfile VARCHAR2(100),
+    debug NUMBER(10),
+    CONSTRAINT mohqueues_mohqueue_uri_idx  UNIQUE (uri),
+    CONSTRAINT mohqueues_mohqueue_name_idx  UNIQUE (name)
+);
+
+CREATE OR REPLACE TRIGGER mohqueues_tr
+before insert on mohqueues FOR EACH ROW
+BEGIN
+  auto_id(:NEW.id);
+END mohqueues_tr;
+/
+BEGIN map2users('mohqueues'); END;
+/

+ 24 - 0
utils/kamctl/postgres/mohqueue-create.sql

@@ -0,0 +1,24 @@
+INSERT INTO version (table_name, table_version) values ('mohqcalls','1');
+CREATE TABLE mohqcalls (
+    id SERIAL PRIMARY KEY NOT NULL,
+    mohq_id INTEGER NOT NULL,
+    call_id VARCHAR(100) NOT NULL,
+    call_status INTEGER NOT NULL,
+    call_from VARCHAR(100) NOT NULL,
+    call_contact VARCHAR(100),
+    call_time TIMESTAMP WITHOUT TIME ZONE DEFAULT 'to_date('','yyyy-mm-dd hh24:mi:ss')' NOT NULL,
+    CONSTRAINT mohqcalls_mohqcalls_idx UNIQUE (call_id)
+);
+
+INSERT INTO version (table_name, table_version) values ('mohqueues','1');
+CREATE TABLE mohqueues (
+    id SERIAL PRIMARY KEY NOT NULL,
+    name VARCHAR(25) NOT NULL,
+    uri VARCHAR(100) NOT NULL,
+    mohdir VARCHAR(100),
+    mohfile VARCHAR(100) NOT NULL,
+    debug INTEGER NOT NULL,
+    CONSTRAINT mohqueues_mohqueue_uri_idx UNIQUE (uri),
+    CONSTRAINT mohqueues_mohqueue_name_idx UNIQUE (name)
+);
+

+ 97 - 0
utils/kamctl/xhttp_pi/mohqueue-mod

@@ -0,0 +1,97 @@
+	<!-- mohqcalls provisionning -->
+	<mod><mod_name>mohqcalls</mod_name>
+		<cmd><cmd_name>show</cmd_name>
+			<db_table_id>mohqcalls</db_table_id>
+			<cmd_type>DB1_QUERY</cmd_type>
+			<query_cols>
+				<col><field>id</field></col>
+				<col><field>mohq_id</field></col>
+				<col><field>call_id</field></col>
+				<col><field>call_status</field></col>
+				<col><field>call_from</field></col>
+				<col><field>call_contact</field></col>
+				<col><field>call_time</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>add</cmd_name>
+			<db_table_id>mohqcalls</db_table_id>
+			<cmd_type>DB1_INSERT</cmd_type>
+			<query_cols>
+				<col><field>mohq_id</field></col>
+				<col><field>call_id</field></col>
+				<col><field>call_status</field></col>
+				<col><field>call_from</field></col>
+				<col><field>call_contact</field></col>
+				<col><field>call_time</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>update</cmd_name>
+			<db_table_id>mohqcalls</db_table_id>
+			<cmd_type>DB1_UPDATE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+			<query_cols>
+				<col><field>mohq_id</field></col>
+				<col><field>call_id</field></col>
+				<col><field>call_status</field></col>
+				<col><field>call_from</field></col>
+				<col><field>call_contact</field></col>
+				<col><field>call_time</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>delete</cmd_name>
+			<db_table_id>mohqcalls</db_table_id>
+			<cmd_type>DB1_DELETE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+		</cmd>
+	</mod>
+	<!-- mohqueues provisionning -->
+	<mod><mod_name>mohqueues</mod_name>
+		<cmd><cmd_name>show</cmd_name>
+			<db_table_id>mohqueues</db_table_id>
+			<cmd_type>DB1_QUERY</cmd_type>
+			<query_cols>
+				<col><field>id</field></col>
+				<col><field>name</field></col>
+				<col><field>uri</field></col>
+				<col><field>mohdir</field></col>
+				<col><field>mohfile</field></col>
+				<col><field>debug</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>add</cmd_name>
+			<db_table_id>mohqueues</db_table_id>
+			<cmd_type>DB1_INSERT</cmd_type>
+			<query_cols>
+				<col><field>name</field></col>
+				<col><field>uri</field></col>
+				<col><field>mohdir</field></col>
+				<col><field>mohfile</field></col>
+				<col><field>debug</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>update</cmd_name>
+			<db_table_id>mohqueues</db_table_id>
+			<cmd_type>DB1_UPDATE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+			<query_cols>
+				<col><field>name</field></col>
+				<col><field>uri</field></col>
+				<col><field>mohdir</field></col>
+				<col><field>mohfile</field></col>
+				<col><field>debug</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>delete</cmd_name>
+			<db_table_id>mohqueues</db_table_id>
+			<cmd_type>DB1_DELETE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+		</cmd>
+	</mod>

+ 23 - 0
utils/kamctl/xhttp_pi/mohqueue-table

@@ -0,0 +1,23 @@
+	<!-- Declaration of mohqcalls table-->
+	<db_table id="mohqcalls">
+		<table_name>mohqcalls</table_name>
+		<db_url_id>mysql</db_url_id>
+		<column><field>id</field><type>DB1_INT</type></column>
+		<column><field>mohq_id</field><type>DB1_INT</type></column>
+		<column><field>call_id</field><type>DB1_STR</type></column>
+		<column><field>call_status</field><type>DB1_INT</type></column>
+		<column><field>call_from</field><type>DB1_STR</type></column>
+		<column><field>call_contact</field><type>DB1_STR</type></column>
+		<column><field>call_time</field><type>DB1_DATETIME</type></column>
+	</db_table>
+	<!-- Declaration of mohqueues table-->
+	<db_table id="mohqueues">
+		<table_name>mohqueues</table_name>
+		<db_url_id>mysql</db_url_id>
+		<column><field>id</field><type>DB1_INT</type></column>
+		<column><field>name</field><type>DB1_STR</type></column>
+		<column><field>uri</field><type>DB1_STR</type></column>
+		<column><field>mohdir</field><type>DB1_STR</type></column>
+		<column><field>mohfile</field><type>DB1_STR</type></column>
+		<column><field>debug</field><type>DB1_INT</type></column>
+	</db_table>

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

@@ -393,6 +393,29 @@
 		<column><field>second</field><type>DB1_INT</type></column>
 		<column><field>res</field><type>DB1_INT</type></column>
 	</db_table>
+	<!-- Declaration of mohqcalls table-->
+	<db_table id="mohqcalls">
+		<table_name>mohqcalls</table_name>
+		<db_url_id>mysql</db_url_id>
+		<column><field>id</field><type>DB1_INT</type></column>
+		<column><field>mohq_id</field><type>DB1_INT</type></column>
+		<column><field>call_id</field><type>DB1_STR</type></column>
+		<column><field>call_status</field><type>DB1_INT</type></column>
+		<column><field>call_from</field><type>DB1_STR</type></column>
+		<column><field>call_contact</field><type>DB1_STR</type></column>
+		<column><field>call_time</field><type>DB1_DATETIME</type></column>
+	</db_table>
+	<!-- Declaration of mohqueues table-->
+	<db_table id="mohqueues">
+		<table_name>mohqueues</table_name>
+		<db_url_id>mysql</db_url_id>
+		<column><field>id</field><type>DB1_INT</type></column>
+		<column><field>name</field><type>DB1_STR</type></column>
+		<column><field>uri</field><type>DB1_STR</type></column>
+		<column><field>mohdir</field><type>DB1_STR</type></column>
+		<column><field>mohfile</field><type>DB1_STR</type></column>
+		<column><field>debug</field><type>DB1_INT</type></column>
+	</db_table>
 	<!-- Declaration of silo table-->
 	<db_table id="silo">
 		<table_name>silo</table_name>
@@ -2414,6 +2437,103 @@
 			</query_cols>
 		</cmd>
 	</mod>
+	<!-- mohqcalls provisionning -->
+	<mod><mod_name>mohqcalls</mod_name>
+		<cmd><cmd_name>show</cmd_name>
+			<db_table_id>mohqcalls</db_table_id>
+			<cmd_type>DB1_QUERY</cmd_type>
+			<query_cols>
+				<col><field>id</field></col>
+				<col><field>mohq_id</field></col>
+				<col><field>call_id</field></col>
+				<col><field>call_status</field></col>
+				<col><field>call_from</field></col>
+				<col><field>call_contact</field></col>
+				<col><field>call_time</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>add</cmd_name>
+			<db_table_id>mohqcalls</db_table_id>
+			<cmd_type>DB1_INSERT</cmd_type>
+			<query_cols>
+				<col><field>mohq_id</field></col>
+				<col><field>call_id</field></col>
+				<col><field>call_status</field></col>
+				<col><field>call_from</field></col>
+				<col><field>call_contact</field></col>
+				<col><field>call_time</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>update</cmd_name>
+			<db_table_id>mohqcalls</db_table_id>
+			<cmd_type>DB1_UPDATE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+			<query_cols>
+				<col><field>mohq_id</field></col>
+				<col><field>call_id</field></col>
+				<col><field>call_status</field></col>
+				<col><field>call_from</field></col>
+				<col><field>call_contact</field></col>
+				<col><field>call_time</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>delete</cmd_name>
+			<db_table_id>mohqcalls</db_table_id>
+			<cmd_type>DB1_DELETE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+		</cmd>
+	</mod>
+	<!-- mohqueues provisionning -->
+	<mod><mod_name>mohqueues</mod_name>
+		<cmd><cmd_name>show</cmd_name>
+			<db_table_id>mohqueues</db_table_id>
+			<cmd_type>DB1_QUERY</cmd_type>
+			<query_cols>
+				<col><field>id</field></col>
+				<col><field>name</field></col>
+				<col><field>uri</field></col>
+				<col><field>mohdir</field></col>
+				<col><field>mohfile</field></col>
+				<col><field>debug</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>add</cmd_name>
+			<db_table_id>mohqueues</db_table_id>
+			<cmd_type>DB1_INSERT</cmd_type>
+			<query_cols>
+				<col><field>name</field></col>
+				<col><field>uri</field></col>
+				<col><field>mohdir</field></col>
+				<col><field>mohfile</field></col>
+				<col><field>debug</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>update</cmd_name>
+			<db_table_id>mohqueues</db_table_id>
+			<cmd_type>DB1_UPDATE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+			<query_cols>
+				<col><field>name</field></col>
+				<col><field>uri</field></col>
+				<col><field>mohdir</field></col>
+				<col><field>mohfile</field></col>
+				<col><field>debug</field></col>
+			</query_cols>
+		</cmd>
+		<cmd><cmd_name>delete</cmd_name>
+			<db_table_id>mohqueues</db_table_id>
+			<cmd_type>DB1_DELETE</cmd_type>
+			<clause_cols>
+				<col><field>id</field><operator>=</operator></col>
+			</clause_cols>
+		</cmd>
+	</mod>
 	<!-- silo provisionning -->
 	<mod><mod_name>silo</mod_name>
 		<cmd><cmd_name>show</cmd_name>