Module: sip-router Branch: master Commit: fb2df84aa150d7f0f8b96e7c5035d2b74c9a3fa9 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fb2df84a...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Sun Jan 3 13:27:57 2010 +0100
drouting: adding db table definitions
- built based on readme - needs further updates as the code is ahead of documentation with what tables are used and their structure (cherry picked from commit 53a25f097d127eea7fef3c3c32f7f24421aaad15)
---
lib/srdb1/schema/dr_gateways.xml | 71 ++++++++++++++++++++++++++ lib/srdb1/schema/dr_rules.xml | 86 ++++++++++++++++++++++++++++++++ lib/srdb1/schema/kamailio-drouting.xml | 14 +++++ 3 files changed, 171 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..e96773b --- /dev/null +++ b/lib/srdb1/schema/dr_gateways.xml @@ -0,0 +1,71 @@ +<?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>1</version> + <type db="mysql">&MYSQL_TABLE_TYPE;</type> + <description> + db:paraThis table is used by the douting module - keeps the + gateways data. + </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>Unique ID per gateway + </description> + </column> + + <column id="type"> + <name>type</name> + <type>unsigned int</type> + <size>11</size> + <default>0</default> + <description>Type of gateway</description> + </column> + + <column id="address"> + <name>address</name> + <type>string</type> + <size>128</size> + <description>Address of gateway (hostname or ip and port)</description> + </column> + + <column id="strip"> + <name>strip</name> + <type>unsigned int</type> + <size>11</size> + <default>0</default> + <description>Number of digits to strip from dialed number</description> + </column> + + <column id="pri_prefix"> + <name>pri_prefix</name> + <type>string</type> + <size>64</size> + <null/> + <default><null/></default> + <description>What to prefix to dialed number</description> + </column> + + <column id="description"> + <name>description</name> + <type>string</type> + <size>128</size> + <default></default> + <description>Short description of gateway</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..213332a --- /dev/null +++ b/lib/srdb1/schema/dr_rules.xml @@ -0,0 +1,86 @@ +<?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>1</version> + <type db="mysql">&MYSQL_TABLE_TYPE;</type> + <description> + db:paraThis table is used by the drouting module - keeps the + routing rules data. + </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>list of routing group IDs + </description> + </column> + + <column id="prefix"> + <name>prefix</name> + <type>string</type> + <size>64</size> + <description>Destination prefix for this rule</description> + </column> + + <column id="timerec"> + <name>timerec</name> + <type>string</type> + <size>255</size> + <description>Time recurrence for this rule.</description> + </column> + + <column id="priority"> + <name>priority</name> + <type>int</type> + <size>11</size> + <default>0</default> + <description>Priority of the rule.</description> + </column> + + <column id="routeid"> + <name>routeid</name> + <type>string</type> + <size>64</size> + <description>Name of route block (from cfg script) to be + executed when matching this rule.</description> + </column> + + <column id="gwlist"> + <name>gwlist</name> + <type>string</type> + <size>255</size> + <description>The list of destinations (gws) to be used when + matching this rule.</description> + </column> + + <column id="description"> + <name>description</name> + <type>string</type> + <size>128</size> + <default></default> + <description>Short description of the rule</description> + </column> + +</table> + diff --git a/lib/srdb1/schema/kamailio-drouting.xml b/lib/srdb1/schema/kamailio-drouting.xml new file mode 100644 index 0000000..183c87b --- /dev/null +++ b/lib/srdb1/schema/kamailio-drouting.xml @@ -0,0 +1,14 @@ +<?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>DRouting</name> + <xi:include href="dr_gateways.xml"/> + <xi:include href="dr_rules.xml"/> +</database>