Re: [sr-dev] [kamailio/kamailio] ims_registrar_scscf: changed str r_reginfo_s format: from 'version=%s… (#1961)

2019-05-20 Thread Henning Westerholt
Thank you for the pull-request. Can you explain a bit the motivation for the 
change, is it just a refactoring or does it fix a bug?

-- 
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/1961#issuecomment-494113062___
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] In-place string transform having occasionally corrupted results (#1937)

2019-05-20 Thread Henning Westerholt
Thank you Daniel, I just backported as well to 5.1 branch.

-- 
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/1937#issuecomment-494111330___
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:5534c048: pv: clone string in all substr operations, related to GH #1937

2019-05-20 Thread Henning Westerholt
Module: kamailio
Branch: 5.1
Commit: 5534c048648d99424c5a5e1d67a510d96da52ff1
URL: 
https://github.com/kamailio/kamailio/commit/5534c048648d99424c5a5e1d67a510d96da52ff1

Author: Henning Westerholt 
Committer: Henning Westerholt 
Date: 2019-05-20T21:00:40+02:00

pv: clone string in all substr operations, related to GH #1937

(cherry picked from commit 280eabf16a45f522655f8b49677e46c75d34024f)

---

Modified: src/modules/pv/pv_trans.c

---

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

---

diff --git a/src/modules/pv/pv_trans.c b/src/modules/pv/pv_trans.c
index e7c07a0054..8b894689e8 100644
--- a/src/modules/pv/pv_trans.c
+++ b/src/modules/pv/pv_trans.c
@@ -614,6 +614,7 @@ int tr_eval_string(struct sip_msg *msg, tr_param_t *tp, int 
subtype,
}
val->rs.s += i;
val->rs.len = j;
+   tr_string_clone_result;
break;
}
i = -i;


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


[sr-dev] git:master:dc6901ea: dispatcher: docs - fixed typo in description for reload_delta

2019-05-20 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: dc6901eaa1024431c86c4e13a65b37194ec9fbe9
URL: 
https://github.com/kamailio/kamailio/commit/dc6901eaa1024431c86c4e13a65b37194ec9fbe9

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2019-05-20T17:11:21+02:00

dispatcher: docs - fixed typo in description for reload_delta

---

Modified: src/modules/dispatcher/doc/dispatcher_admin.xml

---

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

---

diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml 
b/src/modules/dispatcher/doc/dispatcher_admin.xml
index a797c0b6ac..9754e3f320 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -1019,7 +1019,7 @@ modparam("dispatcher", "ds_db_extra_attrs", 
"socket=socket;pref=prefix")

If set to 0, no rate limit is configured. Note carefully: use 
this
configuration only in tests environments because executing many 
RPC
-   reload commandss at the same time can cause unexpected behavior.
+   reload commands at the same time can cause unexpected behavior.





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


[sr-dev] git:master:8ee81c12: modules: readme files regenerated - dispatcher ... [skip ci]

2019-05-20 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: 8ee81c12b60c2de74dc604f16369e5fbd38922b7
URL: 
https://github.com/kamailio/kamailio/commit/8ee81c12b60c2de74dc604f16369e5fbd38922b7

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2019-05-20T17:16:42+02:00

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

---

Modified: src/modules/dispatcher/README

---

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

---

diff --git a/src/modules/dispatcher/README b/src/modules/dispatcher/README
index eb63603d8f..21a1c0249b 100644
--- a/src/modules/dispatcher/README
+++ b/src/modules/dispatcher/README
@@ -951,7 +951,7 @@ modparam("dispatcher", "ds_db_extra_attrs", 
"socket=socket;pref=prefix")
 
If set to 0, no rate limit is configured. Note carefully: use this
configuration only in tests environments because executing many RPC
-   reload commandss at the same time can cause unexpected behavior.
+   reload commands at the same time can cause unexpected behavior.
 
Default value is “5”.
 


