[sr-dev] git:master:070a9c04: kemix: exported function get_rcvadvip() and get_rcvadvport()

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 070a9c042a1caf19162d3d97b26f8d7548747cbb
URL: 
https://github.com/kamailio/kamailio/commit/070a9c042a1caf19162d3d97b26f8d7548747cbb

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-20T08:12:18+01:00

kemix: exported function get_rcvadvip() and get_rcvadvport()

- return advertised address and port of the receiving socket

---

Modified: src/modules/kemix/kemix_mod.c

---

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

---

diff --git a/src/modules/kemix/kemix_mod.c b/src/modules/kemix/kemix_mod.c
index 4bd6f839d1..66cdcf1bc1 100644
--- a/src/modules/kemix/kemix_mod.c
+++ b/src/modules/kemix/kemix_mod.c
@@ -520,6 +520,38 @@ static sr_kemi_xval_t* ki_kx_get_rcvport(sip_msg_t *msg)
return &_sr_kemi_kx_xval;
 }
 
+/**
+ *
+ */
+static sr_kemi_xval_t* ki_kx_get_rcvadvip(sip_msg_t *msg)
+{
+   memset(&_sr_kemi_kx_xval, 0, sizeof(sr_kemi_xval_t));
+   if(msg->rcv.bind_address!=NULL
+   && msg->rcv.bind_address->useinfo.address_str.len > 0) {
+   _sr_kemi_kx_xval.vtype = SR_KEMIP_STR;
+   _sr_kemi_kx_xval.v.s = 
msg->rcv.bind_address->useinfo.address_str;
+   return &_sr_kemi_kx_xval;
+   }
+
+   return ki_kx_get_rcvip(msg);
+}
+
+/**
+ *
+ */
+static sr_kemi_xval_t* ki_kx_get_rcvadvport(sip_msg_t *msg)
+{
+   memset(&_sr_kemi_kx_xval, 0, sizeof(sr_kemi_xval_t));
+   if(msg->rcv.bind_address!=NULL
+   && msg->rcv.bind_address->useinfo.port_no_str.len > 0) {
+   _sr_kemi_kx_xval.vtype = SR_KEMIP_INT;
+   _sr_kemi_kx_xval.v.n = 
(int)msg->rcv.bind_address->useinfo.port_no;
+   return &_sr_kemi_kx_xval;
+   }
+
+   return ki_kx_get_rcvport(msg);
+}
+
 /**
  *
  */
