Browse Source

lib/srdb1: sml definitions for db tables of topos module

Daniel-Constantin Mierla 9 years ago
parent
commit
087b987ef2
3 changed files with 261 additions and 0 deletions
  1. 13 0
      lib/srdb1/schema/kamailio-topos.xml
  2. 161 0
      lib/srdb1/schema/topos_d.xml
  3. 87 0
      lib/srdb1/schema/topos_t.xml

+ 13 - 0
lib/srdb1/schema/kamailio-topos.xml

@@ -0,0 +1,13 @@
+<?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>Topology Stripping</name>
+    <xi:include href="topos_d.xml"/>
+    <xi:include href="topos_t.xml"/>
+</database>

+ 161 - 0
lib/srdb1/schema/topos_d.xml

@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table PUBLIC "-//pub/kamailio/.org//DTD DBSchema V1.1//EN" 
+  "http://kamailio.org/pub/kamailio/dbschema/dtd/1.1/dbschema.dtd" [
+
+<!ENTITY % entities SYSTEM "entities.xml">
+%entities;
+
+]>
+
+<table id="topos_d" xmlns:db="http://docbook.org/ns/docbook">
+    <name>topos_d</name>
+    <version>1</version>
+    <type db="mysql">&MYSQL_TABLE_TYPE;</type>
+    <description>
+		<db:para>This table is used to store topos structures in database. More
+			informations can be found in the topos module documentation at:
+			&KAMAILIO_MOD_DOC;topos.html.
+        </db:para>
+    </description>
+
+    <column id="id">
+        <name>id</name>
+        <type>unsigned int</type>
+        <size>&table_id_len;</size>
+        <autoincrement/>
+        <primary/>
+        <type db="dbtext">int,auto</type>
+        <description>unique ID</description>
+    </column>
+    <column id="rectime">
+        <name>rectime</name>
+        <type>datetime</type>
+        <description>Date and time when this record was written.</description>
+    </column>
+
+    <column id="a_callid">
+        <name>callid</name>
+        <type>string</type>
+        <size>&callid_len;</size>
+        <default/>
+        <description>Call ID from SIP message</description>
+        <natural/>
+    </column>
+
+    <column id="a_uuid">
+        <name>a_uuid</name>
+        <type>string</type>
+        <size>&callid_len;</size>
+        <default/>
+        <description>UUID for A side</description>
+        <natural/>
+	</column>
+
+    <column id="b_uuid">
+        <name>b_uuid</name>
+        <type>string</type>
+        <size>&callid_len;</size>
+        <default/>
+        <description>UUID for B side</description>
+        <natural/>
+	</column>
+
+     <column id="a_contact">
+        <name>a_contact</name>
+        <type>string</type>
+        <size>&uri_len;</size>
+        <default/>
+        <description>Contact address - A side</description>
+    </column>
+
+    <column id="b_contact">
+        <name>b_contact</name>
+        <type>string</type>
+        <size>&uri_len;</size>
+        <default/>
+        <description>Contact address - B side</description>
+    </column>
+
+	<column id="a_tag">
+		<name>a_tag</name>
+		<type>string</type>
+		<size>&user_len;</size>
+		<description>From tag.</description>
+	</column>
+
+	<column id="b_tag">
+		<name>b_tag</name>
+		<type>string</type>
+		<size>&user_len;</size>
+		<description>From tag.</description>
+	</column>
+
+   <column id="a_rr">
+        <name>a_rr</name>
+        <type>largetext</type>
+        <description>Record route - A side</description>
+	</column>
+
+    <column id="b_rr">
+        <name>b_rr</name>
+        <type>largetext</type>
+        <description>Record route - B side</description>
+    </column>
+
+	<column id="iflags">
+		<name>iflags</name>
+		<type>unsigned int</type>
+		<size>10</size>
+		<default>0</default>
+		<description>The internal flags.
+		</description>
+	</column>
+
+	<column id="a_uri">
+		<name>a_uri</name>
+		<type>string</type>
+		<size>&uri_len;</size>
+		<description>The URI of the From header</description>
+	</column>
+
+	<column id="b_uri">
+		<name>b_uri</name>
+		<type>string</type>
+		<size>&uri_len;</size>
+		<description>The URI of the To header</description>
+	</column>
+
+	<column id="r_uri">
+		<name>r_uri</name>
+		<type>string</type>
+		<size>&uri_len;</size>
+		<description>The R-URI</description>
+	</column>
+
+    <column id="a_srcip">
+        <name>a_srcip</name>
+        <type>string</type>
+        <size>&ip_add_len;</size>
+        <default/>
+        <description>Source IP address</description>
+    </column>
+
+    <column id="b_srcip">
+        <name>b_srcip</name>
+        <type>string</type>
+        <size>&ip_add_len;</size>
+        <default/>
+        <description>Destination IP address</description>
+    </column>
+
+    <index>
+        <name>rectime_idx</name>
+        <colref linkend="rectime"/>
+    </index>
+
+    <index>
+        <name>a_callid_idx</name>
+        <colref linkend="a_callid"/>
+    </index>
+
+</table>

+ 87 - 0
lib/srdb1/schema/topos_t.xml

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table PUBLIC "-//pub/kamailio/.org//DTD DBSchema V1.1//EN" 
+  "http://kamailio.org/pub/kamailio/dbschema/dtd/1.1/dbschema.dtd" [
+
+<!ENTITY % entities SYSTEM "entities.xml">
+%entities;
+
+]>
+
+<table id="topos_t" xmlns:db="http://docbook.org/ns/docbook">
+    <name>topos_t</name>
+    <version>1</version>
+    <type db="mysql">&MYSQL_TABLE_TYPE;</type>
+    <description>
+		<db:para>This table is used to store topos structures in database. More
+			informations can be found in the topos module documentation at:
+			&KAMAILIO_MOD_DOC;topos.html.
+        </db:para>
+    </description>
+
+    <column id="id">
+        <name>id</name>
+        <type>unsigned int</type>
+        <size>&table_id_len;</size>
+        <autoincrement/>
+        <primary/>
+        <type db="dbtext">int,auto</type>
+        <description>unique ID</description>
+    </column>
+    <column id="rectime">
+        <name>rectime</name>
+        <type>datetime</type>
+        <description>Date and time when this record was written.</description>
+    </column>
+
+    <column id="a_callid">
+        <name>callid</name>
+        <type>string</type>
+        <size>&callid_len;</size>
+        <default/>
+        <description>Call ID from SIP message</description>
+        <natural/>
+    </column>
+
+    <column id="a_uuid">
+        <name>a_uuid</name>
+        <type>string</type>
+        <size>&callid_len;</size>
+        <default/>
+        <description>UUID for A side</description>
+        <natural/>
+	</column>
+
+    <column id="b_uuid">
+        <name>b_uuid</name>
+        <type>string</type>
+        <size>&callid_len;</size>
+        <default/>
+        <description>UUID for B side</description>
+        <natural/>
+	</column>
+
+    <column id="direction">
+        <name>direction</name>
+        <type>int</type>
+        <description>Forwarding direction</description>
+        <default>0</default>
+        <natural/>
+	</column>
+
+    <column>
+        <name>x_via</name>
+        <type>largetext</type>
+        <description>Via stack - A or B side</description>
+    </column>
+
+    <index>
+        <name>rectime_idx</name>
+        <colref linkend="rectime"/>
+    </index>
+
+    <index>
+        <name>a_callid_idx</name>
+        <colref linkend="a_callid"/>
+    </index>
+
+</table>