Forráskód Böngészése

- uploaded new modules that implements generic string translations based on matching and replacement rules. It can be used to manipulate R-URI or a PV and to translated to a new format/value.


git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4331 689a6050-402a-0410-94f2-e92a70836424
Anca Vamanu 17 éve
szülő
commit
b664eadfab

+ 1 - 1
lib/srdb1/schema/Makefile

@@ -6,7 +6,7 @@
 TABLES = standard acc imc lcr siptrace domainpolicy cpl domain group \
 	dialog permissions registrar usrloc msilo alias_db uri_db speeddial \
 	avpops auth_db pdt dispatcher presence rls extensions carrierroute \
-	userblacklist
+	userblacklist dialplan
 
 ROOT=../..
 STYLESHEETS=$(ROOT)/doc/dbschema/xsl

+ 85 - 0
lib/srdb1/schema/dialplan.xml

@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE table PUBLIC "-//openser.org//DTD DBSchema V1.1//EN" 
+  "http://openser.org/pub/openser/dbschema/dtd/1.1/dbschema.dtd" [
+
+<!ENTITY % entities SYSTEM "entities.xml">
+%entities;
+
+]>
+
+<table id="dialplan" xmlns:db="http://docbook.org/ns/docbook">
+    <name>dialplan</name>
+    <version>1</version>
+    <type db="mysql">&MYSQL_TABLE_TYPE;</type>
+    <description>
+        <db:para>This table is used by the dialplan module for the translation rules. More information is available at: &OPENSER_MOD_DOC;dialplan.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="dpid">
+        <name>dpid</name>
+        <type>int</type>
+        <size>11</size>
+        <description>Dialplan ID.</description>
+    </column>
+
+    <column id="pr">
+        <name>pr</name>
+        <type>int</type>
+        <size>11</size>
+        <description>Priority of rule.</description>
+    </column>
+
+    <column id="match_op">
+        <name>match_op</name>
+        <type>int</type>
+        <size>11</size>
+        <description>Matching operator for rule (0-regexp, 1-equal).</description>
+    </column>
+
+     <column id="match_exp">
+        <name>match_exp</name>
+        <type>string</type>
+        <size>64</size>
+        <description>Matching expresion (regexp or string).</description>
+    </column>
+
+    <column id="match_len">
+        <name>match_len</name>
+        <type>int</type>
+        <size>11</size>
+        <description>Length of the matching expresion (used only for equal operator).</description>
+    </column>
+
+     <column id="subst_exp">
+        <name>subst_exp</name>
+        <type>string</type>
+        <size>64</size>
+        <description>Substitution expresion.</description>
+    </column>
+    
+    <column id="repl_exp">
+        <name>repl_exp</name>
+        <type>string</type>
+        <size>32</size>
+        <description>Replacement expresion (sed like).</description>
+    </column>
+
+    <column id="attrs">
+        <name>attrs</name>
+        <type>string</type>
+        <size>32</size>
+        <description>General attributes string to be returned in case of rule matching.</description>
+    </column>
+ 
+</table>

+ 13 - 0
lib/srdb1/schema/openser-dialplan.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE database PUBLIC "-//openser.org//DTD DBSchema V1.1//EN"
+  "http://openser.org/pub/openser/dbschema/dtd/1.1/dbschema.dtd" [
+
+<!ENTITY % entities SYSTEM "entities.xml">
+%entities;
+
+]>
+
+<database xmlns:xi="http://www.w3.org/2001/XInclude">
+    <name>Matching and translation rules</name>
+    <xi:include href="dialplan.xml"/>
+</database>