Re: [sr-dev] [kamailio/kamailio] Load dialogs from db at runtime, without restarting kamailio (#1274)

2018-04-04 Thread paolovisintin
In our case we will have an autoscaling system of Kamailio based on geographic 
requests and load so we will not be able to know in advance how many instances 
ok kamailio will be provisioned. As you suggested for this temporary workaround 
we should have :
Server 1 : 1, 101,201,301,401... 
Server 2 : 2, 202,302,402,
Server n : n, n+100,n+200,n+300,...

Where n < 100


-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1274#issuecomment-378734004___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Load dialogs from db at runtime, without restarting kamailio (#1274)

2018-04-04 Thread Daniel-Constantin Mierla
If there are 3 servers, then the step should at least 3, resulting in:

```
Server1: 1, 4, 7, 10, ...
Server2: 2, 5, 8, 11, ...
Server3: 3, 6, 9, 12, ...
```

So the start value should be the `index` of the server and the increment value 
has to be at least the number of servers. There is no conflict in such case.

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1274#issuecomment-378704073___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] [WIP] tls: add support for OpenSSL engine and private keys in HSM (#1484)

2018-04-04 Thread Henning Westerholt
  * About the question:
"The files tls_map.{c,h} seems to be imported from external source, being 
under MIT license. tls  
module seems to be under BSD, anyone knows if there is any conflict between 
the two or 
something needs to be mentioned in the README of the tls module?"

According to www.dwheeler.com/essays/floss-license-slide.html - the MIT licence 
is compatible with the (new) BSD licence, and the result can be still licenced 
under BSD licence. So no additional information should be necessary.

-- 
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/pull/1484#issuecomment-378677038___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:7db5d4c4: dialog: docs - documentation for h_id_start and h_id_step parameters

2018-04-04 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 7db5d4c4efb2131a7393e638f109ddbe746ffeff
URL: 
https://github.com/kamailio/kamailio/commit/7db5d4c4efb2131a7393e638f109ddbe746ffeff

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-04-04T18:37:28+02:00

dialog: docs - documentation for h_id_start and h_id_step parameters

- related to GH #1274

---

Modified: src/modules/dialog/doc/dialog_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/7db5d4c4efb2131a7393e638f109ddbe746ffeff.diff
Patch: 
https://github.com/kamailio/kamailio/commit/7db5d4c4efb2131a7393e638f109ddbe746ffeff.patch

---

diff --git a/src/modules/dialog/doc/dialog_admin.xml 
b/src/modules/dialog/doc/dialog_admin.xml
index 3a5a348abc..d231d9a2f6 100644
--- a/src/modules/dialog/doc/dialog_admin.xml
+++ b/src/modules/dialog/doc/dialog_admin.xml
@@ -1520,6 +1520,60 @@ end


 
+   
+   h_id_start (int)
+   
+   Set the offset to be used for generating dialog 
internal hash id.
+   If set to -1, the h_id_start is set to the value of the 
server_id
+   global parameter.
+   
+   
+   
+   Default value is 0.
+   
+   
+   
+   Set h_id_start parameter
+   
+...
+modparam("dialog", "h_id_start", 5)
+...
+
+   
+   
+
+   
+   h_id_step (int)
+   
+   Set the step to increment the dialog internal hash id.
+   
+   
+   If the value is greater than 1, the internal hash id is 
generated
+   with the rule: h_id_start + N * h_id_step. The first 
value of N is
+   randomly selected at startup, then incremented by 1 for 
each new
+   dialog. Setting h_id_start and h_id_step to non-default 
values
+   should be done when using dlg_db_load_callid(...) to 
load dialog
+   records generated by another  instance, 
making also sure
+   that those  instances are not going to 
generate
+   overalapping dialog hash id values by using different 
h_id_start
+   and the same h_id_step (h_id_step has to be greater 
than the
+   maximum value of h_id_start).
+   
+   
+   
+   Default value is 1.
+   
+   
+   
+   Set h_id_step parameter
+   
+...
+modparam("dialog", "h_id_step", 10)
+...
+
+   
+   
+

 
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:8f9b6ea5: dialog: added h_id_start and h_id_step parameters

2018-04-04 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 8f9b6ea5637b26092e591585b82eb59ed2f42775
URL: 
https://github.com/kamailio/kamailio/commit/8f9b6ea5637b26092e591585b82eb59ed2f42775

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-04-04T18:37:28+02:00

dialog: added h_id_start and h_id_step parameters

- allow to control how internal dialog hash id is generated to avoid
overalapping values across many instances of kamailio

---

Modified: src/modules/dialog/dialog.c
Modified: src/modules/dialog/dlg_db_handler.c
Modified: src/modules/dialog/dlg_hash.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/8f9b6ea5637b26092e591585b82eb59ed2f42775.diff
Patch: 
https://github.com/kamailio/kamailio/commit/8f9b6ea5637b26092e591585b82eb59ed2f42775.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] kamailio packaging, change in carrierroute Makefile

2018-04-04 Thread Victor Seva
Hello,

2018-04-03 23:03 GMT+02:00 Daniel-Constantin Mierla :

> changes expected to affect packaging should be discussed first and then
> committed, along with related updates to packaging specs.
>
> They can break nightly builds for packages, resulting in unnecessary
> alerts to the mailing list, repeating every day until the dev
> maintaining the specs is available to do the changes. Not being a
> critical issue, this can wait to be discussed and done properly.
>
>
 I've reviewed the changes and I've changed the deb packaging to remove
kamailio-carrierroute-modules package and being replaced by kamailio package

Changes are at [0] a personal branch.

Should I push changes?

[0] https://github.com/kamailio/kamailio/tree/vseva/pkg_carrierroute
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] [WIP] tls: add support for OpenSSL engine and private keys in HSM (#1484)

2018-04-04 Thread aalba6675
1. Yes - HSM private keys are stored in worker local memory and are not 
referenced in old structures during SIP connections. We make one reference 
during mod_child: we install it into the shmem SSL_CTX structure once (proc_no 
== 0) just to check the the private key corresponds to the cert; subsequently 
this reference is not used at connection time.

Later at connection time, even when we use SSL_CTX for proc_no == 0, we load 
the worker-local HSM  private key JIT into the SSL *object and don't use the 
(probably invalid) private key reference in SSL_CTX.

2. All main distros debian/RHEL/ubuntu build OpenSSL with engine support. We 
can skip this check and just assume that kamailio is being built with a 
reasonable OpenSSL prerequisite if you prefer.

3. License - comments from the community?

4. A few commits for better naming and guards: use better 
module/filename-specificsymbol names; also make a few more symbols static to 
avoid accidental leakage with common names.



-- 
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/pull/1484#issuecomment-378572496___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:5.1:6770fe86: carrierroute: fixed duplicate options definition error when parsing src file

2018-04-04 Thread Lucian Balaceanu
Module: kamailio
Branch: 5.1
Commit: 6770fe866dc6ed301b536a6132dc50e9844e720e
URL: 
https://github.com/kamailio/kamailio/commit/6770fe866dc6ed301b536a6132dc50e9844e720e

Author: Lucian Balaceanu 
Committer: Lucian Balaceanu 
Date: 2018-04-04T14:04:55+03:00

carrierroute: fixed duplicate options definition error when parsing src file

- added logic to reset_prefix_opts to reset all target_options fields 
(including "visited")

(cherry picked from commit dc8faaf57a9c85b7133f112bdedd328a9520eb73)

---

Modified: src/modules/carrierroute/cr_config.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/6770fe866dc6ed301b536a6132dc50e9844e720e.diff
Patch: 
https://github.com/kamailio/kamailio/commit/6770fe866dc6ed301b536a6132dc50e9844e720e.patch

---

diff --git a/src/modules/carrierroute/cr_config.c 
b/src/modules/carrierroute/cr_config.c
index 40523d9544..920ae4142c 100644
--- a/src/modules/carrierroute/cr_config.c
+++ b/src/modules/carrierroute/cr_config.c
@@ -97,6 +97,9 @@ static int init_target_opts(){
 }
 
 static void reset_prefix_opts(){
+   memset(&(target_options[PO_MAX_TARGETS].value),'\0', sizeof(union 
opt_data));
+   prefix_options[PO_MAX_TARGETS].visited = 0;
+   prefix_options[PO_MAX_TARGETS].no_elems = 0;
prefix_options[PO_MAX_TARGETS].value.int_data=-1;
 }
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Kamailio start failed as carrierrouter (#1492)

2018-04-04 Thread Lucian Balaceanu
Closed #1492.

-- 
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/1492#event-1556172938___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Kamailio start failed as carrierrouter (#1492)

2018-04-04 Thread Oleh Horbachov
Hi @lbalaceanu . I rebuilt kamailio 5.1.2 with your fix. Problem solved. I 
think you can close issue. Thank you.

-- 
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/1492#issuecomment-378553687___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] ndb_redis: adds support for sentinel (#1493)

2018-04-04 Thread Julien Ammous
After a quick look on redis website the sentinel is shipped with redis since 
2.8 so I suppose this is the minimum required but if the sentinel options are 
not used the driver should work as before with any redis version.

-- 
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/pull/1493#issuecomment-378540144___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] RPM spec update (#1494)

2018-04-04 Thread sergey-safarov

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/1494

-- Commit Summary --

  * pkg/kamailio/obs: packaged db_redis module
  * pkg/kamailio/obs: Added acc_json module
  * pkg/kamailio/obs: Added pua_json module
  * pkg/kamailio/obs: Removed libconfuse dependency for carrierroute module

-- File Changes --

M pkg/kamailio/obs/kamailio.spec (43)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1494.patch
https://github.com/kamailio/kamailio/pull/1494.diff

-- 
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/pull/1494
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] [WIP] tls: add support for OpenSSL engine and private keys in HSM (#1484)

2018-04-04 Thread Daniel-Constantin Mierla
Just to confirm I haven't missed something -- the private keys stored in 
worker-local memory refer to keeping them in the map structure you introduced 
with the new files tls_map.{c,h}. They are not referenced from old structures 
of the tls module, right?

I see that the define conditions are on `#ifndef OPENSSL_NO_ENGINE`, 
understanding that  `OPENSSL_NO_ENGINE` is defined if libssl is compiled 
without this engine feature. But is this feature depending on some version, or 
is in libssl for very long time and makes no sense to check for a version that 
doesn't have support for it at all?

The files tls_map.{c,h} seems to be imported from external source, being under 
MIT license. tls module seems to be under BSD, anyone knows if there is any 
conflict between the two or something needs to be mentioned in the README of 
the tls module?

Some cosmetic things I would like to have for a safety future:

  * define guards inside tls_map.h should rely on the name of the file, like in 
the other cases. right now is `MAP_H`, exposing a risk of a conflict in the 
future someone adds a map.h somewhere in kamailio code that will be included in 
the same file with tls_map.h
  * the global variable `engine` has a rather common name, should be renamed 
like `ksr_tls_engine`, to make it more specific for kamailio context -- this 
should avoid unexpected behaviour if one opens the shared objects with 
RTLD_GLOBAL when there will be an overlap with such common name

-- 
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/pull/1484#issuecomment-378523224___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] ndb_redis: adds support for sentinel (#1493)

2018-04-04 Thread Daniel-Constantin Mierla
Thanks! One question before attempting to merge, does this require a specific 
version of redis server or redis client library?

-- 
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/pull/1493#issuecomment-378515633___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Kamailio start failed as carrierrouter (#1492)

2018-04-04 Thread Lucian Balaceanu
I have pushed 
https://github.com/kamailio/kamailio/commit/dc8faaf57a9c85b7133f112bdedd328a9520eb73
 on the master branch. For me it solved the problem. Could you confirm that 
this is also the case for you so that we can close the issue?

-- 
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/1492#issuecomment-378515303___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:dc8faaf5: carrierroute: fixed duplicate options definition error when parsing src file

2018-04-04 Thread Lucian Balaceanu
Module: kamailio
Branch: master
Commit: dc8faaf57a9c85b7133f112bdedd328a9520eb73
URL: 
https://github.com/kamailio/kamailio/commit/dc8faaf57a9c85b7133f112bdedd328a9520eb73

Author: Lucian Balaceanu 
Committer: Lucian Balaceanu 
Date: 2018-04-04T10:52:56+03:00

carrierroute: fixed duplicate options definition error when parsing src file

- added logic to reset_prefix_opts to reset all target_options fields 
(including "visited")

---

Modified: src/modules/carrierroute/cr_config.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/dc8faaf57a9c85b7133f112bdedd328a9520eb73.diff
Patch: 
https://github.com/kamailio/kamailio/commit/dc8faaf57a9c85b7133f112bdedd328a9520eb73.patch

---

diff --git a/src/modules/carrierroute/cr_config.c 
b/src/modules/carrierroute/cr_config.c
index 40523d9544..920ae4142c 100644
--- a/src/modules/carrierroute/cr_config.c
+++ b/src/modules/carrierroute/cr_config.c
@@ -97,6 +97,9 @@ static int init_target_opts(){
 }
 
 static void reset_prefix_opts(){
+   memset(&(target_options[PO_MAX_TARGETS].value),'\0', sizeof(union 
opt_data));
+   prefix_options[PO_MAX_TARGETS].visited = 0;
+   prefix_options[PO_MAX_TARGETS].no_elems = 0;
prefix_options[PO_MAX_TARGETS].value.int_data=-1;
 }
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Load dialogs from db at runtime, without restarting kamailio (#1274)

2018-04-04 Thread Daniel-Constantin Mierla
I just committed the config (and kemi) function `dlg_db_load_callid(val)`, 
which should load dialog record from database by matching on callid (it loads 
also associated variables).

While not tested yet given lack of proper environment to simulate such scenario 
(hopefully you can do it), there is still an issue that needs to be sorted out. 
Respectively a high potential of having conflicts for internal dialog id. The 
internal id is made from two integers, hash entry and hash id (h_entry, h_id). 
h_entry is the index of the slot in the hash table used to store the dialog 
structure, computed by hashing over call id. h_id is an incremented integer 
specific for each hash table slot.

So, when loading a new record from database, if its h_id is not conflicting 
with an existing dialog on the same hash table slot, all is ok, otherwise the 
module is not going to work properly with two dialogs having same h_id.

Among solutions I thought of:

1) have the servers generating non conflicting h_id, by having a start value 
different per server and an increment step larger than the number of servers. 
Iirc, here was at some point a similar attempt, but somehow didn't make it. 
Let's say one has two servers, first server starts allocating h_id from 1 and 
increments by 2 (e.g: 1, 3, 5, ...) and the seconds start from 2 and increments 
with 2 (2, 4, 6, ...). Those values can be set via mod params, eventually with 
an option to rely on server_id.

This should be the least intrusive in the other modules built on top of dialog. 
But it is rather rigid, with the example above, if one adds an extra server, it 
needs to reconfigure the old ones, so each server starts from either 1, 2 or 3 
and increment by 3. Of course, one can set increment step to a larger value, 
like 100, and then has flexibility to deploy up to 1 hundred servers before 
having to reconfigure in case there is need for more server.

2) add server_id as the third field in the dialog id. It will require review of 
other modules using dialog and eventual code updates in those modules. One 
column to store the server_id needs to be added to dialog db tables.

3) switch from this conflicting id system to something like string unique ids, 
similar to what we have in usrloc records. This will require coding in other 
modules, changes to database schema, etc., so more work comparing with the 
above two, but could be the best in long term.