___
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] Systemd unit update (#1889)

2019-05-20 Thread sergey-safarov
sergey-safarov commented on this pull request.



> @@ -4,18 +4,16 @@ Wants=network-online.target
 After=network-online.target
 
 [Service]
-Type=forking
+Type=simple

yes, that is determines how to monitor kamailio process.
I suggest to start kamailio with `-DD`  option.
In this case kamailio main process control own child's, and systemd monitors 
only kamailio main process.

-- 
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/1889#discussion_r285634719___
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] Memory leaks in websocket module on adding tcp connection check (#1892)

2019-05-20 Thread Andrey Deykunov
Hi Daniel! I was on PTO, will look into it asap.

-- 
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/1892#issuecomment-493991962___
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] Systemd unit update (#1889)

2019-05-20 Thread Sam
verticelo commented on this pull request.



> @@ -4,18 +4,16 @@ Wants=network-online.target
 After=network-online.target
 
 [Service]
-Type=forking
+Type=simple

But, doesn't this determine how systemd monitors the process after the process 
has started, ie. if the kamailio process forks or not?

-- 
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/1889#discussion_r285580801___
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] In-place string transform having occasionally corrupted results (#1937)

2019-05-20 Thread Daniel-Constantin Mierla
Closed #1937.

-- 
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/1937#event-2352939575___
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] In-place string transform having occasionally corrupted results (#1937)

2019-05-20 Thread Daniel-Constantin Mierla
In preparations for releasing 5.2.3, I backported the referred patch to branch 
5.2 with commit 4676d3d2c1267761ac6405464459b49c809afcbf .

If needed for 5.1, it will be backported before its next release (or someone 
else can do it right away).

So I am closing this issue, but if still not working as expected, then reopen.

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


[sr-dev] git:5.2:4676d3d2: pv: clone string in all substr operations, related to GH #1937

2019-05-20 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.2
Commit: 4676d3d2c1267761ac6405464459b49c809afcbf
URL: 
https://github.com/kamailio/kamailio/commit/4676d3d2c1267761ac6405464459b49c809afcbf

Author: Henning Westerholt 
Committer: Daniel-Constantin Mierla 
Date: 2019-05-20T14:23:55+02:00

pv: clone string in all substr operations, related to GH #1937

(cherry picked from commit 280eabf16a45f522655f8b49677e46c75d34024f)

---

Modified: src/modules/pv/pv_trans.c

---

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

---

diff --git a/src/modules/pv/pv_trans.c b/src/modules/pv/pv_trans.c
index efbf8e8cf2..17c6a3e204 100644
--- a/src/modules/pv/pv_trans.c
+++ b/src/modules/pv/pv_trans.c
@@ -614,6 +614,7 @@ int tr_eval_string(struct sip_msg *msg, tr_param_t *tp, int 
subtype,
}
val->rs.s += i;
val->rs.len = j;
+   tr_string_clone_result;
break;
}
i = -i;


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


[sr-dev] Configuration for dummies

2019-05-20 Thread jespinosa

Hello,

My name is Javier Espinosa and I am trying to connect a Kamailio IMS 
Core with my LTE EPC that I already have working. To make it faster I 
had downloaded the VM that Franz Edler post here: 
https://www.kamailio.org/w/2016/02/kamailio-ims-getting-started-box/ but 
I can't find the properly way to connect it with my EPC that is a real 
EPC so, I have IMSI codes for each user and I don't know how to register 
them in the HSS of the IMS and I also have one HSS in my EPC so I am a 
little bit lost.

If anyone can help me with this I will be very grateful.

Thank you so much,
Javier Espinosa.

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


[sr-dev] git:master:2921bb2d: modules: readme files regenerated - dispatcher ... [skip ci]

2019-05-20 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: 2921bb2da7e257ea5ff6fac76e35d08be26e6008
URL: 
https://github.com/kamailio/kamailio/commit/2921bb2da7e257ea5ff6fac76e35d08be26e6008

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2019-05-20T11:46:45+02:00

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

