- SHM pointer is freed when it is required later by dialog callbacks. Remove the free_dlginfo_cell() call.
This is causing crashing after the BYE, when a call is ongoing during a Kamailio restart
The free is actually done by the callback function `dlg_api.register_dlgcb()` when it is registered in `pua_dialoginfo.c`
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/492
-- Commit Summary --
* pua_dialoginfo: fixed crash when loading dialogs from database on restart
-- File Changes --
M modules/pua_dialoginfo/doc/pua_dialoginfo.xml (11)
M modules/pua_dialoginfo/pua_dialoginfo.c (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/492.patchhttps://github.com/kamailio/kamailio/pull/492.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/492
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)
Module: kamailio
Branch: master
Commit: ebdf05f589329948d43fb05bd53c372e5dfec631
URL: https://github.com/kamailio/kamailio/commit/ebdf05f589329948d43fb05bd53c372…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-02-02T08:57:04+01:00
mtree: more documentation for mtree defintion
- details about cols attribute
---
Modified: modules/mtree/doc/mtree_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/ebdf05f589329948d43fb05bd53c372…
Patch: https://github.com/kamailio/kamailio/commit/ebdf05f589329948d43fb05bd53c372…
---
diff --git a/modules/mtree/doc/mtree_admin.xml b/modules/mtree/doc/mtree_admin.xml
index 8ca17e0..bd97f23 100644
--- a/modules/mtree/doc/mtree_admin.xml
+++ b/modules/mtree/doc/mtree_admin.xml
@@ -107,13 +107,52 @@ modparam("mtree", "db_table", "mymtrees")
<section>
<title><varname>mtree</varname> (string)</title>
<para>
- 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).
- </para>
+ Definition of memory tree with using a prameters format string.
+ The parameter names can be:
+ <itemizedlist>
+ <listitem>
+ <para>
+ name - the name of the tree to be used for referencing
+ inside configuration file.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ dbtable - the name of the database table from where to
+ load the records stored in the tree.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ 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).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ 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).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ 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).
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
<para>
This parameter can be set many times to add more trees in
memory.
@@ -129,6 +168,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'")
...
</programlisting>
</example>
Module: kamailio
Branch: master
Commit: 27e3ecb60702749837f2dc59d694933b12e3a7bd
URL: https://github.com/kamailio/kamailio/commit/27e3ecb60702749837f2dc59d694933…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-02-02T00:04:57+01:00
mtree: allow specifying column names per tree
- at least two columns must be specified, first is the one corresponding
to tprefix
- if more than two, then the values of those columns are concatenated
with a comma delimiter
- columns can be specified with cols attribute in mtree definition and
they must be enclosed in quotes in order to be a valid sip parameter
value and be separated by comma
modparam("mtree", "mtree",
"name=mt;dbtable=mtree;cols='tprefix,tvalue1,tvalue2'")
---
Modified: modules/mtree/mtree.c
Modified: modules/mtree/mtree.h
Modified: modules/mtree/mtree_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/27e3ecb60702749837f2dc59d694933…
Patch: https://github.com/kamailio/kamailio/commit/27e3ecb60702749837f2dc59d694933…
Module: kamailio
Branch: master
Commit: 5de62614f6c26f4f3ec6965bb69ba97b3aa83dc8
URL: https://github.com/kamailio/kamailio/commit/5de62614f6c26f4f3ec6965bb69ba97…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-02-01T19:01:07+01:00
crypto: documentation for register_callid parameter
---
Modified: modules/crypto/README
Modified: modules/crypto/doc/crypto_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/5de62614f6c26f4f3ec6965bb69ba97…
Patch: https://github.com/kamailio/kamailio/commit/5de62614f6c26f4f3ec6965bb69ba97…
---
diff --git a/modules/crypto/README b/modules/crypto/README
index d0ac5ec..f740617 100644
--- a/modules/crypto/README
+++ b/modules/crypto/README
@@ -26,6 +26,7 @@ Daniel-Constantin Mierla
3. Parameters
3.1. salt (str)
+ 3.2. register_callid (int)
4. Functions
@@ -34,9 +35,10 @@ Daniel-Constantin Mierla
List of Examples
- 1.1. Set interval parameter
- 1.2. crypto_aes_encrypt usage
- 1.3. crypto_aes_decrypt usage
+ 1.1. Set salt parameter
+ 1.2. Set register_callid parameter
+ 1.3. crypto_aes_encrypt usage
+ 1.4. crypto_aes_decrypt usage
Chapter 1. Admin Guide
@@ -51,6 +53,7 @@ Chapter 1. Admin Guide
3. Parameters
3.1. salt (str)
+ 3.2. register_callid (int)
4. Functions
@@ -84,6 +87,7 @@ Chapter 1. Admin Guide
3. Parameters
3.1. salt (str)
+ 3.2. register_callid (int)
3.1. salt (str)
@@ -96,11 +100,28 @@ Chapter 1. Admin Guide
Default value is "..." (see code).
- Example 1.1. Set interval parameter
+ Example 1.1. Set salt parameter
...
modparam("crypto", "salt", "l0Bh2M8a")
...
+3.2. register_callid (int)
+
+ Set it to 1 in order to register a callback to core for generation of
+ callid values for requests generated by Kamailio tm module.
+
+ This callid genrator uses libssl random and hashing functions for
+ generating RFC 4122 version 4 UUID with high quality entropy. It is
+ useful when wanting to have new callids that cannot be predicted from
+ previous values.
+
+ Default value is 0.
+
+ Example 1.2. Set register_callid parameter
+...
+modparam("crypto", "register_callid", 1)
+...
+
4. Functions
4.1. crypto_aes_encrypt(text, key, res)
@@ -115,7 +136,7 @@ modparam("crypto", "salt", "l0Bh2M8a")
This function can be used from ANY_ROUTE.
- Example 1.2. crypto_aes_encrypt usage
+ Example 1.3. crypto_aes_encrypt usage
...
crypto_aes_encrypt("$rb", "my-secret-key", "$var(encrypted)");
...
@@ -129,7 +150,7 @@ crypto_aes_encrypt("$rb", "my-secret-key", "$var(encrypted)");
This function can be used from ANY_ROUTE.
- Example 1.3. crypto_aes_decrypt usage
+ Example 1.4. crypto_aes_decrypt usage
...
crypto_aes_decrypt("$var(encrypted)", "my-secret-key", "$var(text)");
...
diff --git a/modules/crypto/doc/crypto_admin.xml b/modules/crypto/doc/crypto_admin.xml
index bf325f3..147354e 100644
--- a/modules/crypto/doc/crypto_admin.xml
+++ b/modules/crypto/doc/crypto_admin.xml
@@ -76,7 +76,7 @@
</emphasis>
</para>
<example>
- <title>Set <varname>interval</varname> parameter</title>
+ <title>Set <varname>salt</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("crypto", "salt", "l0Bh2M8a")
@@ -84,6 +84,32 @@ modparam("crypto", "salt", "l0Bh2M8a")
</programlisting>
</example>
</section>
+ <section id="crypto.p.register_callid">
+ <title><varname>register_callid</varname> (int)</title>
+ <para>
+ Set it to 1 in order to register a callback to core for generation
+ of callid values for requests generated by &kamailio; tm module.
+ </para>
+ <para>
+ This callid genrator uses libssl random and hashing functions
+ for generating RFC 4122 version 4 UUID with high quality entropy.
+ It is useful when wanting to have new callids that cannot be
+ predicted from previous values.
+ </para>
+ <para>
+ <emphasis>
+ Default value is 0.
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>register_callid</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("crypto", "register_callid", 1)
+...
+</programlisting>
+ </example>
+ </section>
</section>
<section>
Module: kamailio
Branch: master
Commit: 0085398d088f7c3651c09af12a0bbff997a16bcc
URL: https://github.com/kamailio/kamailio/commit/0085398d088f7c3651c09af12a0bbff…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-02-01T18:50:01+01:00
crypto: option to register a callid generator callback
- use libssl random and hashing for generating RFC 4122 version 4 UUID
with high quality entropy that can be used as callid for requests sent
by tm, through sip routing core api
- new mod param: register_callid - set to 1 in order to register callid
genrator callback to core (default is 0)
---
Added: modules/crypto/crypto_uuid.c
Added: modules/crypto/crypto_uuid.h
Modified: modules/crypto/crypto_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/0085398d088f7c3651c09af12a0bbff…
Patch: https://github.com/kamailio/kamailio/commit/0085398d088f7c3651c09af12a0bbff…