Most likely I am going to push code for option 1) for now, but it would be good 
to see opinions from other devs, if they would prefer other option or propose 
other variants.

-- 
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/1274#issuecomment-378512827___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:b2747551: modules: readme files regenerated - dialog ... [skip ci]

2018-04-04 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: b27475511756b04fe4d4ee5f76bcc14e4186bc58
URL: 
https://github.com/kamailio/kamailio/commit/b27475511756b04fe4d4ee5f76bcc14e4186bc58

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2018-04-04T09:01:55+02:00

modules: readme files regenerated - dialog ... [skip ci]

---

Modified: src/modules/dialog/README

---

Diff:  
https://github.com/kamailio/kamailio/commit/b27475511756b04fe4d4ee5f76bcc14e4186bc58.diff
Patch: 
https://github.com/kamailio/kamailio/commit/b27475511756b04fe4d4ee5f76bcc14e4186bc58.patch

---

diff --git a/src/modules/dialog/README b/src/modules/dialog/README
index 506e066948..597e06efd1 100644
--- a/src/modules/dialog/README
+++ b/src/modules/dialog/README
@@ -127,6 +127,7 @@ Olle E. Johansson
   7.16. dlg_set_property(attr)
   7.17. dlg_remote_profile(cmd, profile, value, uid, expires)
   7.18. dlg_set_ruri()