---

Modified: src/modules/dispatcher/README

---

Diff:  
https://github.com/kamailio/kamailio/commit/2921bb2da7e257ea5ff6fac76e35d08be26e6008.diff
Patch: 
https://github.com/kamailio/kamailio/commit/2921bb2da7e257ea5ff6fac76e35d08be26e6008.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:ad9ec1c9: rtp_media_server: removed execution flag from source files and makefile

2019-05-20 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: ad9ec1c94abaffafe3dcd762d961ed35a429849c
URL: 
https://github.com/kamailio/kamailio/commit/ad9ec1c94abaffafe3dcd762d961ed35a429849c

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2019-05-20T11:38:24+02:00

rtp_media_server: removed execution flag from source files and makefile

---

Modified: src/modules/rtp_media_server/Makefile
Modified: src/modules/rtp_media_server/rms_media.h
Modified: src/modules/rtp_media_server/rms_sdp.h

---

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

---

diff --git a/src/modules/rtp_media_server/Makefile 
b/src/modules/rtp_media_server/Makefile
old mode 100755
new mode 100644
diff --git a/src/modules/rtp_media_server/rms_media.h 
b/src/modules/rtp_media_server/rms_media.h
old mode 100755
new mode 100644
diff --git a/src/modules/rtp_media_server/rms_sdp.h 
b/src/modules/rtp_media_server/rms_sdp.h
old mode 100755
new mode 100644


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


[sr-dev] git:master:1699dc31: src/Makefile.defs: fix build on mips

2019-05-20 Thread Sergey Safarov
Module: kamailio
Branch: master
Commit: 1699dc31ffa01ec2ce94e191285ba800497e94e1
URL: 
https://github.com/kamailio/kamailio/commit/1699dc31ffa01ec2ce94e191285ba800497e94e1

Author: Sergey Safarov 
Committer: Sergey Safarov 
Date: 2019-05-18T12:38:14+03:00

src/Makefile.defs: fix build on mips

---

Modified: src/Makefile.defs

---

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

---

diff --git a/src/Makefile.defs b/src/Makefile.defs
index 21ca28e097..0577ac011c 100644
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -321,7 +321,8 @@ ppc64_macros= __ppc64__ _ARCH_PPC64
 
 mips_macros= __mips__ __mips _MIPS_ARCH_MIPS1
 mips2_macros= _MIPS_ISA_MIPS2 _MIPS_ISA_MIPS3 _MIPS_ISA_MIPS4 \
-   _MIPS_ARCH_MIPS2 _MIPS_ARCH_MIPS3 _MIPS_ARCH_MIPS4
+   _MIPS_ARCH_MIPS2 _MIPS_ARCH_MIPS3 _MIPS_ARCH_MIPS4 \
+   _MIPS_ISA_MIPS32
 mips64_macros= _MIPS_ISA_MIPS64 _MIPS_ARCH_MIPS64
 
 alpha_macros= __alpha__ __alpha _M_ALPHA_
@@ -1344,7 +1345,7 @@ ifeq  ($(ARCH), mips2)
 ifeq   ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
-   CFLAGS= -mips2 $(CC_OPT) -funroll-loops 
$(PROFILE)
+   CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE)
#if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER
CFLAGS+=-ftree-vectorize 
-fno-strict-overflow
@@ -1390,7 +1391,7 @@ ifeq  ($(ARCH), mips64)
 ifeq   ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
-   CFLAGS= -mips64 $(CC_OPT) -funroll-loops 
$(PROFILE)
+   CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE)
#if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER
CFLAGS+=-ftree-vectorize 
-fno-strict-overflow


