[sr-dev] git:master: modules_k/drouting: DB schema files for Drouting module

Raul Alexis Betancor Santana rabs at dimension-virtual.com
Sun Jan 3 14:16:45 CET 2010


Module: sip-router
Branch: master
Commit: 1c1555b1ac761b20314d7411ee9dc7e6f401ca64
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1c1555b1ac761b20314d7411ee9dc7e6f401ca64

Author: Raul Alexis Betancor Santana <rabs at dimension-virtual.com>
Committer: Raul Alexis Betancor Santana <rabs at dimension-virtual.com>
Date:   Sun Jan  3 12:41:01 2010 +0000

modules_k/drouting: DB schema files for Drouting module

	- DB schema files for Drouting module, synced with latest OpenSIPS version

---

 lib/srdb1/schema/dr_gateways.xml |   84 ++++++++++++++++++++++++++++++++++++
 lib/srdb1/schema/dr_groups.xml   |   64 +++++++++++++++++++++++++++
 lib/srdb1/schema/dr_gw_lists.xml |   47 ++++++++++++++++++++
 lib/srdb1/schema/dr_rules.xml    |   88 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 283 insertions(+), 0 deletions(-)

diff --git a/lib/srdb1/schema/dr_gateways.xml b/lib/srdb1/schema/dr_gateways.xml
new file mode 100644
index 0000000..5c81815
--- /dev/null
+++ b/lib/srdb1/schema/dr_gateways.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table 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;
+
+]>
+
+<table id="dr_gateways" xmlns:db="http://docbook.org/ns/docbook">
+	<name>dr_gateways</name>
+	<version>3</version>
+	<type db="mysql">&MYSQL_TABLE_TYPE;</type>
+	<description>
+		<db:para>This table is used by the Dynamic Routing module to store
+		information about the destinations/gateways where to route calls.
+		More information can be found at: &OPENSIPS_MOD_DOC;drouting.html.
+		</db:para>
+	</description>
+
+	<column id="gwid">
+		<name>gwid</name>
+		<type>unsigned int</type>
+		<size>&table_id_len;</size>
+		<autoincrement/>
+		<primary/>
+		<type db="dbtext">int,auto</type>
+		<description>GW unique ID - used to link the GW from 
+			the routing rules
+		</description>
+	</column>
+
+	<column id="type">
+		<name>type</name>
+		<type>unsigned int</type>
+		<size>11</size>
+		<default>0</default>
+		<description>Type/class of the GW (user defined)</description>
+	</column>
+
+	<column id="address">
+		<name>address</name>
+		<type>string</type>
+		<size>128</size>
+		<description>GW/destination address as name/IP[:port]</description>
+	</column>
+
+	<column id="strip">
+		<name>strip</name>
+		<type>unsigned int</type>
+		<size>11</size>
+		<default>0</default>
+		<description>Number of digits to be striped out for the begining 
+			of the username when using this GW/destination</description>
+	</column>
+
+	<column id="pri_prefix">
+		<name>pri_prefix</name>
+		<type>string</type>
+		<size>16</size>
+		<null/>
+		<default><null/></default>
+		<description>String to prefix the username of RURI when using 
+			this GW/destination</description>
+	</column>
+
+	<column id="attrs">
+		<name>attrs</name>
+		<type>string</type>
+		<size>255</size>
+		<null/>
+		<default><null/></default>
+		<description>Generic string describing GW attributes - this string is
+			to be interpreted from the script</description>
+	</column>
+
+	<column id="description">
+		<name>description</name>
+		<type>string</type>
+		<size>128</size>
+		<default></default>
+		<description>Text description of the GW/destination</description>
+	</column>
+</table>
diff --git a/lib/srdb1/schema/dr_groups.xml b/lib/srdb1/schema/dr_groups.xml
new file mode 100644
index 0000000..03549e0
--- /dev/null
+++ b/lib/srdb1/schema/dr_groups.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table 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;
+
+]>
+
+<table id="dr_groups" xmlns:db="http://docbook.org/ns/docbook">
+	<name>dr_groups</name>
+	<version>2</version>
+	<type db="mysql">&MYSQL_TABLE_TYPE;</type>
+	<description>
+		<db:para>This table is used by the Dynamic Routing module to store
+		information about the routing groups (users mapped over groups).
+		More information can be found at: &OPENSIPS_MOD_DOC;drouting.html.
+		</db:para>
+	</description>
+
+	<column id="gwid">
+		<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="username">
+		<name>username</name>
+		<type>string</type>
+		<size>64</size>
+		<description>Username part of user</description>
+	</column>
+
+	<column id="domain">
+		<name>domain</name>
+		<type>string</type>
+		<size>128</size>
+		<default></default>
+		<description>Domain part of user</description>
+	</column>
+
+	<column id="groupid">
+		<name>groupid</name>
+		<type>unsigned int</type>
+		<size>11</size>
+		<default>0</default>
+		<description>The ID of the routing group the user belongs to.
+		</description>
+	</column>
+
+
+	<column id="description">
+		<name>description</name>
+		<type>string</type>
+		<size>128</size>
+		<default></default>
+		<description>Text description of the group/user</description>
+	</column>
+
+</table>
diff --git a/lib/srdb1/schema/dr_gw_lists.xml b/lib/srdb1/schema/dr_gw_lists.xml
new file mode 100644
index 0000000..e8110e7
--- /dev/null
+++ b/lib/srdb1/schema/dr_gw_lists.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table 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;
+
+]>
+
+<table id="dr_gw_lists" xmlns:db="http://docbook.org/ns/docbook">
+	<name>dr_gw_lists</name>
+	<version>1</version>
+	<type db="mysql">&MYSQL_TABLE_TYPE;</type>
+	<description>
+		<db:para>This table is used by the Dynamic Routing module to define
+		lists of gateways to be used in rule definitions.
+		More information can be found at: &OPENSIPS_MOD_DOC;drouting.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="gwlist">
+		<name>gwlist</name>
+		<type>string</type>
+		<size>255</size>
+		<description>Reference to the GWs/destinations from the list.
+		</description>
+	</column>
+
+	<column id="description">
+		<name>description</name>
+		<type>string</type>
+		<size>128</size>
+		<default></default>
+		<description>Text description of the GW list</description>
+	</column>
+
+</table>
diff --git a/lib/srdb1/schema/dr_rules.xml b/lib/srdb1/schema/dr_rules.xml
new file mode 100644
index 0000000..b87b2fe
--- /dev/null
+++ b/lib/srdb1/schema/dr_rules.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table 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;
+
+]>
+
+<table id="dr_rules" xmlns:db="http://docbook.org/ns/docbook">
+	<name>dr_rules</name>
+	<version>3</version>
+	<type db="mysql">&MYSQL_TABLE_TYPE;</type>
+	<description>
+		<db:para>This table is used by the Dynamic Routing module to store
+		information about the routing rules.
+		More information can be found at: &OPENSIPS_MOD_DOC;drouting.html.
+		</db:para>
+	</description>
+
+	<column id="ruleid">
+		<name>ruleid</name>
+		<type>unsigned int</type>
+		<size>&table_id_len;</size>
+		<autoincrement/>
+		<primary/>
+		<type db="dbtext">int,auto</type>
+		<description>Rule unique ID
+		</description>
+	</column>
+
+	<column id="groupid">
+		<name>groupid</name>
+		<type>string</type>
+		<size>255</size>
+		<description>The ID(s) of the routing group(s) this rule is to be 
+		used for - comma separeted list of numerical Ids
+		</description>
+	</column>
+
+	<column id="prefix">
+		<name>prefix</name>
+		<type>string</type>
+		<size>64</size>
+		<description>Numerical prefix to match this rule</description>
+	</column>
+
+	<column id="timerec">
+		<name>timerec</name>
+		<type>string</type>
+		<size>255</size>
+		<description>Time recurrence used for matching this rule.</description>
+	</column>
+
+	<column id="priority">
+		<name>priority</name>
+		<type>int</type>
+		<size>11</size>
+		<default>0</default>
+		<description>Priority of this rule (among rules with same prefix 
+		and timerec).</description>
+	</column>
+
+	<column id="routeid">
+		<name>routeid</name>
+		<type>string</type>
+		<size>255</size>
+		<description>Route block (from cfg script) to be called when rule 
+		matches.</description>
+	</column>
+
+	<column id="gwlist">
+		<name>gwlist</name>
+		<type>string</type>
+		<size>255</size>
+		<description>Reference to the GWs/destinations to be used when
+		rule matches.</description>
+	</column>
+
+	<column id="description">
+		<name>description</name>
+		<type>string</type>
+		<size>128</size>
+		<default></default>
+		<description>Text description of the rule</description>
+	</column>
+
+</table>




More information about the sr-dev mailing list