+  7.19. dlg_db_load_callid(cival)
 
 8. Statistics
 
@@ -251,6 +252,7 @@ Olle E. Johansson
1.74. dlg_set_property usage
1.75. dlg_remote_profile usage
1.76. dlg_set_ruri() usage
+   1.77. dlg_db_load_callid() usage
 
 Chapter 1. Admin Guide
 
@@ -346,6 +348,7 @@ Chapter 1. Admin Guide
 7.16. dlg_set_property(attr)
 7.17. dlg_remote_profile(cmd, profile, value, uid, expires)
 7.18. dlg_set_ruri()
+7.19. dlg_db_load_callid(cival)
 
8. Statistics
 
@@ -1342,6 +1345,7 @@ end
7.16. dlg_set_property(attr)
7.17. dlg_remote_profile(cmd, profile, value, uid, expires)
7.18. dlg_set_ruri()
+   7.19. dlg_db_load_callid(cival)
 
 7.1.  set_dlg_profile(profile,[value])
 
@@ -1727,6 +1731,25 @@ if(has_totag() and is_present_hf("Route") and 
uri==myself ) {
 }
 ...
 
+7.19.  dlg_db_load_callid(cival)
+
+   Load dialog record from database matching on Call-Id provided as
+   parameter.
+
+   This function can be used from ANY_ROUTE.
+
+   Example 1.77. dlg_db_load_callid() usage
+...
+if(has_totag()) {
+if(!is_known_dlg()) {
+dlg_db_load_callid("$ci");
+if(!is_known_dlg()) {
+xlog("no dialog found with callid: $ci\n");
+}
+}
+}
+...
+
 8. Statistics
 