___
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] BUG: qm_free: freeing already freed pointer - versions 5.1.3 (#1939)

2019-05-20 Thread Daniel-Constantin Mierla
Closed #1939.

-- 
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/1939#event-2352512645___
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] BUG: qm_free: freeing already freed pointer - versions 5.1.3 (#1939)

2019-05-20 Thread Daniel-Constantin Mierla
I added a parameter to control how often the rpc reload commands can be done. 
It is in master branch.

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


[sr-dev] git:master:513917ea: dispatcher: docs for reload_delta parameter

2019-05-20 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 513917ea47dfdcf67cdb46539a174c929cfa
URL: 
https://github.com/kamailio/kamailio/commit/513917ea47dfdcf67cdb46539a174c929cfa

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2019-05-20T11:34:16+02:00

dispatcher: docs for reload_delta parameter

- GH #1939

---

Modified: src/modules/dispatcher/doc/dispatcher_admin.xml

---

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

---

diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml 
b/src/modules/dispatcher/doc/dispatcher_admin.xml
index 50fa5e4b70..a797c0b6ac 100644
--- a/src/modules/dispatcher/doc/dispatcher_admin.xml
+++ b/src/modules/dispatcher/doc/dispatcher_admin.xml
@@ -1009,6 +1009,32 @@ modparam("dispatcher", "ds_db_extra_attrs", 
"socket=socket;pref=prefix")


 
+   
+   reload_delta (int)
+   
+   The number of seconds that have to be waited before executing a 
new reload
+   of dispatcher records. By default there is a rate limiting of 
maximum
+   one reload in five seconds.
+   
+   
+   If set to 0, no rate limit is configured. Note carefully: use 
this
+   configuration only in tests environments because executing many 
RPC
+   reload commandss at the same time can cause unexpected behavior.
+   
+   
+   
+   Default value is 5.
+   
+   
+   
+   Set reload_delta parameter
+   
+...
+modparam("dispatcher", "reload_delta", 1)
+...
+   
+   
+   

 



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


[sr-dev] git:master:2b032137: dispatcher: added reload_delta parameter

2019-05-20 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 2b032137886a7074a6be4ac5772a428661a3130c
URL: 
https://github.com/kamailio/kamailio/commit/2b032137886a7074a6be4ac5772a428661a3130c

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2019-05-20T11:15:48+02:00

dispatcher: added reload_delta parameter

- limit the frequency of rpc reload commands to try to avoid races of
parallel reload operations
- default value is 5 seconds (no more than one reload command every 5
seconds)

---

Modified: src/modules/dispatcher/dispatcher.c

---

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

---

diff --git a/src/modules/dispatcher/dispatcher.c 
b/src/modules/dispatcher/dispatcher.c
index df11722215..101927099a 100644
--- a/src/modules/dispatcher/dispatcher.c
+++ b/src/modules/dispatcher/dispatcher.c
@@ -141,6 +141,9 @@ str ds_event_callback = STR_NULL;
 str ds_db_extra_attrs = STR_NULL;
 param_t *ds_db_extra_attrs_list = NULL;
 
+static int ds_reload_delta = 5;
+static time_t *ds_rpc_reload_time = NULL;
+
 /** module functions */
 static int mod_init(void);
 static int child_init(int);
@@ -271,6 +274,7 @@ static param_export_t params[]={
{"ds_attrs_none",  PARAM_INT, _attrs_none},
{"ds_db_extra_attrs",  PARAM_STR, _db_extra_attrs},
{"ds_load_mode",   PARAM_INT, _load_mode},
+   {"reload_delta",   PARAM_INT, _reload_delta },
{0,0,0}
 };
 
@@ -451,6 +455,14 @@ static int mod_init(void)
LM_ERR("invalid ds_latency_estimator_alpha must be between 0 
and 1000,"
" using default[%.3f]\n", 
ds_latency_estimator_alpha);
}
+
+   ds_rpc_reload_time = shm_malloc(sizeof(time_t));
+   if(ds_rpc_reload_time == NULL) {
+   SHM_MEM_ERROR;
+   return -1;
+   }
+   *ds_rpc_reload_time = 0;
+
return 0;
 }
 
