Module: kamailio
Branch: master
Commit: fe4d03c1cb1b9371d3dcd839a96611d33a74d966
URL:
https://github.com/kamailio/kamailio/commit/fe4d03c1cb1b9371d3dcd839a96611d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-02-02T08:57:45+01:00
mtree: refreshed the readme
---
Modified: modules/mtree/README
---
Diff:
https://github.com/kamailio/kamailio/commit/fe4d03c1cb1b9371d3dcd839a96611d…
Patch:
https://github.com/kamailio/kamailio/commit/fe4d03c1cb1b9371d3dcd839a96611d…
---
diff --git a/modules/mtree/README b/modules/mtree/README
index 2d2dbed..2f62e82 100644
--- a/modules/mtree/README
+++ b/modules/mtree/README
@@ -14,8 +14,6 @@ Juha Heinanen
tutpro.com
-Edited by
-
Juha Heinanen
<jh(a)tutpro.com>
@@ -198,11 +196,29 @@ modparam("mtree", "db_table",
"mymtrees")
3.3. mtree (string)
- Definition of memory tree with parameters name, dbtable, type, and
- multi. Name is name of the tree, dbtable is name of dbtable where tree
- is stored, type is type of tree elements (0 = string, 2 = integer), and
- multi tells if dbtable can contain more than one tree (0 = one tree, 1
- = more than one tree identified by tname column).
+ Definition of memory tree with using a prameters format string. The
+ parameter names can be:
+ * name - the name of the tree to be used for referencing inside
+ configuration file.
+ * dbtable - the name of the database table from where to load the
+ records stored in the tree.
+ * cols - the column names of the database table. They must be
+ enclosed in quotes in order to form a valid SIP parameter value and
+ be separated by comma. The first column corresponds to tprefix.
+ When specified, there must be at least two columns. If this
+ attribute is not specified, then the global module parameters for
+ tprefix and tvalue are used. If more than one value columns are
+ specified, the tree will pack the column values in a comma
+ separated string, which will be associated with the prefix (string
+ transformation {s.select,...) can be used in configuration file to
+ extract a specific column value).
+ * type - the type of tree elements (0 = string, 2 = integer). It is
+ valid only when the (tprefix, tvalue) pairs are loaded (not for
+ muti-column values).
+ * multi - tells if dbtable can contain more than one tree (0 = one
+ tree, 1 = more than one tree identified by tname column). It is
+ valid only when the (tprefix, tvalue) pairs are loaded (not for
+ muti-column values).
This parameter can be set many times to add more trees in memory.
@@ -212,6 +228,8 @@ modparam("mtree", "db_table",
"mymtrees")
...
modparam("mtree", "mtree",
"name=mytree1;dbtable=routes1;type=0")
modparam("mtree", "mtree",
"name=mytree2;dbtable=routes2;type=0;multi=1")
+modparam("mtree", "mtree",
+ "name=mytree1;dbtable=routes1;cols='key1,val1,val2,val3'")
...
3.4. tname_column (string)