8.1. active_dialogs


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:0180884c: dialog: documentation for dlg_db_load_callid()

2018-04-04 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 0180884c6111b6a1d88fc558acbc801718c011b8
URL: 
https://github.com/kamailio/kamailio/commit/0180884c6111b6a1d88fc558acbc801718c011b8

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-04-04T08:45:25+02:00

dialog: documentation for dlg_db_load_callid()

---

Modified: src/modules/dialog/doc/dialog_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/0180884c6111b6a1d88fc558acbc801718c011b8.diff
Patch: 
https://github.com/kamailio/kamailio/commit/0180884c6111b6a1d88fc558acbc801718c011b8.patch

---

diff --git a/src/modules/dialog/doc/dialog_admin.xml 
b/src/modules/dialog/doc/dialog_admin.xml
index ddceb4e634..3a5a348abc 100644
--- a/src/modules/dialog/doc/dialog_admin.xml
+++ b/src/modules/dialog/doc/dialog_admin.xml
@@ -2200,6 +2200,33 @@ if(has_totag() and is_present_hf("Route") and 
uri==myself ) {
}
 }
 ...
+
+   
+   
+   
+   
+   dlg_db_load_callid(cival)
+   
+   
+   Load dialog record from database matching on Call-Id provided
+   as parameter.
+   
+   
+   This function can be used from ANY_ROUTE.
+   
+   
+   dlg_db_load_callid() usage
+   
+...
+if(has_totag()) {
+if(!is_known_dlg()) {
+dlg_db_load_callid("$ci");
+   if(!is_known_dlg()) {
+xlog("no dialog found with callid: $ci\n");
+}
+}
+}
+...
 




