Module: kamailio
Branch: master
Commit: e3e0e52ca4a06f72f5139623116d1c8bc119b1e3
URL: https://github.com/kamailio/kamailio/commit/e3e0e52ca4a06f72f5139623116d1c8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-11-12T14:42:12+01:00
tls: document matching on server_id for oubound connections
---
Modified: modules/tls/doc/params.xml
---
Diff: https://github.com/kamailio/kamailio/commit/e3e0e52ca4a06f72f5139623116d1c8…
Patch: https://github.com/kamailio/kamailio/commit/e3e0e52ca4a06f72f5139623116d1c8…
---
diff --git a/modules/tls/doc/params.xml b/modules/tls/doc/params.xml
index dc40322..397e83f 100644
--- a/modules/tls/doc/params.xml
+++ b/modules/tls/doc/params.xml
@@ -1031,8 +1031,17 @@ modparam("tls", "renegotiation", 1)
<listitem><para>crl</para></listitem>
<listitem><para>cipher_list</para></listitem>
<listitem><para>server_name</para></listitem>
+ <listitem><para>server_id</para></listitem>
</itemizedlist>
<para>
+ The value for server_id can be any string, being used to match TLS
+ client config profile, overriding the match on ip:port and
+ server_name. This is the recommended way for selecting a specific
+ TLS client config profile, because the local or remote port is hard
+ to predict for a stream connection - see parameter xavp_cfg to learn
+ how to enable it.
+ </para>
+ <para>
All the parameters that take filenames as values will be resolved
using the same rules as for the tls config filename itself: starting
with a '.' means relative to the working directory, a '/' means an
@@ -1071,6 +1080,16 @@ verify_depth = 3
ca_list = local_ca.pem
server_name = kamailio.org
+[client:127.0.0.1:5061]
+method = TLSv1
+verify_certificate = yes
+require_certificate = yes
+private_key = default_key.pem
+certificate = default_cert.pem
+ca_list = default_ca.pem
+crl = default_crl.pem
+server_name = kamailio.org
+server_id = kamailio.org
</programlisting>
</example>
<para>
@@ -1108,6 +1127,12 @@ modparam("tls", "config", "/usr/local/etc/kamailio/tls.cfg")
</para>
<itemizedlist>
<listitem><para>server_name - SNI to be used for outbound connections</para></listitem>
+ <listitem><para>server_id - string value to be used to match TLS config profile
+ for client (outbound) connections. If it is set, matching the TLS config
+ profile is done first on server_id and then on ip:port and server_name.
+ This is the recommended way for selecting a specific TLS client config
+ profile as the local or remote port is hard to predict for a stream
+ connection.</para></listitem>
</itemizedlist>
<para>
The default value is empty (not set).
@@ -1119,6 +1144,7 @@ modparam("tls", "config", "/usr/local/etc/kamailio/tls.cfg")
modparam("tls", "xavp_cfg", "tls")
...
$xavp(tls=>server_name) = "kamailio.org";
+ $xavp(tls=>server_id) = "kamailio.org";
$du = "sip:kamailio.org:5061;transport=tls";
route(RELAY);
...
Module: kamailio
Branch: master
Commit: 0f55ff0351382eeb88df956e190459b73bc6ef4d
URL: https://github.com/kamailio/kamailio/commit/0f55ff0351382eeb88df956e190459b…
Author: Alexandr Dubovikov <alexandr.dubovikov(a)gmail.com>
Committer: Alexandr Dubovikov <alexandr.dubovikov(a)gmail.com>
Date: 2015-11-12T14:00:56+01:00
Merge pull request #397 from UserAd/master
sipcapture: add async support
---
Modified: modules/sipcapture/README
Modified: modules/sipcapture/doc/sipcapture_admin.xml
Modified: modules/sipcapture/sipcapture.c
---
Diff: https://github.com/kamailio/kamailio/commit/0f55ff0351382eeb88df956e190459b…
Patch: https://github.com/kamailio/kamailio/commit/0f55ff0351382eeb88df956e190459b…
---
diff --git a/modules/sipcapture/README b/modules/sipcapture/README
index 1f9fa2d..bef4af4 100644
--- a/modules/sipcapture/README
+++ b/modules/sipcapture/README
@@ -235,6 +235,10 @@ modparam("sipcapture", "hash_source", "to_user")
when the DB driver has support for it. If no INSERT DELAYED support is
offered by DB driver, then standard INSERT is used.
+ If set to 2, use ASYNC INSERT to store sip message into capture table
+ when the DB driver has support for it. If no ASYNC INSERT support is
+ offered by DB driver, then standard INSERT is used.
+
Default value is 0 (no INSERT DELAYED).
Example 1.5. db_insert_mode example
diff --git a/modules/sipcapture/doc/sipcapture_admin.xml b/modules/sipcapture/doc/sipcapture_admin.xml
index 7a835bd..2723acf 100644
--- a/modules/sipcapture/doc/sipcapture_admin.xml
+++ b/modules/sipcapture/doc/sipcapture_admin.xml
@@ -168,6 +168,11 @@ modparam("sipcapture", "hash_source", "to_user")
is offered by DB driver, then standard INSERT is used.
</para>
<para>
+ If set to 2, use ASYNC INSERT to store sip message into capture table
+ when the DB driver has support for it. If no ASYNC INSERT support is
+ offered by DB driver, then standard INSERT is used.
+ </para>
+ <para>
Default value is 0 (no INSERT DELAYED).
</para>
<example>
diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
index 256ddc7..d373de0 100644
--- a/modules/sipcapture/sipcapture.c
+++ b/modules/sipcapture/sipcapture.c
@@ -1491,6 +1491,8 @@ static int sip_capture_store(struct _sipcapture_object *sco, str *dtable, _captu
if (db_insert_mode == 1 && c->db_funcs.insert_delayed != NULL)
insert = c->db_funcs.insert_delayed;
+ else if (db_insert_mode == 2 && c->db_funcs.insert_async != NULL)
+ insert = c->db_funcs.insert_async;
else
insert = c->db_funcs.insert;
ret = insert(c->db_con, db_keys, db_vals, NR_KEYS);
@@ -2362,6 +2364,11 @@ int receive_logging_json_msg(char * buf, unsigned int len, struct hep_generic_re
LM_ERR("failed to insert delayed into database\n");
goto error;
}
+ } else if (db_insert_mode==2 && c->db_funcs.insert_async!=NULL) {
+ if (c->db_funcs.insert_async(c->db_con, db_keys, db_vals, RTCP_NR_KEYS) < 0) {
+ LM_ERR("failed to insert async into database\n");
+ goto error;
+ }
} else if (c->db_funcs.insert(c->db_con, db_keys, db_vals, RTCP_NR_KEYS) < 0) {
LM_ERR("failed to insert into database\n");
goto error;
Module: kamailio
Branch: master
Commit: fc90242ddd046a3cfd545a50cf636454de173d6f
URL: https://github.com/kamailio/kamailio/commit/fc90242ddd046a3cfd545a50cf63645…
Author: Konstantin Tumalevich <userad(a)gmail.com>
Committer: Konstantin Tumalevich <userad(a)gmail.com>
Date: 2015-11-12T16:58:48+05:00
sipcapture: add async support
- Add support for storing in asynchronous mode if supported
by database backend
---
Modified: modules/sipcapture/README
Modified: modules/sipcapture/doc/sipcapture_admin.xml
Modified: modules/sipcapture/sipcapture.c
---
Diff: https://github.com/kamailio/kamailio/commit/fc90242ddd046a3cfd545a50cf63645…
Patch: https://github.com/kamailio/kamailio/commit/fc90242ddd046a3cfd545a50cf63645…
---
diff --git a/modules/sipcapture/README b/modules/sipcapture/README
index 1f9fa2d..bef4af4 100644
--- a/modules/sipcapture/README
+++ b/modules/sipcapture/README
@@ -235,6 +235,10 @@ modparam("sipcapture", "hash_source", "to_user")
when the DB driver has support for it. If no INSERT DELAYED support is
offered by DB driver, then standard INSERT is used.
+ If set to 2, use ASYNC INSERT to store sip message into capture table
+ when the DB driver has support for it. If no ASYNC INSERT support is
+ offered by DB driver, then standard INSERT is used.
+
Default value is 0 (no INSERT DELAYED).
Example 1.5. db_insert_mode example
diff --git a/modules/sipcapture/doc/sipcapture_admin.xml b/modules/sipcapture/doc/sipcapture_admin.xml
index 7a835bd..2723acf 100644
--- a/modules/sipcapture/doc/sipcapture_admin.xml
+++ b/modules/sipcapture/doc/sipcapture_admin.xml
@@ -168,6 +168,11 @@ modparam("sipcapture", "hash_source", "to_user")
is offered by DB driver, then standard INSERT is used.
</para>
<para>
+ If set to 2, use ASYNC INSERT to store sip message into capture table
+ when the DB driver has support for it. If no ASYNC INSERT support is
+ offered by DB driver, then standard INSERT is used.
+ </para>
+ <para>
Default value is 0 (no INSERT DELAYED).
</para>
<example>
diff --git a/modules/sipcapture/sipcapture.c b/modules/sipcapture/sipcapture.c
index 256ddc7..d373de0 100644
--- a/modules/sipcapture/sipcapture.c
+++ b/modules/sipcapture/sipcapture.c
@@ -1491,6 +1491,8 @@ static int sip_capture_store(struct _sipcapture_object *sco, str *dtable, _captu
if (db_insert_mode == 1 && c->db_funcs.insert_delayed != NULL)
insert = c->db_funcs.insert_delayed;
+ else if (db_insert_mode == 2 && c->db_funcs.insert_async != NULL)
+ insert = c->db_funcs.insert_async;
else
insert = c->db_funcs.insert;
ret = insert(c->db_con, db_keys, db_vals, NR_KEYS);
@@ -2362,6 +2364,11 @@ int receive_logging_json_msg(char * buf, unsigned int len, struct hep_generic_re
LM_ERR("failed to insert delayed into database\n");
goto error;
}
+ } else if (db_insert_mode==2 && c->db_funcs.insert_async!=NULL) {
+ if (c->db_funcs.insert_async(c->db_con, db_keys, db_vals, RTCP_NR_KEYS) < 0) {
+ LM_ERR("failed to insert async into database\n");
+ goto error;
+ }
} else if (c->db_funcs.insert(c->db_con, db_keys, db_vals, RTCP_NR_KEYS) < 0) {
LM_ERR("failed to insert into database\n");
goto error;