Hello,
as a follow up to previous discussions on the mailing list, I would like
to propose Wednesday, Feb 3, 2016 as the day to freeze the development
for next major release. It will allow the people going at Fosdem to chat
and do last minute tunings before freezing.
Other suggestions or comments are welcome!
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.comhttp://miconda.eu
Module: kamailio
Branch: master
Commit: 6260bd810bd6f1f54bbf43c9cc88bb64f4bce83a
URL: https://github.com/kamailio/kamailio/commit/6260bd810bd6f1f54bbf43c9cc88bb6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-02-03T00:02:07+01:00
htable: docs for cols attribute of hash table definition
---
Modified: modules/htable/README
Modified: modules/htable/doc/htable_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/6260bd810bd6f1f54bbf43c9cc88bb6…
Patch: https://github.com/kamailio/kamailio/commit/6260bd810bd6f1f54bbf43c9cc88bb6…
---
diff --git a/modules/htable/README b/modules/htable/README
index 0c2fe41..109a182 100644
--- a/modules/htable/README
+++ b/modules/htable/README
@@ -11,14 +11,10 @@ Elena-Ramona Modroiu
<ramona(a)rosdev.ro>
-Edited by
-
Alex Balashov
<abalashov(a)evaristesys.com>
-Edited by
-
Ovidiu Sas
<osas(a)voipembedded.com>
@@ -417,8 +413,8 @@ $ kamcmd htable.dump htable
3.1. htable (str)
- The definition of a hash table. The value of the parameter must have
- the following format:
+ The definition of a hash table. The value of the parameter may have the
+ following format:
* "htname=>size=_number_;autoexpire=_number_;dbtable=_string_"
The parameter can be set multiple times to get more hash tables in same
@@ -435,6 +431,17 @@ $ kamcmd htable.dump htable
expire.
* dbtable - name of database to be loaded at startup in hash table.
If empty or missing, no data will be loaded.
+ * 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 key_name.
+ When specified, there must be at least two columns. If this
+ attribute is not specified, then the global module parameters for
+ column names are used. If more than one value columns are
+ specified, the hash table will pack the column values in a comma
+ separated string, which will be associated with the key (string
+ transformation {s.select,...} can be used in configuration file to
+ extract a specific column value). When cols attribute is present,
+ writing back to database table is disabled.
* dbmode - if set to 1, the content of hash table is written to
database table when the SIP server is stopped (i.e., ensure
persistency over restarts). Default value is 0 (no write back to db
diff --git a/modules/htable/doc/htable_admin.xml b/modules/htable/doc/htable_admin.xml
index 42a77fa..44873ac 100644
--- a/modules/htable/doc/htable_admin.xml
+++ b/modules/htable/doc/htable_admin.xml
@@ -317,7 +317,7 @@ $ kamcmd htable.dump htable
<section id="htable.p.htable">
<title><varname>htable</varname> (str)</title>
<para>
- The definition of a hash table. The value of the parameter must have the
+ The definition of a hash table. The value of the parameter may have the
following format:
</para>
<itemizedlist>
@@ -363,6 +363,22 @@ $ kamcmd htable.dump htable
</listitem>
<listitem>
<para>
+ <emphasis>cols</emphasis> - 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 key_name. When specified, there must be at least
+ two columns. If this attribute is not specified, then the global
+ module parameters for column names are used. If more than one
+ value columns are specified, the hash table will pack the column
+ values in a comma separated string, which will be associated
+ with the key (string transformation {s.select,...} can be
+ used in configuration file to extract a specific column value).
+ When cols attribute is present, writing back to database table
+ is disabled.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<emphasis>dbmode</emphasis> - if set to 1, the content of hash
table is written to database table when the SIP server is stopped
(i.e., ensure persistency over restarts). Default value is 0 (no
Module: kamailio
Branch: master
Commit: 955455aad0d078ec65458c8ca9fae6d91f00d4b9
URL: https://github.com/kamailio/kamailio/commit/955455aad0d078ec65458c8ca9fae6d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-02-02T23:35:55+01:00
htable: allow specifying column names per hash table
- at least two columns must be specified, first is the one corresponding
to key_name
- the values of following columns are concatenated with a comma delimiter
- columns can be specified with cols attribute in htable definition and
they must be enclosed in quotes in order to be a valid sip parameter
value and be separated by comma
modparam("htable", "htable",
"a=>size=4;dbtable=a;cols='key_name,val1,val2,val3'")
---
Modified: modules/htable/ht_api.c
Modified: modules/htable/ht_api.h
Modified: modules/htable/ht_db.c
---
Diff: https://github.com/kamailio/kamailio/commit/955455aad0d078ec65458c8ca9fae6d…
Patch: https://github.com/kamailio/kamailio/commit/955455aad0d078ec65458c8ca9fae6d…