___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:3d3f5ca1: dialog: added function dlg_db_load_callid(val)

2018-04-04 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 3d3f5ca116353cc618f52d5c2792f360377a63ca
URL: 
https://github.com/kamailio/kamailio/commit/3d3f5ca116353cc618f52d5c2792f360377a63ca

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-04-04T08:45:24+02:00

dialog: added function dlg_db_load_callid(val)

- load dialog from database based on callid parameter
- related to GH #1274

---

Modified: src/modules/dialog/dialog.c
Modified: src/modules/dialog/dlg_db_handler.c
Modified: src/modules/dialog/dlg_db_handler.h
Modified: src/modules/dialog/dlg_hash.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/3d3f5ca116353cc618f52d5c2792f360377a63ca.diff
Patch: 
https://github.com/kamailio/kamailio/commit/3d3f5ca116353cc618f52d5c2792f360377a63ca.patch


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:f7ed7d28: dialog: added end labels needed by dlg_db_load_callid()

2018-04-04 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: f7ed7d289978490f374f4f3eea52e91dccc3752f
URL: 
https://github.com/kamailio/kamailio/commit/f7ed7d289978490f374f4f3eea52e91dccc3752f

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2018-04-04T08:47:25+02:00

dialog: added end labels needed by dlg_db_load_callid()