@@ -1085,6 +1117,16 @@ static sr_kemi_t sr_kemi_kx_exports[] = {
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
+   { str_init("kx"), str_init("get_rcvadvip"),
+   SR_KEMIP_XVAL, ki_kx_get_rcvadvip,
+   { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+   },
+   { str_init("kx"), str_init("get_rcvadvport"),
+   SR_KEMIP_XVAL, ki_kx_get_rcvadvport,
+   { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+   },
{ str_init("kx"), str_init("get_proto"),
SR_KEMIP_XVAL, ki_kx_get_proto,
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,


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


[sr-dev] git:master:88943174: misc/examples: note that sr is exported by app_lua_sr

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 889431746d24c73eeff73705fab36a0e154116a9
URL: 
https://github.com/kamailio/kamailio/commit/889431746d24c73eeff73705fab36a0e154116a9

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-20T08:02:37+01:00

misc/examples: note that sr is exported by app_lua_sr

- hint for lua syntax check

---

Modified: misc/examples/kemi/kamailio-basic-kemi-lua.lua

---

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

---

diff --git a/misc/examples/kemi/kamailio-basic-kemi-lua.lua 
b/misc/examples/kemi/kamailio-basic-kemi-lua.lua
index a896529965..fc31e1b93c 100644
--- a/misc/examples/kemi/kamailio-basic-kemi-lua.lua
+++ b/misc/examples/kemi/kamailio-basic-kemi-lua.lua
@@ -1,7 +1,7 @@
 -- Kamailio - equivalent of routing blocks in Lua
 --
--- KSR - the new dynamic object exporting Kamailio functions (kemi)
--- sr - the old static object exporting Kamailio functions
+-- KSR - the object exporting Kamailio KEMI functions (app_lua module)
+-- sr - the old object exporting Kamailio functions (app_lua_sr module)
 --
 
 -- Relevant remarks:
@@ -11,6 +11,9 @@
 --  * KSR.drop() is only marking the SIP message for drop, but doesn't stop
 --  the execution of the script. Use KSR.x.exit() after it or KSR.x.drop()
 --
+-- Hints:
+--  * Lua syntax check: luac -p /path/to/script.lua
+--
 
 -- debug callback function to print details of execution trace
 --[[


___
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] dispatcher: algorithm 13 latency optimized round-robin with failover (#2493)

2020-11-19 Thread Julien Chavanton
Merged #2493 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/2493#event-4016565588___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:90e3033c: dispatcher: algorithm 13 (#2493)

2020-11-19 Thread GitHub
Module: kamailio
Branch: master
Commit: 90e3033c51d7403a303f44e29f60be339ec217ef
URL: 
https://github.com/kamailio/kamailio/commit/90e3033c51d7403a303f44e29f60be339ec217ef

Author: Julien Chavanton 
Committer: GitHub 
Date: 2020-11-19T07:51:06-08:00

dispatcher: algorithm 13 (#2493)

- latency optimized round-robin with failover
- optionally congestion can be use instead of latency

- thanks to Salman Ali (asalman18) for the review

---

Modified: src/modules/dispatcher/dispatch.c
Modified: src/modules/dispatcher/dispatch.h
Modified: src/modules/dispatcher/doc/dispatcher_admin.xml

---

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


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


[sr-dev] [kamailio/kamailio] smsops: fix len calc for a concatenated sms (#2556)

2020-11-19 Thread alexyosifov
- fixed the calculation for concatenated SMSs
based on TS 23.040, Sec. 9.2.3.16

!-- Kamailio Pull Request Template --

!--
IMPORTANT:
  - for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
  - pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
  - backports to stable branches must be done with git cherry-pick -x 
...
  - code is contributed under BSD for core and main components (tm, sl, auth, 
tls)
  - code is contributed GPLv2 or a compatible license for the other components
  - GPL code is contributed with OpenSSL licensing exception
--

 Pre-Submission Checklist
!-- Go over all points below, and after creating the PR, tick all the 
checkboxes that apply --
!-- All points should be verified, otherwise, read the CONTRIBUTING 
guidelines from above--
!-- If youre unsure about any of these, dont hesitate to ask on 
sr-dev mailing list --
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, 
...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] 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
- [x] 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:
!-- Go over all points below, and after creating the PR, tick the 
checkboxes that apply --
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue # (replace  with an open issue number)

 Description
!-- Describe your changes in detail --

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

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

-- Commit Summary --

  * smsops: fix len calc for a concatenated sms

-- File Changes --

M src/modules/smsops/smsops_impl.c (12)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/2556.patch
https://github.com/kamailio/kamailio/pull/2556.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/2556
___
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] Support SCTP associations created towards same endpoint primary and secondary IP addresses on RHEL/Centos 8 (#2429)

2020-11-19 Thread Daniel-Constantin Mierla
Closing based on the last comments. Enhancements can be contributed with pull 
requests.

-- 
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/2429#issuecomment-730351270___
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] Support SCTP associations created towards same endpoint primary and secondary IP addresses on RHEL/Centos 8 (#2429)

2020-11-19 Thread Daniel-Constantin Mierla
Closed #2429.

-- 
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/2429#event-4015655191___
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] Branch ordering behavior changed between v5.3 and v5.4 (#2449)

2020-11-19 Thread Daniel-Constantin Mierla
Closed #2449.

-- 
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/2449#event-4015650843___
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] Branch ordering behavior changed between v5.3 and v5.4 (#2449)

2020-11-19 Thread Daniel-Constantin Mierla
@cleung-tpn - thanks for testing and feedback! Commit is now backported to 
branch 5.4.

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


[sr-dev] git:master:aa6e9963: tm: proper fill of From/To URI/tag values using parsed structure in t_uac_send()

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: aa6e9963b2725c1b6b7e5ff995a77c222d95fa3c
URL: 
https://github.com/kamailio/kamailio/commit/aa6e9963b2725c1b6b7e5ff995a77c222d95fa3c

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T17:07:05+01:00

tm: proper fill of From/To URI/tag values using parsed structure in t_uac_send()

---

Modified: src/modules/tm/rpc_uac.c

---

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

---

diff --git a/src/modules/tm/rpc_uac.c b/src/modules/tm/rpc_uac.c
index cc50274f0c..dfe99d1390 100644
--- a/src/modules/tm/rpc_uac.c
+++ b/src/modules/tm/rpc_uac.c
@@ -593,7 +593,7 @@ void rpc_t_uac_wait(rpc_t* rpc, void* c)
 
 static int t_uac_check_msg(struct sip_msg* msg,
str* method, str* body,
-   int* fromtag, int *cseq_is, int* cseq,
+   str *fromtag, int *cseq_is, int* cseq,
str* callid)
 {
struct to_body* parsed_from;
@@ -628,7 +628,13 @@ static int t_uac_check_msg(struct sip_msg* msg,
}
 
parsed_from = (struct to_body*)msg->from->parsed;
-   *fromtag = parsed_from->tag_value.s && parsed_from->tag_value.len;
+   if(parsed_from->tag_value.s && parsed_from->tag_value.len) {
+   fromtag->s = parsed_from->tag_value.s;
+   fromtag->len = parsed_from->tag_value.len;
+   } else {
+   fromtag->s = NULL;
+   fromtag->len = 0;
+   }
 
*cseq = 0;
if (msg->cseq && (parsed_cseq = get_cseq(msg))) {
@@ -676,7 +682,8 @@ int t_uac_send(str *method, str *ruri, str *nexthop, str 
*send_socket,
struct socket_info* ssock;
str saddr;
int sport, sproto;
-   int ret, fromtag, cseq_is, cseq;
+   int ret, cseq_is, cseq;
+   str fromtag;
dlg_t dlg;
uac_req_t uac_req;
 
@@ -749,7 +756,9 @@ int t_uac_send(str *method, str *ruri, str *nexthop, str 
*send_socket,
 */
 
/* Generate fromtag if not present */
-   if (!fromtag) {
+   if (fromtag.s && fromtag.len) {
+   dlg.id.loc_tag = fromtag;
+   } else {
generate_fromtag(_tag, _id, ruri);
}
 
@@ -758,8 +767,11 @@ int t_uac_send(str *method, str *ruri, str *nexthop, str 
*send_socket,
else dlg.loc_seq.value = DEFAULT_CSEQ;
dlg.loc_seq.is_set = 1;
 
-   dlg.loc_uri = faked_msg.from->body;
-   dlg.rem_uri = faked_msg.to->body;
+   dlg.loc_uri = get_from(_msg)->uri;
+   dlg.rem_uri = get_to(_msg)->uri;
+   if(get_to(_msg)->tag_value.len > 0) {
+   dlg.id.rem_tag = get_to(_msg)->tag_value;
+   }
dlg.rem_target = *ruri;
dlg.dst_uri = *nexthop;
dlg.send_sock=ssock;


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


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

2020-11-19 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: 9c8abc6bba6807231989c3dabed4aef1e7fff307
URL: 
https://github.com/kamailio/kamailio/commit/9c8abc6bba6807231989c3dabed4aef1e7fff307

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2020-11-19T17:01:16+01:00

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

---

Modified: src/modules/dispatcher/README

---

Diff:  
https://github.com/kamailio/kamailio/commit/9c8abc6bba6807231989c3dabed4aef1e7fff307.diff
Patch: 
https://github.com/kamailio/kamailio/commit/9c8abc6bba6807231989c3dabed4aef1e7fff307.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:b40a2a42: core: new preprocessor directive $!defenv ID=ENVVAR

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: b40a2a42a3f4f3a21f2d0a2f9ec3c18668a05b4d
URL: 
https://github.com/kamailio/kamailio/commit/b40a2a42a3f4f3a21f2d0a2f9ec3c18668a05b4d

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T16:16:35+01:00

core: new preprocessor directive $!defenv ID=ENVVAR

- define an ID to the value of an environment variable with the name ENVVAR
- it can also be just $!defenv ENVVAR and the ID is set to ENVVAR name
- example:
  #!defenv SHELL
  * if environment variable $SHELL is '/bin/bash', then it is like
  #!define SHELL /bin/bash
  * variant:
  #!defenv ENVSHELL=SHELL
  * then it is like
  #!define ENVSHELL /bin/bash
- it is a simplified alternative of using #!substdef with $env(NAME) in
replacement part

---

Modified: src/core/cfg.lex
Modified: src/core/ppcfg.h

---

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

---

diff --git a/src/core/cfg.lex b/src/core/cfg.lex
index 0d18031692..e6afb549d1 100644
--- a/src/core/cfg.lex
+++ b/src/core/cfg.lex
@@ -125,7 +125,7 @@
 
 /* start conditions */
 %x STRING1 STRING2 STR_BETWEEN COMMENT COMMENT_LN ATTR SELECT AVP_PVAR PVAR_P
-%x PVARID INCLF IMPTF EVRTNAME CFGPRINTMODE CFGPRINTLOADMOD
+%x PVARID INCLF IMPTF EVRTNAME CFGPRINTMODE CFGPRINTLOADMOD DEFENV_ID
 %x LINECOMMENT DEFINE_ID DEFINE_EOL DEFINE_DATA IFDEF_ID IFDEF_EOL IFDEF_SKIP
 
 /* config script types : #!SER  or #!KAMAILIO or #!MAX_COMPAT */
@@ -551,6 +551,7 @@ IFNDEF   ifndef
 ENDIFendif
 TRYDEF   "trydefine"|"trydef"
 REDEF"redefine"|"redef"
+DEFENV   defenv
 
 /* else is already defined */
 
@@ -1413,6 +1414,27 @@ IMPORTFILE  "import_file"
ksr_cfg_print_initial_state();
 }
 
+{PREP_START}{DEFENV}  { count();
+   ksr_cfg_print_part(yytext);
+   state = DEFINE_S;
+   BEGIN(DEFENV_ID);
+}
+
+[ \t]*  { /* eat the whitespace */
+   count();
+   ksr_cfg_print_part(yytext);
+   }
+[^ \t\r\n]+   { /* get the define id of environment variable */
+   count();
+   ksr_cfg_print_part(yytext);
+   if(pp_define_env(yytext, yyleng) < 0) {
+   LM_CRIT("error at %s line %d\n", 
(finame)?finame:"cfg", line);
+   exit(-1);
+   }
+   state = INITIAL;
+   ksr_cfg_print_initial_state();
+}
+
 {LOADMODULE} { count(); printf("%s", yytext);
BEGIN(CFGPRINTLOADMOD);
}
@@ -2000,6 +2022,47 @@ int pp_define_set(int len, char *text)
return 0;
 }
 
+int pp_define_env(const char * text, int len)
+{
+   char *r;
+   str defname;
+   str defvalue;
+
+   r = strchr(text, '=');
+
+   defname.s = (char*)text;
+   if(r == NULL) {
+   defname.len = len;
+   r = (char*)text;
+   } else {
+   defname.len = r - text;
+   r++;
+   if(strlen(r) == 0) {
+   LM_ERR("invalid defenv id [%s]\n", (char*)text);
+   return -1;
+   }
+   }
+   defvalue.s = getenv(r);
+
+   if(defvalue.s == NULL) {
+   LM_ERR("env variable not defined [%s]\n", (char*)text);
+   return -1;
+   }
+   defvalue.len = strlen(defvalue.s);
+
+   pp_define_set_type(0);
+   if(pp_define(defname.len, defname.s)<0) {
+   LM_ERR("cannot set define name [%s]\n", (char*)text);
+   return -1;
+   }
+   if(pp_define_set(defvalue.len, defvalue.s)<0) {
+   LM_ERR("cannot set define value [%s]\n", (char*)text);
+   return -1;
+   }
+
+   return 0;
+}
+
 str *pp_define_get(int len, const char * text)
 {
str var = {(char *)text, len};
diff --git a/src/core/ppcfg.h b/src/core/ppcfg.h
index 0573b0165d..70627268b6 100644
--- a/src/core/ppcfg.h
+++ b/src/core/ppcfg.h
@@ -42,6 +42,7 @@ int  pp_define(int len, const char *text);
 int  pp_define_set(int len, char *text);
 int  pp_define_set_type(int type);
 str *pp_define_get(int len, const char * text);
+int  pp_define_env(const char * text, int len);
 
 void pp_ifdef_level_update(int val);
 int pp_ifdef_level_check(void);


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


[sr-dev] git:5.4:2d733ec7: tm: print ruri mode in debug message from t load contacts

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.4
Commit: 2d733ec7c9e26ad79d9d8503db0d342217febd30
URL: 
https://github.com/kamailio/kamailio/commit/2d733ec7c9e26ad79d9d8503db0d342217febd30

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T13:29:03+01:00

tm: print ruri mode in debug message from t load contacts

(cherry picked from commit 3214ecd8ee82d1b69cde57d96dddefe1301c190c)

---

Modified: src/modules/tm/t_serial.c

---

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

---

diff --git a/src/modules/tm/t_serial.c b/src/modules/tm/t_serial.c
index 13611cdb54..e7e9c8eedc 100644
--- a/src/modules/tm/t_serial.c
+++ b/src/modules/tm/t_serial.c
@@ -337,7 +337,7 @@ int ki_t_load_contacts_mode(struct sip_msg* msg, int mode)
}
 
/* Check if anything needs to be done */
-   LM_DBG("nr_branches is %d\n", nr_branches);
+   LM_DBG("nr_branches is %d - new uri mode %d\n", nr_branches, 
ruri_is_new);
 
if ((nr_branches == 0) || ((nr_branches == 1) && !ruri_is_new)) {
LM_DBG("nothing to do - only one contact!\n");


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


[sr-dev] git:5.4:f61d7a1b: tm: use q field comparison in while for standard t contacts load

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.4
Commit: f61d7a1b6b45bbed29bf4bc6c8a69fd52700ca41
URL: 
https://github.com/kamailio/kamailio/commit/f61d7a1b6b45bbed29bf4bc6c8a69fd52700ca41

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T13:28:53+01:00

tm: use q field comparison in while for standard t contacts load

- fix ordering change to standar mode introduced with proportional mode
- GH #2449

(cherry picked from commit 59f6ddbe902d61bc682dd12fc6330df656468b1b)

---

Modified: src/modules/tm/t_serial.c

---

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

---

diff --git a/src/modules/tm/t_serial.c b/src/modules/tm/t_serial.c
index d27a648243..13611cdb54 100644
--- a/src/modules/tm/t_serial.c
+++ b/src/modules/tm/t_serial.c
@@ -459,11 +459,20 @@ int ki_t_load_contacts_mode(struct sip_msg* msg, int mode)
 
prev = (struct contact *)0;
curr = contacts;
-   while (curr &&
-   ((curr->q_index < next->q_index) ||
-((curr->q_index == next->q_index) && 
(next->path.len == 0 {
-   prev = curr;
-   curr = curr->next;
+   if (mode == T_LOAD_PROPORTIONAL) {
+   while (curr &&
+   ((curr->q_index < next->q_index) ||
+((curr->q_index == next->q_index) && 
(next->path.len == 0 {
+   prev = curr;
+   curr = curr->next;
+   }
+   } else {
+   while (curr &&
+   ((curr->q < next->q) ||
+((curr->q == next->q) && 
(next->path.len == 0 {
+   prev = curr;
+   curr = curr->next;
+   }
}
if (!curr) {
next->next = (struct contact *)0;


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


[sr-dev] git:5.4:d9a1a5cf: drouting: give portparameter set to 0 to sip_resolvehost()

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.4
Commit: d9a1a5cf667e7d093cc077fc51297825565c79d1
URL: 
https://github.com/kamailio/kamailio/commit/d9a1a5cf667e7d093cc077fc51297825565c79d1

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T13:28:35+01:00

drouting: give portparameter set to 0 to sip_resolvehost()

- enable doing SRV query, GH #2553

(cherry picked from commit 18f59c10582845da5eea280990daf19c804978fb)

---

Modified: src/modules/drouting/routing.c

---

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

---

diff --git a/src/modules/drouting/routing.c b/src/modules/drouting/routing.c
index a1d32fa0ba..da4385911f 100644
--- a/src/modules/drouting/routing.c
+++ b/src/modules/drouting/routing.c
@@ -268,6 +268,7 @@ int add_dst(rt_data_t *r,
 #define GWABUF_MAX_SIZE 512
char gwabuf[GWABUF_MAX_SIZE];
str gwas;
+   unsigned short port;
 
if(NULL == r || NULL == ip) {
LM_ERR("invalid parametres\n");
@@ -331,7 +332,8 @@ int add_dst(rt_data_t *r,
}
/* note we discard the port discovered by the resolve function - we are
interested only in the port that was actually configured. */
-   if((he = sip_resolvehost(, NULL, (char *)(void *)))
+   port = 0;
+   if((he = sip_resolvehost(, , (char *)(void *)))
== 0) {
if(dr_force_dns) {
LM_ERR("cannot resolve <%.*s>\n", uri.host.len, 
uri.host.s);


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


[sr-dev] git:5.4:c9ab7671: jsonrpcs: exported dispatch() function to kemi

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.4
Commit: c9ab7671bffdee3c775f6eb13cbd2363b6f5ecf3
URL: 
https://github.com/kamailio/kamailio/commit/c9ab7671bffdee3c775f6eb13cbd2363b6f5ecf3

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T13:28:08+01:00

jsonrpcs: exported dispatch() function to kemi

(cherry picked from commit 08a9ed3d136c861f990e4f63c2c0544e08d9078d)

---

Modified: src/modules/jsonrpcs/jsonrpcs_mod.c

---

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

---

diff --git a/src/modules/jsonrpcs/jsonrpcs_mod.c 
b/src/modules/jsonrpcs/jsonrpcs_mod.c
index 6f3491b038..c3b8003046 100644
--- a/src/modules/jsonrpcs/jsonrpcs_mod.c
+++ b/src/modules/jsonrpcs/jsonrpcs_mod.c
@@ -1227,7 +1227,7 @@ static void mod_destroy(void)
 /**
  *
  */
-static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2)
+static int ki_jsonrpcs_dispatch(sip_msg_t* msg)
 {
rpc_export_t* rpce;
jsonrpc_ctx_t* ctx;
@@ -1315,6 +1315,14 @@ static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, 
char* s2)
 }
 
 
+/**
+ *
+ */
+static int jsonrpc_dispatch(sip_msg_t* msg, char* s1, char* s2)
+{
+   return ki_jsonrpcs_dispatch(msg);
+}
+
 int jsonrpc_exec_ex(str *cmd, str *rpath)
 {
rpc_export_t* rpce;
@@ -1551,6 +1559,11 @@ static sr_kemi_xval_t* ki_jsonrpcs_response(sip_msg_t 
*msg)
  */
 /* clang-format off */
 static sr_kemi_t sr_kemi_jsonrpcs_exports[] = {
+   { str_init("jsonrpcs"), str_init("dispatch"),
+   SR_KEMIP_INT, ki_jsonrpcs_dispatch,
+   { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
+   SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
+   },
{ str_init("jsonrpcs"), str_init("exec"),
SR_KEMIP_INT, ki_jsonrpcs_exec,
{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,


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


[sr-dev] git:5.4:bec6cdf1: core: added missing field in sip_msg_update_buffer

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.4
Commit: bec6cdf10dfbf9f32fce041987a3468b8a675a22
URL: 
https://github.com/kamailio/kamailio/commit/bec6cdf10dfbf9f32fce041987a3468b8a675a22

Author: Aleksandar Yosifov 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T13:27:38+01:00

core: added missing field in sip_msg_update_buffer

- added a missing field in sip_msg_update_buffer()
  when restoring message fiedls: msg->pid.

(cherry picked from commit 57be5c1f33344275c15777a7927d9c48df4a69ba)

---

Modified: src/core/msg_translator.c

---

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

---

diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c
index fd183d4f80..77b90a92c6 100644
--- a/src/core/msg_translator.c
+++ b/src/core/msg_translator.c
@@ -3276,6 +3276,7 @@ int sip_msg_update_buffer(sip_msg_t *msg, str *obuf)
/* restore msg fields */
msg->buf = tmp.buf;
msg->id = tmp.id;
+   msg->pid = tmp.pid;
msg->rcv = tmp.rcv;
msg->set_global_address = tmp.set_global_address;
msg->set_global_port = tmp.set_global_port;


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


[sr-dev] git:5.4:f6747a1f: sctp: memcpy field data to avoid unaligned access warning

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.4
Commit: f6747a1fe4af59062733090ee0081d1bf15669c3
URL: 
https://github.com/kamailio/kamailio/commit/f6747a1fe4af59062733090ee0081d1bf15669c3

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T13:27:02+01:00

sctp: memcpy field data to avoid unaligned access warning

- GH #2543

(cherry picked from commit 4bb099b046939b85e1827b804167a51ef4bc00c4)

---

Modified: src/modules/sctp/sctp_server.c

---

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

---

diff --git a/src/modules/sctp/sctp_server.c b/src/modules/sctp/sctp_server.c
index 6690503973..fff7a0b6b3 100644
--- a/src/modules/sctp/sctp_server.c
+++ b/src/modules/sctp/sctp_server.c
@@ -2258,6 +2258,7 @@ static int sctp_handle_notification(struct socket_info 
*si,
 {
union sctp_notification *snp;
char su_buf[SU2A_MAX_STR_SIZE];
+   struct sockaddr_storage sa_storage;
 
 #define SNOT DBG
 #define ERR_LEN_TOO_SMALL(length, val, bind_addr, from_su, text)\
@@ -2311,8 +2312,9 @@ static int sctp_handle_notification(struct socket_info 
*si,

sctp_paddr_change_state2s(snp->sn_paddr_change.spc_state),
snp->sn_paddr_change.spc_state,
>sn_paddr_change.spc_aaddr);
-   strcpy(su_buf, su2a((union sockaddr_union 
*)>sn_paddr_change
-   
   .spc_aaddr,
+   memcpy(_storage, >sn_paddr_change.spc_aaddr,
+   sizeof(snp->sn_paddr_change.spc_aaddr));
+   strcpy(su_buf, su2a((union sockaddr_union *)_storage,
   
sizeof(snp->sn_paddr_change.spc_aaddr)));
SNOT("sctp notification from %s on %.*s:%d: 
SCTP_PEER_ADDR_CHANGE"
 ": %s: %s: assoc_id %d \n",


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


[sr-dev] git:5.4:f3a872e9: http_async_client: include poll.h instead sys/poll.h

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.4
Commit: f3a872e9e8f780a23f7e3426ce4152a3a26cc448
URL: 
https://github.com/kamailio/kamailio/commit/f3a872e9e8f780a23f7e3426ce4152a3a26cc448

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T13:26:53+01:00

http_async_client: include poll.h instead sys/poll.h

- according to POSIX specs
- GH #2543

(cherry picked from commit 8f30c75cff7787a39f7c934e00e933b1beb43c20)

---

Modified: src/modules/http_async_client/http_multi.h

---

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

---

diff --git a/src/modules/http_async_client/http_multi.h 
b/src/modules/http_async_client/http_multi.h
index c830daa9b1..10070eb6bd 100644
--- a/src/modules/http_async_client/http_multi.h
+++ b/src/modules/http_async_client/http_multi.h
@@ -37,7 +37,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 


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


[sr-dev] git:5.4:b72ab5e5: core: init origproto to fix compiler warning

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.4
Commit: b72ab5e554d230b36a7c6dbc79b8e86b5d0c70e2
URL: 
https://github.com/kamailio/kamailio/commit/b72ab5e554d230b36a7c6dbc79b8e86b5d0c70e2

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T13:26:19+01:00

core: init origproto to fix compiler warning

- GH #2543

(cherry picked from commit ef3233d14080936486d09edbe9598d7d92bd2f33)

---

Modified: src/core/dns_cache.c

---

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

---

diff --git a/src/core/dns_cache.c b/src/core/dns_cache.c
index e383786de2..05dc3f98ba 100644
--- a/src/core/dns_cache.c
+++ b/src/core/dns_cache.c
@@ -3261,6 +3261,7 @@ inline static int dns_naptr_sip_resolve(struct 
dns_srv_handle* h,  str* name,
 
ret=-E_DNS_NO_NAPTR;
if(proto) origproto=*proto;
+   else origproto = PROTO_NONE;
if (dns_hash==0){ /* not init => use normal, non-cached version */
LM_WARN("called before dns cache initialization\n");
h->srv=h->a=0;


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


[sr-dev] git:5.4:88f43b97: dialog: skip doing cseq update processing for non-sip requests

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.4
Commit: 88f43b97768676fd2b84c3e855ec5ae441b826cd
URL: 
https://github.com/kamailio/kamailio/commit/88f43b97768676fd2b84c3e855ec5ae441b826cd

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T13:23:45+01:00

dialog: skip doing cseq update processing for non-sip requests

(cherry picked from commit 960b60ede8543f38b61ad2769e81e11d5a777df8)

---

Modified: src/modules/dialog/dlg_cseq.c

---

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

---

diff --git a/src/modules/dialog/dlg_cseq.c b/src/modules/dialog/dlg_cseq.c
index a85b726514..17c63bbb1c 100644
--- a/src/modules/dialog/dlg_cseq.c
+++ b/src/modules/dialog/dlg_cseq.c
@@ -381,7 +381,12 @@ int dlg_cseq_msg_sent(sr_event_param_t *evp)
goto done;
}
 
-   if((get_to()->tag_value.len<=0)) {
+   if(!IS_SIP()) {
+   /* nothing to do for non-sip requests */
+   goto done;
+   }
+
+   if(get_to()->tag_value.len<=0) {
/* intial request - handle only INVITEs */
if(msg.first_line.u.request.method_value!=METHOD_INVITE) {
goto done;


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


[sr-dev] git:5.4:82e00ce3: exec: debug message when command returns non-zero

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.4
Commit: 82e00ce32c9a232be1dbd2e0a0e6e6c349e054b0
URL: 
https://github.com/kamailio/kamailio/commit/82e00ce32c9a232be1dbd2e0a0e6e6c349e054b0

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T13:23:06+01:00

exec: debug message when command returns non-zero

(cherry picked from commit e9eee1ead964992a2d81014709755bbfd1e995c9)

---

Modified: src/modules/exec/exec.c

---

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

---

diff --git a/src/modules/exec/exec.c b/src/modules/exec/exec.c
index 0e809ed8af..763e30816e 100644
--- a/src/modules/exec/exec.c
+++ b/src/modules/exec/exec.c
@@ -326,11 +326,17 @@ int exec_cmd(sip_msg_t *msg, char *cmd)
exit_status = pclose(pipe);
if(WIFEXITED(exit_status)) { /* exited properly  */
/* return false if script exited with non-zero status */
-   if(WEXITSTATUS(exit_status) != 0)
+   if(WEXITSTATUS(exit_status) != 0) {
+   LM_DBG("cmd %s with non-zero status - exit_status=%d,"
+   " wexitstatus: %d, errno=%d: %s\n",
+   cmd, exit_status, 
WEXITSTATUS(exit_status),
+   errno, strerror(errno));
ret = -1;
+   }
} else { /* exited erroneously */
-   LM_ERR("cmd %s failed. exit_status=%d, errno=%d: %s\n", cmd,
-   exit_status, errno, strerror(errno));
+   LM_ERR("cmd %s failed. exit_status=%d, wexitstatus: %d, 
errno=%d: %s\n",
+   cmd, exit_status, WEXITSTATUS(exit_status),
+   errno, strerror(errno));
ret = -1;
}
 


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


[sr-dev] git:5.4:17cb589c: dialog: small formatting changes

2020-11-19 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: 5.4
Commit: 17cb589ce5ac07dbb12f1b99f17258f313adf783
URL: 
https://github.com/kamailio/kamailio/commit/17cb589ce5ac07dbb12f1b99f17258f313adf783

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2020-11-19T13:22:55+01:00

dialog: small formatting changes

(cherry picked from commit a3443211515068bb12ecbd53541785a5ebf1cb6c)

---

Modified: src/modules/dialog/dlg_dmq.c
Modified: src/modules/dialog/dlg_handlers.c

---

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

---

diff --git a/src/modules/dialog/dlg_dmq.c b/src/modules/dialog/dlg_dmq.c
index a5628f485b..9f70354d50 100644
--- a/src/modules/dialog/dlg_dmq.c
+++ b/src/modules/dialog/dlg_dmq.c
@@ -534,11 +534,11 @@ int dlg_dmq_replicate_action(dlg_dmq_action_t action, 
dlg_cell_t* dlg,
if (dlg->vars != NULL) {
srjson_t *pj = NULL;
pj = srjson_CreateObject();
-for(var=dlg->vars ; var ; var=var->next) {
+   for(var=dlg->vars ; var ; var=var->next) {
srjson_AddStrToObject(, pj, 
var->key.s,
var->value.s, 
var->value.len);
-}
-srjson_AddItemToObject(, jdoc.root, "vars", pj);
+   }
+   srjson_AddItemToObject(, jdoc.root, 
"vars", pj);
}
 
if (dlg->profile_links) {
@@ -657,8 +657,8 @@ int dmq_send_all_dlgs(dmq_node_t* dmq_node) {
dlg_lock( d_table, );
 
for(dlg = entry.first; dlg != NULL; dlg = dlg->next){
-   dlg->dflags |= DLG_FLAG_CHANGED_PROF;
-   dlg_dmq_replicate_action(DLG_DMQ_UPDATE, dlg, 
0, dmq_node);
+   dlg->dflags |= DLG_FLAG_CHANGED_PROF;
+   dlg_dmq_replicate_action(DLG_DMQ_UPDATE, dlg, 0, 
dmq_node);
}
 
dlg_unlock( d_table, );
@@ -672,7 +672,7 @@ int dmq_send_all_dlgs(dmq_node_t* dmq_node) {
 * @brief dmq response callback
 */
 int dlg_dmq_resp_callback_f(struct sip_msg* msg, int code,
-dmq_node_t* node, void* param)
+   dmq_node_t* node, void* param)
 {
LM_DBG("dmq response callback triggered [%p %d %p]\n", msg, code, 
param);
return 0;
diff --git a/src/modules/dialog/dlg_handlers.c 
b/src/modules/dialog/dlg_handlers.c
index 7cf6b7ba7a..3f8adefb79 100644
--- a/src/modules/dialog/dlg_handlers.c
+++ b/src/modules/dialog/dlg_handlers.c
@@ -749,15 +749,15 @@ static void dlg_on_send(struct cell* t, int type, struct 
tmcb_params *param)
LM_DBG("dialog_on_send CB\n");
iuid = (dlg_iuid_t*)(*param->param);
if (iuid==NULL)
-   return;
+   return;
 
dlg = dlg_get_by_iuid(iuid);
if(dlg==NULL)
-   return;
+   return;
 
/* sync over dmq */
if (dlg_enable_dmq) {
-   dlg_dmq_replicate_action(DLG_DMQ_UPDATE, dlg, 1, 0);
+   dlg_dmq_replicate_action(DLG_DMQ_UPDATE, dlg, 1, 0);
}
 
/* unref by 2: 1 set when adding in tm cb, 1 set by dlg_get_by_iuid() */


___
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] dispatcher: algorithm 13 latency optimized round-robin with failover (#2493)

2020-11-19 Thread Henning Westerholt
Thank you for the pull request, and also the announcement on the list. 
Are there any more additions/refinements done from your side? Otherwise if 
there are no objections it can be merged, i think.

-- 
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/2493#issuecomment-730171093___
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] jansson: Fix another case of inverse boolean logic (#2555)

2020-11-19 Thread Henning Westerholt
Thanks, merged

-- 
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/2555#issuecomment-730169711___
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] jansson: Fix another case of inverse boolean logic (#2555)

2020-11-19 Thread Henning Westerholt
Merged #2555 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/2555#event-4014240353___
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] jansson: Fix another case of inverse boolean logic (#2555)

2020-11-19 Thread Henning Westerholt
related to  0125c1c8d8c1179

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


[sr-dev] git:master:a93d3f93: modules: readme files regenerated - http_async_client ... [skip ci]

2020-11-19 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: a93d3f9375a9ad044866c2aa32490238a4a270a2
URL: 
https://github.com/kamailio/kamailio/commit/a93d3f9375a9ad044866c2aa32490238a4a270a2

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2020-11-19T10:46:19+01:00

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

---

Modified: src/modules/http_async_client/README

---

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

---

diff --git a/src/modules/http_async_client/README 
b/src/modules/http_async_client/README
index f2afe6325d..cfa2c37df0 100644
--- a/src/modules/http_async_client/README
+++ b/src/modules/http_async_client/README
@@ -477,6 +477,21 @@ http_async_query("https://example.com/test.php;, 
"HTTP_REPLY");
  * $http_mb and $http_ml: HTTP response buffer (including headers) and
length
  * $http_rb and $http_bs: HTTP response body and body length
+ * $http_time: provides access to broken-down transfer time in
+   microseconds calculated by cURL
+   (https://curl.se/libcurl/c/curl_easy_getinfo.html).
+   'name' can be:
+  + total - total time for the transfer
+  + lookup - name lookup time
+  + connect - time from the start until the connection to the
+remote host (or proxy) was completed.
+  + appconnect - time from start until SSL/SSH handshake completed
+  + pretransfer - time from start until just before the transfer
+begins
+  + starttransfer - time from start until just when the first byte
+is received
+  + redirect - time taken for all redirect steps before the final
+transfer.
 
 6. Statistics
 


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


[sr-dev] git:master:8ab72a37: http_async_client: add http_time pseudovariable

2020-11-19 Thread Federico Cabiddu
Module: kamailio
Branch: master
Commit: 8ab72a37565bbec503d825f48774a0627014f665
URL: 
https://github.com/kamailio/kamailio/commit/8ab72a37565bbec503d825f48774a0627014f665

Author: Federico Cabiddu 
Committer: Federico Cabiddu 
Date: 2020-11-19T10:34:13+01:00

http_async_client: add http_time pseudovariable

---

Modified: src/modules/http_async_client/async_http.c
Modified: src/modules/http_async_client/async_http.h
Modified: src/modules/http_async_client/doc/http_async_client_admin.xml
Modified: src/modules/http_async_client/hm_hash.h
Modified: src/modules/http_async_client/http_async_client_mod.c
Modified: src/modules/http_async_client/http_multi.c

---

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


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