The database schemas has version 5, the module requires version 6. It seems like the schemas in master is up-to-date
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/556
Hello,
Would it be possible to add in the next release/development version a
new transformation type "ip" for manipulating IP addresses ?
The inet_ntop and inet_pton transformations would be particularly useful
when it is needed to send/receive IP addresses in binary format (e.g.
RADIUS AVPs with ipaddr type).
It seems that these transformations are already included in Opensips :
http://www.opensips.org/Documentation/Script-Tran-2-1#toc63
Best regards,
Sébastien
Hi!
While researching a few things I want to do with http_client now that master is not frozen and 4.4 is released,
I realize that the code I took from db_cluster allocate the connection objects in pkg memory. I had in my
head an obviously wrong idea that they existed in shared memory. It doesn’t matter for 4.4, but may matter
with new stuff I want to add.
Having them in pkg memory makes reloading configurations hard, so I want to move them to shared memory
instead. Apart from making sure we have locks when updating, is there anything else needed to be done than
changing the allocation?
A secondary task is to make sure we have corresponding objects in pkg memory for local per-process data,
like TCP connection reuse or last error message or redirect in this process. Is there a way to signal
to the all children that an update is needed if I get a RPC command to reload? Any example in another
module?
After-release brainstorm :-)
Cheers,
/O
Module: kamailio
Branch: master
Commit: c3c478874e39f8a7e64bffcd99d9b04a3c4bbd90
URL: https://github.com/kamailio/kamailio/commit/c3c478874e39f8a7e64bffcd99d9b04…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: 2016-03-30T22:00:29+02:00
http_client Add debug and some notes in TODO
---
Modified: modules/http_client/TODO.txt
Modified: modules/http_client/http_client.c
---
Diff: https://github.com/kamailio/kamailio/commit/c3c478874e39f8a7e64bffcd99d9b04…
Patch: https://github.com/kamailio/kamailio/commit/c3c478874e39f8a7e64bffcd99d9b04…
---
diff --git a/modules/http_client/TODO.txt b/modules/http_client/TODO.txt
index 41b4cec..c80c4a3 100644
--- a/modules/http_client/TODO.txt
+++ b/modules/http_client/TODO.txt
@@ -13,6 +13,9 @@ The http_client module - todo
- save fingerprint of cert for trust-on-first-use procedure
- connection and last status for httpcon-object, needs to be object in process memory, so child_init
+ Note: Right now httpcon-objects are allocated in pkg memory. This is bad for a reload,
+ but good for what we need to do here.
+ - test what happens if we allocate curlcon objects in shared memory and use locks
- if 5xx response or timeout set flag
- function in dialplan - httpcon_exists(object)
- pv $curlstatus(object) ??
diff --git a/modules/http_client/http_client.c b/modules/http_client/http_client.c
index 86d6fad..1d1519c 100644
--- a/modules/http_client/http_client.c
+++ b/modules/http_client/http_client.c
@@ -1,6 +1,6 @@
/*
* http_client Module
- * Copyright (C) 2015 Edvina AB, Olle E. Johansson
+ * Copyright (C) 2015-2016 Edvina AB, Olle E. Johansson
*
* Based on part of the utils module and part
* of the json-rpc-c module
@@ -60,6 +60,7 @@
#include "../../rpc_lookup.h"
#include "../../config.h"
#include "../../lvalue.h"
+#include "../../pt.h" /* Process table */
#include "functions.h"
#include "curlcon.h"
@@ -167,7 +168,7 @@ static pv_export_t mod_pvs[] = {
{{"curlerror", (sizeof("curlerror")-1)}, /* Curl error codes */
PVT_OTHER, pv_get_curlerror, 0,
pv_parse_curlerror, 0, 0, 0},
- {{"curlredirect", (sizeof("redirect")-1)}, /* Curl error codes */
+ {{"curlredirect", (sizeof("redirect")-1)}, /* Curl last redirect url - not implemented yet */
PVT_OTHER, pv_get_curlredirect, 0,
pv_parse_curlredirect, 0, 0, 0},
{{0, 0}, 0, 0, 0, 0, 0, 0, 0}
@@ -299,9 +300,12 @@ int curl_support_ipv6()
/* Child initialization function */
static int child_init(int rank)
{
+ int i = my_pid();
+
if (rank==PROC_INIT || rank==PROC_MAIN || rank==PROC_TCP_MAIN) {
return 0; /* do nothing for the main process */
}
+ LM_DBG("*** http_client module initializing process %d\n", i);
return 0;
}
Module: kamailio
Branch: master
Commit: f947ee76a27d2659096dfe381ba412006dcd7067
URL: https://github.com/kamailio/kamailio/commit/f947ee76a27d2659096dfe381ba4120…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: 2016-03-30T21:06:32+02:00
http_client Update TODO.txt with new ideas for coming release
Open invitation to anyone who wants to contribute. I think a major one is the "mirror list"
of httpcon objects in pkg - per process - memory for tracking status and keeping connections
open. This would be very beneficial both for speed and functionality.
---
Modified: modules/http_client/TODO.txt
---
Diff: https://github.com/kamailio/kamailio/commit/f947ee76a27d2659096dfe381ba4120…
Patch: https://github.com/kamailio/kamailio/commit/f947ee76a27d2659096dfe381ba4120…
---
diff --git a/modules/http_client/TODO.txt b/modules/http_client/TODO.txt
index da2609d..41b4cec 100644
--- a/modules/http_client/TODO.txt
+++ b/modules/http_client/TODO.txt
@@ -5,13 +5,14 @@ The http_client module - todo
read=line/all - Implemented in API, but not in parameter
tlsverify=on/off
failover=httpcon Other httpcon that can be used for failover in case of 5xx response or timeout
+ not implemented
- Add XAVP parameter setting before running curl_connect
- save fingerprint of cert for trust-on-first-use procedure
-- status for httpcon-object, needs to be object in process memory, so child_init
+- connection and last status for httpcon-object, needs to be object in process memory, so child_init
- if 5xx response or timeout set flag
- function in dialplan - httpcon_exists(object)
- pv $curlstatus(object) ??
@@ -21,6 +22,12 @@ The http_client module - todo
- Figure out a way to communicate back the content-type of the response. Another pvar arg?
- This is per process!
+- Reload of configuration file from RPC interface
+ - Need to close connections (if we have open ones according to idea above)
+ - Need to rebuild core httpcon objects and "mirrors" in pkg memory
+ - Can we add a lock to the connection list while switching if we load a new
+ list, then switch active list and then free the old ones
+
- rpc
curl.listcon list all connection objects with properties
-- Done, but not documented
@@ -36,6 +43,7 @@ The http_client module - todo
curl.addcon add connection object
curl.rmcon remove connection object
+ Maybe RPC commands to change default settings for proxys
- Async - event_route when done
(with and without suspending transaction)
@@ -51,3 +59,25 @@ The http_client module - todo
- Make it possible to define modparams in any order. For now, httpcon definitions only use default
values from modparam's defined on lines above in the config file. (issue #541)
+
+
+Issues in the bug tracker
+-------------------------
+- https://github.com/kamailio/kamailio/issues/542 - open
+ Support connection reuse. Needs private memory structures to track connections
+
+
+Solved issues
+--------------
+- https://github.com/kamailio/kamailio/issues/541 - closed
+ Support setting proxy
+ Comitted another patch, which included default and per-connection proxy
+ settings.
+- https://github.com/kamailio/kamailio/issues/515 - closed
+ Support various auth methods - digest, basic etc
+ Comitted another patch, which included default and per-connection settings
+- https://github.com/kamailio/kamailio/pull/481 - closed
+ Support TLS client certificates
+- https://github.com/kamailio/kamailio/pull/435 - closed
+ Pull request that fixed a lot of issues.
+