@@ -477,6 +489,10 @@ static void destroy(void)
shm_free(ds_ping_reply_codes);
if(ds_ping_reply_codes_cnt)
shm_free(ds_ping_reply_codes_cnt);
+   if(ds_rpc_reload_time!=NULL) {
+   shm_free(ds_rpc_reload_time);
+   ds_rpc_reload_time = 0;
+   }
 }
 
 #define GET_VALUE(param_name, param, i_value, s_value, value_flags)\
@@ -1373,6 +1389,19 @@ static const char *dispatcher_rpc_reload_doc[2] = {
  */
 static void dispatcher_rpc_reload(rpc_t *rpc, void *ctx)
 {
+
+   if(ds_rpc_reload_time==NULL) {
+   LM_ERR("not ready for reload\n");
+   rpc->fault(ctx, 500, "Not ready for reload");
+   return;
+   }
+   if(*ds_rpc_reload_time!=0 && *ds_rpc_reload_time > time(NULL) - 
ds_reload_delta) {
+   LM_ERR("ongoing reload\n");
+   rpc->fault(ctx, 500, "Ongoing reload");
+   return;
+   }
+   *ds_rpc_reload_time = time(NULL);
+
if(!ds_db_url.s) {
if(ds_load_list(dslistfile) != 0) {
rpc->fault(ctx, 500, "Reload Failed");


___
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 not using SNI in incoming requests (#1938)

2019-05-20 Thread Daniel-Constantin Mierla
Closed #1938.

-- 
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/1938#event-2352424613___
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 not using SNI in incoming requests (#1938)

2019-05-20 Thread Daniel-Constantin Mierla
Got the time to look at it -- so the SNI required that the default server 
profile has server_name attribute set in order to register the SNI callback. I 
pushed a commit (see the link above) to register SNI callback for server 
default profile always. I will backport and it will be in 5.2.3 release.

For older versions, you can set `server_name=localhost` or another domain that 
you use with default certificate or if you don't have one, set it to something 
unlikely to be used.

I did the basic tests, but if still an issue, reopen.

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


[sr-dev] git:master:08d22b7b: tls: register SNI callback for server default profile

2019-05-20 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 08d22b7bd95828554e30f4c23e906cd9d234e1cd
URL: 
https://github.com/kamailio/kamailio/commit/08d22b7bd95828554e30f4c23e906cd9d234e1cd

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2019-05-20T10:56:08+02:00

tls: register SNI callback for server default profile

- make SNI work for other profile when the default one does not have
server_name
- GH #1938

---

Modified: src/modules/tls/tls_domain.c

---

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

---

diff --git a/src/modules/tls/tls_domain.c b/src/modules/tls/tls_domain.c
index f22b8e8049..fff4603eba 100644
--- a/src/modules/tls/tls_domain.c
+++ b/src/modules/tls/tls_domain.c
@@ -1061,17 +1061,20 @@ static int ksr_tls_fix_domain(tls_domain_t* d, 
tls_domain_t* def)
* check server domains for server_name extension and register
* callback function
*/
-   if ((d->type & TLS_DOMAIN_SRV) && d->server_name.len>0) {
+   if ((d->type & TLS_DOMAIN_SRV)
+   && (d->server_name.len>0 || (d->type & 
TLS_DOMAIN_DEF))) {
if (!SSL_CTX_set_tlsext_servername_callback(d->ctx[i], 
tls_server_name_cb)) {
LM_ERR("register server_name callback handler 
for socket "
"[%s:%d], server_name='%s' failed for 
proc %d\n",
-   ip_addr2a(>ip), d->port, 
d->server_name.s, i);
+   ip_addr2a(>ip), d->port,
+   
(d->server_name.s)?d->server_name.s:"", i);
return -1;
}
if (!SSL_CTX_set_tlsext_servername_arg(d->ctx[i], d)) {
LM_ERR("register server_name callback handler 
data for socket "
"[%s:%d], server_name='%s' failed for 
proc %d\n",
-   ip_addr2a(>ip), d->port, 
d->server_name.s, i);
+   ip_addr2a(>ip), d->port,
+   
(d->server_name.s)?d->server_name.s:"", i);
return -1;
}
}
@@ -1079,10 +1082,11 @@ static int ksr_tls_fix_domain(tls_domain_t* d, 
tls_domain_t* def)
}
 
 #ifndef OPENSSL_NO_TLSEXT
-   if ((d->type & TLS_DOMAIN_SRV) && d->server_name.len>0) {
+   if ((d->type & TLS_DOMAIN_SRV)
+   && (d->server_name.len>0 || (d->type & 
TLS_DOMAIN_DEF))) {
LM_NOTICE("registered server_name callback handler for socket "
"[%s:%d], server_name='%s' ...\n", ip_addr2a(>ip), 
d->port,
-   d->server_name.s);
+   (d->server_name.s)?d->server_name.s:"");
}
 #endif
 


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


[sr-dev] [kamailio/kamailio] ims_registrar_scscf: changed str r_reginfo_s format: from 'version=%s… (#1961)

2019-05-20 Thread alexyosifov
…' to 'version=%d'.





 Pre-Submission Checklist



- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, 
...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook 
files
in `doc/` subfolder, the README file is autogenerated)

 Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

 Checklist:

- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue # (replace  with an open issue number)

 Description


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

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

-- Commit Summary --

  * ims_registrar_scscf: changed str r_reginfo_s format: from 'version=%s' to 
'version=%d'.

-- File Changes --

M src/modules/ims_registrar_scscf/registrar_notify.c (16)
M src/modules/ims_registrar_scscf/registrar_notify.h (4)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1961.patch
https://github.com/kamailio/kamailio/pull/1961.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/1961
___
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] Systemd unit update (#1889)

2019-05-20 Thread sergey-safarov
I ready to squash and update commit after review.

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


[sr-dev] [SR-Users] Plans for next major release - v5.3.0

2019-05-20 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

> Any preference for one of the two options?

I would prefer release after holidays.  Freeze and testing OK during
that period.

-- Juha

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


[sr-dev] Plans for next major release - v5.3.0

2019-05-20 Thread Daniel-Constantin Mierla
Hello,

a while ago, during the last IRC devel meeting, it was proposed to
either do the next major release (5.3.0) before the usual summer
holidays or leave it for autumn. Given that time is approaching, we have
to decide.

If it is going to happen before the summer holidays, probably we should
freeze the development in 2-3 weeks, then do 3-4 weeks of testing and
release during the first part of July. It would be a shorter development
cycle, so I do not expect much needs for testing. Only a few new modules
and plenty of work to consolidate and enhance the existing code.

Any preference for one of the two options?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda


___
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] Systemd unit update (#1889)

2019-05-20 Thread Daniel-Constantin Mierla
@linuxmaniac - these changes are on systemd unit for debian packaging. Any 
conclusion on what to do with this PR?

If decided to merge, quash in a single commit and set a proper formatted commit 
message, because now the commits do not follow the rules.

-- 
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/1889#issuecomment-493867087___
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] src/Makefile.defs: fix build on mips (#1958)

2019-05-20 Thread Daniel-Constantin Mierla
Merged #1958 into master.

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


[sr-dev] git:master:70061f56: Merge pull request #1958 from sergey-safarov/mips

2019-05-20 Thread GitHub
Module: kamailio
Branch: master
Commit: 70061f565e8f2132fc2f2856d9d83a7c45202053
URL: 
https://github.com/kamailio/kamailio/commit/70061f565e8f2132fc2f2856d9d83a7c45202053

Author: Daniel-Constantin Mierla 
Committer: GitHub 
Date: 2019-05-20T09:16:49+02:00

Merge pull request #1958 from sergey-safarov/mips

src/Makefile.defs: fix build on mips

---

Modified: src/Makefile.defs

---

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

---

diff --git a/src/Makefile.defs b/src/Makefile.defs
index 21ca28e097..0577ac011c 100644
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -321,7 +321,8 @@ ppc64_macros= __ppc64__ _ARCH_PPC64
 
 mips_macros= __mips__ __mips _MIPS_ARCH_MIPS1
 mips2_macros= _MIPS_ISA_MIPS2 _MIPS_ISA_MIPS3 _MIPS_ISA_MIPS4 \
-   _MIPS_ARCH_MIPS2 _MIPS_ARCH_MIPS3 _MIPS_ARCH_MIPS4
+   _MIPS_ARCH_MIPS2 _MIPS_ARCH_MIPS3 _MIPS_ARCH_MIPS4 \
+   _MIPS_ISA_MIPS32
 mips64_macros= _MIPS_ISA_MIPS64 _MIPS_ARCH_MIPS64
 
 alpha_macros= __alpha__ __alpha _M_ALPHA_
@@ -1344,7 +1345,7 @@ ifeq  ($(ARCH), mips2)
 ifeq   ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
-   CFLAGS= -mips2 $(CC_OPT) -funroll-loops 
$(PROFILE)
+   CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE)
#if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER
CFLAGS+=-ftree-vectorize 
-fno-strict-overflow
@@ -1390,7 +1391,7 @@ ifeq  ($(ARCH), mips64)
 ifeq   ($(CC_NAME), gcc)
C_DEFS+=-DCC_GCC_LIKE_ASM
#common stuff
-   CFLAGS= -mips64 $(CC_OPT) -funroll-loops 
$(PROFILE)
+   CFLAGS= $(CC_OPT) -funroll-loops $(PROFILE)
#if gcc 8.0+, 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+,$(CC_SHORTVER
CFLAGS+=-ftree-vectorize 
-fno-strict-overflow


___
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] Fixed compile warnings on Fedora 30 (#1957)

2019-05-20 Thread Daniel-Constantin Mierla
Pushed the changes manually to format the commit message and reflect better the 
cause, not the effect.

-- 
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/1957#issuecomment-493866087___
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] Fixed compile warnings on Fedora 30 (#1957)

2019-05-20 Thread Daniel-Constantin Mierla
Closed #1957.

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


[sr-dev] git:master:03c60941: app_python3, auth, ims_auth: chmod to 0644 for source code file with exec flag

2019-05-20 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 03c60941cdc1a72ec23fbe7f67d5e6ce13d97af3
URL: 
https://github.com/kamailio/kamailio/commit/03c60941cdc1a72ec23fbe7f67d5e6ce13d97af3

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2019-05-20T09:15:26+02:00

app_python3, auth, ims_auth: chmod to 0644 for source code file with exec flag

- GH #1957

---

Modified: src/modules/app_python3/apy_kemi.c
Modified: src/modules/auth/api.c
Modified: src/modules/ims_auth/pvt_message.c

---

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

---

diff --git a/src/modules/app_python3/apy_kemi.c 
b/src/modules/app_python3/apy_kemi.c
old mode 100755
new mode 100644
diff --git a/src/modules/auth/api.c b/src/modules/auth/api.c
old mode 100755
new mode 100644
diff --git a/src/modules/ims_auth/pvt_message.c 
b/src/modules/ims_auth/pvt_message.c
old mode 100755
new mode 100644


___
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 memory leak - versions 5.1.4 and 5.1.7 (#1895)

2019-05-20 Thread Daniel-Constantin Mierla
You can write to miconda [at] gmail.com

-- 
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1895#issuecomment-493864863___
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] How to define IP Trunk in kamailio (#1960)

2019-05-20 Thread Daniel-Constantin Mierla
Closed #1960.

-- 
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/1960#event-2352136209___
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] How to define IP Trunk in kamailio (#1960)

2019-05-20 Thread Daniel-Constantin Mierla
This is the tracker for bugs in the C code and proposed new features. For 
support and questions on how to use kamailio, join the sr-users mailing list 
and start there the discussion:

  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

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