- they were removed by commit 27c23f57f70936e557d9566e6122958c2e032970
not being used after a previous commit, but meanwhile this function was
developed

---

Modified: src/modules/dialog/dlg_db_handler.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/f7ed7d289978490f374f4f3eea52e91dccc3752f.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f7ed7d289978490f374f4f3eea52e91dccc3752f.patch

---

diff --git a/src/modules/dialog/dlg_db_handler.c 
b/src/modules/dialog/dlg_db_handler.c
index ecacb1c43e..0a902952c3 100644
--- a/src/modules/dialog/dlg_db_handler.c
+++ b/src/modules/dialog/dlg_db_handler.c
@@ -503,6 +503,7 @@ int load_dialog_info_from_db(int dlg_hash_size, int 
fetch_num_rows,
}
}
 
+end:
dialog_dbf.free_result(dialog_db_handle, res);
return 0;
 error:
@@ -634,6 +635,7 @@ static int load_dialog_vars_from_db(int fetch_num_rows, int 
mode,
}
}
 
+end:
dialog_dbf.free_result(dialog_db_handle, res);
return 0;
 error:


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Kamailio start failed as carrierrouter (#1492)

2018-04-04 Thread Lucian Balaceanu
The problem is with the reset of a prefix options structure. This is due to a 
recent change in the code. I will come up with a fix.

-- 
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/1492#issuecomment-378493514___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] module FAQ, private contact replacement

2018-04-04 Thread Henning Westerholt
Am Dienstag, 3. April 2018, 22:59:42 CEST schrieb Daniel-Constantin Mierla:
> > I will change it to involve only security bugs, this way we could easily
> > change it when we have a dedicated security contact address. If we get to
> > much spam, I will remove it completely.
> 
> I still think this is not the right way to do it, but remove it
> completely. It is not across all modules, only couple of them.
> 
> And again, so far nobody actually used it. When having to report
> something more sensitive, people found the way to do it.
> 
> Management doesn't have to do anything with those modules and should not
> get involved in their readme. There is a contact page with more details
> on project's website.

Hi Daniel,

I understand your reasoning. 

We have neither on https://www.kamailio.org/w/mailing-lists/ or
https://www.kamailio.org/w/support/ any contact information for confidential 
security issues. But maybe I did not saw it correctly.

You are right, in the past people figure it out to send it to somebody from 
the core developer group. But people are in vacation or during extended 
traveling etc.., therefore I see a benefit in having a distribution list for 
this issues. It don't need to be the management, we just don't have right now 
anything different.?

Best regards,

Henning

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev