[sr-dev] Notice: work on mailing lists server
Hello, be aware that today I plan to do some maintenance on the mailing lists server, including the shifting to the lists.kamailio.org as primary domain. I expect not to have any relevant downtime, but one never knows. Maybe the archive won't be available for short time due to changes needs to be done to the web server after mailing lists server is upgraded. I will sent another notification when everything is finished. Cheers, Daniel -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:13c2300f: mqueue: exported functions to kemi framework
Module: kamailio Branch: master Commit: 13c2300f736c74faa6b4557f6146e0b7de9f89da URL: https://github.com/kamailio/kamailio/commit/13c2300f736c74faa6b4557f6146e0b7de9f89da Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-10T17:20:38+02:00 mqueue: exported functions to kemi framework --- Modified: src/modules/mqueue/mqueue_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/13c2300f736c74faa6b4557f6146e0b7de9f89da.diff Patch: https://github.com/kamailio/kamailio/commit/13c2300f736c74faa6b4557f6146e0b7de9f89da.patch --- diff --git a/src/modules/mqueue/mqueue_mod.c b/src/modules/mqueue/mqueue_mod.c index 8f2c610..aa8f9ff 100644 --- a/src/modules/mqueue/mqueue_mod.c +++ b/src/modules/mqueue/mqueue_mod.c @@ -34,6 +34,7 @@ #include "../../core/rpc_lookup.h" #include "../../core/parser/parse_param.h" #include "../../core/shm_init.h" +#include "../../core/kemi.h" #include "mqueue_api.h" #include "api.h" @@ -325,3 +326,88 @@ static int mqueue_rpc_init(void) } return 0; } + +/** + * + */ +static int ki_mq_add(sip_msg_t* msg, str* mq, str* key, str* val) +{ + if(mq_item_add(mq, key, val)<0) + return -1; + return 1; +} + +/** + * + */ +static int ki_mq_fetch(sip_msg_t* msg, str* mq) +{ + int ret; + ret = mq_head_fetch(mq); + if(ret<0) + return ret; + return 1; +} + +/** + * + */ +static int ki_mq_size(sip_msg_t *msg, str *mq) +{ + int ret; + + ret = _mq_get_csize(mq); + + if(ret < 0 && mq!=NULL) + LM_ERR("mqueue %.*s not found\n", mq->len, mq->s); + + return ret; +} + +/** + * + */ +static int ki_mq_pv_free(sip_msg_t* msg, str *mq) +{ + mq_pv_free(mq); + return 1; +} + +/** + * + */ +/* clang-format off */ +static sr_kemi_t sr_kemi_mqueue_exports[] = { + { str_init("mqueue"), str_init("mq_add"), + SR_KEMIP_INT, ki_mq_add, + { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("mqueue"), str_init("mq_fetch"), + SR_KEMIP_INT, ki_mq_fetch, + { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("mqueue"), str_init("mq_size"), + SR_KEMIP_INT, ki_mq_size, + { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("mqueue"), str_init("mq_pv_free"), + SR_KEMIP_INT, ki_mq_pv_free, + { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + + { {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } } +}; +/* clang-format on */ + +/** + * + */ +int mod_register(char *path, int *dlflags, void *p1, void *p2) +{ + sr_kemi_modules_add(sr_kemi_mqueue_exports); + return 0; +} ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:dbd78eb8: tls: update log messages macros
Module: kamailio Branch: master Commit: dbd78eb8a9f222d8cd6fbcd800552e51d3afaa7c URL: https://github.com/kamailio/kamailio/commit/dbd78eb8a9f222d8cd6fbcd800552e51d3afaa7c Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-10T17:04:58+02:00 tls: update log messages macros --- Modified: src/modules/tls/tls_locking.c --- Diff: https://github.com/kamailio/kamailio/commit/dbd78eb8a9f222d8cd6fbcd800552e51d3afaa7c.diff Patch: https://github.com/kamailio/kamailio/commit/dbd78eb8a9f222d8cd6fbcd800552e51d3afaa7c.patch --- diff --git a/src/modules/tls/tls_locking.c b/src/modules/tls/tls_locking.c index 0e1e7d8..9d8e8ac 100644 --- a/src/modules/tls/tls_locking.c +++ b/src/modules/tls/tls_locking.c @@ -45,12 +45,12 @@ static struct CRYPTO_dynlock_value* dyn_create_f(const char* file, int line) l=shm_malloc(sizeof(struct CRYPTO_dynlock_value)); if (l==0){ - LOG(L_CRIT, "ERROR: tls: dyn_create_f locking callback out of shm." + LM_CRIT("dyn create locking callback out of shm." " memory (called from %s:%d)\n", file, line); goto error; } if (lock_init(>lock)==0){ - LOG(L_CRIT, "ERROR: tls: dyn_create_f locking callback: lock " + LM_CRIT("dyn create locking callback: lock " "initialization failed (called from %s:%d)\n", file, line); shm_free(l); goto error; @@ -66,7 +66,7 @@ static void dyn_lock_f(int mode, struct CRYPTO_dynlock_value* l, const char* file, int line) { if (l==0){ - LOG(L_CRIT, "BUG: tls: dyn_lock_f locking callback: null lock" + LM_CRIT("dyn lock locking callback: null lock" " (called from %s:%d)\n", file, line); /* try to continue */ return; @@ -84,7 +84,7 @@ static void dyn_destroy_f(struct CRYPTO_dynlock_value *l, const char* file, int line) { if (l==0){ - LOG(L_CRIT, "BUG: tls: dyn_destroy_f locking callback: null lock" + LM_CRIT("dyn destroy locking callback: null lock" " (called from %s:%d)\n", file, line); return; } @@ -98,7 +98,7 @@ static void dyn_destroy_f(struct CRYPTO_dynlock_value *l, static void locking_f(int mode, int n, const char* file, int line) { if (n<0 || n>=n_static_locks){ - LOG(L_CRIT, "BUG: tls: locking_f (callback): invalid lock number: " + LM_CRIT("locking (callback): invalid lock number: " " %d (range 0 - %d), called from %s:%d\n", n, n_static_locks, file, line); abort(); /* quick crash :-) */ @@ -140,8 +140,7 @@ int tls_init_locks() /* init "static" tls locks */ n_static_locks=CRYPTO_num_locks(); if (n_static_locks<0){ - LOG(L_CRIT, "BUG: tls: tls_init_locking: bad CRYPTO_num_locks %d\n", - n_static_locks); + LM_CRIT("bad CRYPTO_num_locks %d\n", n_static_locks); n_static_locks=0; } if (n_static_locks){ @@ -151,13 +150,12 @@ int tls_init_locks() } static_locks=lock_set_alloc(n_static_locks); if (static_locks==0){ - LOG(L_CRIT, "ERROR: tls_init_locking: could not allocate lockset" - " with %d locks\n", n_static_locks); + LM_CRIT("could not allocate lockset with %d locks\n", + n_static_locks); goto error; } if (lock_set_init(static_locks)==0){ - LOG(L_CRIT, "ERROR: tls_init_locking: lock_set_init failed " - "(%d locks)\n", n_static_locks); + LM_CRIT("lock set init failed (%d locks)\n", n_static_locks); lock_set_dealloc(static_locks); static_locks=0; n_static_locks=0; ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] new compiler warnings (on debian stretch) in latest master
m tls_init.c:45: > /usr/include/openssl/ssl.h:1604:1: note: declared here > DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_client_method(void)) /* > TLSv1.1 */ > ^ > tls_init.c:383:2: warning: 'TLSv1_1_server_method' is deprecated > [-Wdeprecated-declarations] > ssl_methods[TLS_USE_TLSv1_1_srv - 1] = TLSv1_1_server_method(); > ^~~ > In file included from /usr/include/openssl/ct.h:13:0, > from /usr/include/openssl/ssl.h:61, > from tls_init.c:45: > /usr/include/openssl/ssl.h:1603:1: note: declared here > DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_server_method(void)) /* > TLSv1.1 */ > ^ > tls_init.c:384:2: warning: 'TLSv1_1_method' is deprecated > [-Wdeprecated-declarations] > ssl_methods[TLS_USE_TLSv1_1 - 1] = TLSv1_1_method(); > ^~~ > In file included from /usr/include/openssl/ct.h:13:0, > from /usr/include/openssl/ssl.h:61, > from tls_init.c:45: > /usr/include/openssl/ssl.h:1602:1: note: declared here > DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_method(void)) /* TLSv1.1 > */ > ^ > tls_init.c:388:2: warning: 'TLSv1_2_client_method' is deprecated > [-Wdeprecated-declarations] > ssl_methods[TLS_USE_TLSv1_2_cli - 1] = TLSv1_2_client_method(); > ^~~ > In file included from /usr/include/openssl/ct.h:13:0, > from /usr/include/openssl/ssl.h:61, > from tls_init.c:45: > /usr/include/openssl/ssl.h:1610:1: note: declared here > DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(void)) /* > TLSv1.2 */ > ^ > tls_init.c:389:2: warning: 'TLSv1_2_server_method' is deprecated > [-Wdeprecated-declarations] > ssl_methods[TLS_USE_TLSv1_2_srv - 1] = TLSv1_2_server_method(); > ^~~ > In file included from /usr/include/openssl/ct.h:13:0, > from /usr/include/openssl/ssl.h:61, > from tls_init.c:45: > /usr/include/openssl/ssl.h:1609:1: note: declared here > DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_server_method(void)) /* > TLSv1.2 */ > ^ > tls_init.c:390:2: warning: 'TLSv1_2_method' is deprecated > [-Wdeprecated-declarations] > ssl_methods[TLS_USE_TLSv1_2 - 1] = TLSv1_2_method(); > ^~~ > In file included from /usr/include/openssl/ct.h:13:0, > from /usr/include/openssl/ssl.h:61, > from tls_init.c:45: > /usr/include/openssl/ssl.h:1608:1: note: declared here > DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_method(void)) /* TLSv1.2 > */ > ^ > > ___ > sr-dev mailing list > sr-dev@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Segmentation fault using http_async_client on kamailio 5.0.0 (#1056)
@davyvdm - have you been able to test with patches from PR #1063? Is all going fine with them? -- 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/1056#issuecomment-292954660___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:bd6e0a29: dialog: exported more functions to kemi framework
Module: kamailio Branch: master Commit: bd6e0a2976be8a6e23ec9145d58e448b7a0579e7 URL: https://github.com/kamailio/kamailio/commit/bd6e0a2976be8a6e23ec9145d58e448b7a0579e7 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-10T15:17:40+02:00 dialog: exported more functions to kemi framework --- Modified: src/modules/dialog/dialog.c --- Diff: https://github.com/kamailio/kamailio/commit/bd6e0a2976be8a6e23ec9145d58e448b7a0579e7.diff Patch: https://github.com/kamailio/kamailio/commit/bd6e0a2976be8a6e23ec9145d58e448b7a0579e7.patch ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [SR-Users] INFO: Shifting mailing lists to kamailio.org domain
Not seeing anything against so far, I am going to shift the sr-users and sr-dev to use kamailio.org top domain. Cheers, Daniel On 03.04.17 14:56, Daniel-Constantin Mierla wrote: > Hello, > > I think it is time to migrate the mailing lists under kamailio.org > domain, respectively use lists.kamailio.org. > > The lists.sip-router.org will still work, but lists.kamailio.org is > intended to become the primary domain for mailing lists. > > The sip-router.org was the quick solution for integrating Kamailio and > SER in one project back in 2008, when kamailio.org and iptel.org still > needed to be operated for a while as independent projects. For few years > now, Kamailio is the only project name that is used out there and it > will make operating everything a bit smoother, more coherent and also > avoid eventual confusions for people new into the project. > > As a matter of fact, we even had a small incident few weeks ago -- due > to split management of sip-router.org and DNS registration expire > notifications going to an email address on a different server than > kamailio.org, the domain was expired for few hours (although it was kept > on hold by registrar) and mailing lists started to be unavailable. > Fortunately that was discovered and fixed in time. > > The names will stay the same sr-users and sr-dev, just primary domain > will be using kamailio.org (which should 'hopefully' work even now, as > this email was addressed with mixed sr-dev@lists.sip-router.org and > sr-us...@lists.kamailio.org). > > If anyone has different opinions or suggestions, let's discuss them! > > Cheers, > Daniel > -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:6b9e63f4: dialog: clarification for dlg_bye() parameters in docs
Module: kamailio Branch: master Commit: 6b9e63f4e1948b53ce2b986c495085e34dc83165 URL: https://github.com/kamailio/kamailio/commit/6b9e63f4e1948b53ce2b986c495085e34dc83165 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-10T13:51:38+02:00 dialog: clarification for dlg_bye() parameters in docs --- Modified: src/modules/dialog/doc/dialog_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/6b9e63f4e1948b53ce2b986c495085e34dc83165.diff Patch: https://github.com/kamailio/kamailio/commit/6b9e63f4e1948b53ce2b986c495085e34dc83165.patch --- diff --git a/src/modules/dialog/doc/dialog_admin.xml b/src/modules/dialog/doc/dialog_admin.xml index af1443e..88c6ed7 100644 --- a/src/modules/dialog/doc/dialog_admin.xml +++ b/src/modules/dialog/doc/dialog_admin.xml @@ -1753,13 +1753,12 @@ redlg_setflag("1"); side - where to send the BYE. It can be: - 'caller', 'callee', or both. + 'caller', 'callee', or 'all' (send to both sides). - This function can be used from BRANCH_ROUTE, - REQUEST_ROUTE, ONREPLY_ROUTE and FAILURE_ROUTE. + This function can be used from ANY_ROUTE. dlg_bye usage ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] testing function result in if-statement
I think I looked at it several years ago and the situation is a bit complex given the way the config script interpreter is doing the evaluation -- there are the rules that return 0 means exit, negative values are evaluated to false and positive to true. Because of these, at different layers, the actual return values are lost and only the equivalent of true/false in C are propagated. I would not go myself in doing it, it doesn't bring much without large impact in the code -- the alternative is quite simple: func(); if($rc == y) { } Also, if one wants to use the other scripting laguages like Lua, Python, JavaScript starting with v5.0 (through so called kemi framework), this is practically there already. The exported functions to kemi are not in pair with what's in kamailio.cfg native interpreter, but I hope to have it in pair for next v5.1. Also, the JS module app_jsdt doesn't have any external dependency, we embed its interpreter and that is practically only the ECMA script language, so the basics of the scripting languages (defining functions, executing them and the support for variables and expressions/statements, plus core language operations on numbers, lists/arrays and string values). Cheers, Daniel On 08.04.17 12:01, Juha Heinanen wrote: > I noticed that function result cannot be directly tested in > if-statement: > > if (func_x() == y) ... > > Why is that? Should I open a feature request or is it a no-go? > > -- Juha > -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] ctl : add rpc buffer_size param (#1064)
Merged #1064. -- 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/1064#event-1036259000___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] ctl : add rpc buffer_size param (#1064)
Thanks! -- 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/1064#issuecomment-292919383___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tm: don't reset uac reply if in a continue route (#1063)
@grumvalski thanks for tracking this issue. You can push the patch for line 1282, I will do a review when I get the first chance. -- 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/1063#issuecomment-292703043___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] set_ruri_host crash
On 07.04.17 17:27, Juha Heinanen wrote: > Daniel-Constantin Mierla writes: >> It was the parser setting the value of host part to "", not the >> transformation, so the change had to be done in other file. Can you try >> again with latest master? > thanks for the fix. now the crash is gone. statements: > > $var(test_uri) = "tel:+358447058060"; > xlog("L_INFO", "** extracting host from <$var(test_uri)>\n"); > $var(host) = $(var(test_uri){uri.host}); > xlog("L_INFO", "** host is <$var(host)>\n"); > $rd = $var(host); > xlog("L_INFO", "** request uri is <$ru>\n"); > > produce to syslog: > > Apr 7 18:25:24 lohi /usr/bin/sip-proxy[25002]: INFO: ** extracting host > from <tel:+358447058060> > Apr 7 18:25:24 lohi /usr/bin/sip-proxy[25002]: INFO: ** host is <> > Apr 7 18:25:24 lohi /usr/bin/sip-proxy[25002]: ERROR: pv [pv_core.c:250]: > pv_get_ruri(): failed to parse the R-URI > Apr 7 18:25:24 lohi /usr/bin/sip-proxy[25002]: INFO: ** request uri is > <> > > this crash has existed at least from version 4.0 onwards. > Indeed, patches will be backported -- I see you did it for 5.0, thanks! Daniel -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] registrar method_filtering
On 07.04.17 17:38, Juha Heinanen wrote: > Daniel-Constantin Mierla writes: > >> A quicker solution will be to disable method matching based on presence >> of To-tag, because this is anyhow part of an established dialog and this >> can be end-to-end without involving the proxy/registrar. > Sounds good to me, although in case of gruu, registrar (lookup) is > involved also when forwarding in-dialog requests. > > Is it OK if I try to add the To-tag check? > Yes, I am fine with such solution. Cheers, Daniel -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] set_ruri_host crash
It was the parser setting the value of host part to "", not the transformation, so the change had to be done in other file. Can you try again with latest master? Cheers, Daniel On 07.04.17 16:05, Juha Heinanen wrote: > Daniel-Constantin Mierla writes: > >> Thanks, I just pushed a patch, can you try it? > Unfortunately still the same crash with this placed as the first thing > in main routing block: > > $var(test_uri) = "tel:+358447058060"; > xlog("L_INFO", "** extracting domain from <$var(test_uri)>\n"); > $rd = $(var(test_uri){uri.host}); > xlog("L_INFO", "** request uri is <$ru>\n"); > > -- Juha -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:cdd7bc29: pv: renamed empty buf variable
Module: kamailio Branch: master Commit: cdd7bc29a900d787b8d99f7296306f99c53a5e29 URL: https://github.com/kamailio/kamailio/commit/cdd7bc29a900d787b8d99f7296306f99c53a5e29 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-07T17:05:27+02:00 pv: renamed empty buf variable --- Modified: src/modules/pv/pv_trans.c --- Diff: https://github.com/kamailio/kamailio/commit/cdd7bc29a900d787b8d99f7296306f99c53a5e29.diff Patch: https://github.com/kamailio/kamailio/commit/cdd7bc29a900d787b8d99f7296306f99c53a5e29.patch --- diff --git a/src/modules/pv/pv_trans.c b/src/modules/pv/pv_trans.c index 25723bd..ef88423 100644 --- a/src/modules/pv/pv_trans.c +++ b/src/modules/pv/pv_trans.c @@ -50,8 +50,8 @@ #include "pv_trans.h" -static char _empty_str[2] = {0}; -static str _tr_empty = { _empty_str, 0 }; +static char _tr_empty_buf[2] = {0}; +static str _tr_empty = { _tr_empty_buf, 0 }; static str _tr_uri = {0, 0}; static struct sip_uri _tr_parsed_uri; static param_t* _tr_uri_params = NULL; ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] set_ruri_host crash
Thanks, I just pushed a patch, can you try it? Cheers, Daniel On 07.04.17 15:32, Juha Heinanen wrote: > Daniel-Constantin Mierla writes: > >> What OS do you have and which version of gdb? The list command should >> list the code around the line where the crash happens, but it doesn't do >> it for you. > this is debian jessie with GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1. > >> Anyhow, you can extract the code around src/modules/pv/pv_core.c:2243 >> and send it here, to be sure it is the one you use at the time of >> crash. > i built new deb from latest master and re-run the crash. gdb tells: > > 2238 pv_core.c: No such file or directory. > (gdb) wher > #0 0x7f35327933e0 in pv_set_ruri_host (msg=0x7f353f529dc0, > param=0x7f353ebc8400, op=254, val=0x7fff67072c60) at pv_core.c:2238 > #1 0x005964dc in lval_pvar_assign (h=0x7fff67073410, > msg=0x7f353f529dc0, lv=0x7f353ebc8380, rv=0x7f353ebc8a58) > at core/lvalue.c:351 > #2 0x00596eed in lval_assign (h=0x7fff67073410, msg=0x7f353f529dc0, > lv=0x7f353ebc8380, rve=0x7f353ebc8a50) at core/lvalue.c:399 > ... > > (gdb) frame 0 > #0 0x7f35327933e0 in pv_set_ruri_host (msg=0x7f353f529dc0, > param=0x7f353ebc8400, op=254, val=0x7fff67072c60) at pv_core.c:2238 > 2238 in pv_core.c > (gdb) list > 2233 in pv_core.c > (gdb) > > and pv_core.c:2238 is marked below. > > -- juha > > - > > int pv_set_ruri_host(struct sip_msg* msg, pv_param_t *param, > int op, pv_value_t *val) > { > struct action act; > struct run_act_ctx h; > char backup; > > if(msg==NULL || param==NULL || val==NULL || (val->flags_VAL_NULL)) > { > LM_ERR("bad parameters\n"); > return -1; > } > > if(!(val->flags_VAL_STR)) > { > LM_ERR("str value required to set R-URI hostname\n"); > goto error; > } > > memset(, 0, sizeof(act)); > act.val[0].type = STRING_ST; > act.val[0].u.string = val->rs.s; > backup = val->rs.s[val->rs.len]; > val->rs.s[val->rs.len] = '\0'; ** this > act.type = SET_HOST_T; > init_run_actions_ctx(); > if (do_action(, , msg)<0) > { > LM_ERR("do action failed\n"); > val->rs.s[val->rs.len] = backup; > goto error; > } > val->rs.s[val->rs.len] = backup; > > return 0; > error: > return -1; > } -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] registrar method_filtering
On 07.04.17 10:50, Juha Heinanen wrote: > if registrar method_filtering param is set, lookup produces -2 and $du > is not set if method is not listed in allow header of register request. > > this is fine with initial requests, but in case of an invite dialog, > initial invite may list another set of methods that the ua supports in > in-dialog requests. > > if request uri of in-dialog request is gruu, lookup on it would thus > fail and $du is not set if method of the request was not in allow header > of register request, but was in allow header of initial invite. > > in order to solve the problem, my suggestion is that lookup would set > $du also when it returns -2. comments? > I think it would better to have an option (eventually via a new flags parameter) to control this and lookup() return true, because returning false but setting some of the destination attributes is somehow misleading. A quicker solution will be to disable method matching based on presence of To-tag, because this is anyhow part of an established dialog and this can be end-to-end without involving the proxy/registrar. Cheers, Daniel -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] set_ruri_host crash
Is it latest master? The line is matching an LM_ERR() with only static string. You should list the code, in gdb: frame 0 list Cheers, Daniel On 07.04.17 14:20, Juha Heinanen wrote: > k 5.1 crashes when executing this: > > $var(test_uri) = "tel:+358447058060"; > xlog("L_INFO", "** extracting domain from <$var(test_uri)>\n"); > $rd = $(var(test_uri){uri.host}); > xlog("L_INFO", "** request uri is <$ru>\n"); > > Apr 7 15:15:17 lohi /usr/bin/sip-proxy[14477]: INFO: ** extracting > domain from <tel:+358447058060> > Apr 7 15:15:17 lohi kernel: [63113.914477] sip-proxy[14477]: segfault at > 7c0410 ip 7f9d268703e0 sp 7ffe1d5bcd20 error 7 in > pv.so[7f9d2680a000+9e000] > Apr 7 15:15:17 lohi /usr/bin/sip-proxy[14503]: CRITICAL: > [core/pass_fd.c:277]: receive_fd(): EOF on 38 > > bt is below. > > -- juha > > - > > (gdb) bt > #0 0x7f9d268703e0 in pv_set_ruri_host (msg=0x7f9d33607090, > param=0x7f9d32ca42c0, op=254, val=0x7ffe1d5bcfc0) at pv_core.c:2243 > #1 0x005964dc in lval_pvar_assign (h=0x7ffe1d5bd770, > msg=0x7f9d33607090, lv=0x7f9d32ca4240, rv=0x7f9d32ca4918) > at core/lvalue.c:351 > #2 0x00596eed in lval_assign (h=0x7ffe1d5bd770, msg=0x7f9d33607090, > lv=0x7f9d32ca4240, rve=0x7f9d32ca4910) at core/lvalue.c:399 > #3 0x004807c4 in do_action (h=0x7ffe1d5bd770, a=0x7f9d32ca44e0, > msg=0x7f9d33607090) at core/action.c:1430 > #4 0x0048224e in run_actions (h=0x7ffe1d5bd770, a=0x7f9d32ca3170, > msg=0x7f9d33607090) at core/action.c:1552 > #5 0x00482a11 in run_top_route (a=0x7f9d32ca3170, > msg=0x7f9d33607090, > c=0x0) at core/action.c:1641 > #6 0x0059a3e0 in receive_msg ( > buf=0x1242930 "SUBSCRIBE sip:127.0.0.1:5080;transport=tcp SIP/2.0\r\nVia: > SIP/2.0/TCP > 192.168.43.192:35987;branch=z9hG4bK60fe34942bb48c45;rport\r\nContact: > <sip:t...@test.tutpro.com;gr=urn:uuid:47759291-c9db-4eb3-a540-5"..., len=945, > rcv_info=0x7f9d28a2b5d8) at core/receive.c:263 > #7 0x00624f83 in receive_tcp_msg ( > tcpbuf=0x7f9d28a2b8b0 "SUBSCRIBE sip:127.0.0.1:5080;transport=tcp > SIP/2.0\r\nVia: SIP/2.0/TCP > 192.168.43.192:35987;branch=z9hG4bK60fe34942bb48c45;rport\r\nContact: > <sip:t...@test.tutpro.com;gr=urn:uuid:47759291-c9db-4eb3-a540-5"..., > len=945, rcv_info=0x7f9d28a2b5d8, con=0x7f9d28a2b5c0) > at core/tcp_read.c:1277 > #8 0x00626fa3 in tcp_read_req (con=0x7f9d28a2b5c0, > bytes_read=0x7ffe1d5bdc68, read_flags=0x7ffe1d5bdc6c) > at core/tcp_read.c:1445 > #9 0x00629c26 in handle_io (fm=0x7f9d3366cb38, events=1, idx=-1) > at core/tcp_read.c:1619 > #10 0x0061bcce in io_wait_loop_epoll (h=0xa9a900 , t=2, > repeat=0) > at core/io_wait.h:1065 > #11 0x0062baad in tcp_receive_loop (unix_sock=41) > at core/tcp_read.c:1789 > #12 0x00502498 in tcp_init_children () at core/tcp_main.c:4816 > #13 0x00424b9f in main_loop () at main.c:1708 > #14 0x0042b2e9 in main (argc=17, argv=0x7ffe1d5be308) at main.c:2639 > (gdb) > > ___ > sr-dev mailing list > sr-dev@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] Planning next IRC devel meeting - Apr 20, 2017
Hello, probably it is the time to have another IRC devel meeting to discuss the plans for the project and the roadmap to next major release, v5.1. First proposed date would be Apr 20, with secondary options for Apr 24 or 25, but other dates can be taken in consideration if more convenient for a consistent group of developers. I created the wiki page for it at: * https://www.kamailio.org/wiki/devel/irc-meetings/2017a Feel free to add there the subjects you want to discuss, I also have several other topics to add. It would be good to list yourself if you are going to participate (or want to participate) in a specific day in order to see who are we relying on being present. Cheers, Daniel -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:e444f6f8: tmx: new vars - $T(id_index_n) and $T(id_label_n)
Module: kamailio Branch: master Commit: e444f6f821dcbd56e58442f9ee1b970feb52395f URL: https://github.com/kamailio/kamailio/commit/e444f6f821dcbd56e58442f9ee1b970feb52395f Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-06T22:20:00+02:00 tmx: new vars - $T(id_index_n) and $T(id_label_n) - similar to $T(id_index) and $T(id_label), but if transaction doesn't exit yet, it is created --- Modified: src/modules/tmx/t_var.c --- Diff: https://github.com/kamailio/kamailio/commit/e444f6f821dcbd56e58442f9ee1b970feb52395f.diff Patch: https://github.com/kamailio/kamailio/commit/e444f6f821dcbd56e58442f9ee1b970feb52395f.patch --- diff --git a/src/modules/tmx/t_var.c b/src/modules/tmx/t_var.c index edd377d..47e300a 100644 --- a/src/modules/tmx/t_var.c +++ b/src/modules/tmx/t_var.c @@ -668,6 +668,10 @@ int pv_parse_t_name(pv_spec_p sp, str *in) sp->pvp.pvn.u.isname.name.n = 2; else if(strncmp(in->s, "reply_type", 10)==0) sp->pvp.pvn.u.isname.name.n = 3; + else if(strncmp(in->s, "id_label_n", 10)==0) + sp->pvp.pvn.u.isname.name.n = 8; + else if(strncmp(in->s, "id_index_n", 10)==0) + sp->pvp.pvn.u.isname.name.n = 9; else goto error; break; case 12: @@ -709,7 +713,19 @@ int pv_get_t(struct sip_msg *msg, pv_param_t *param, t = _tmx_tmb.t_gett(); if(t==NULL || t==T_UNDEFINED) { /* no T */ - return pv_get_null(msg, param, res); + if(param->pvn.u.isname.name.n==8 || param->pvn.u.isname.name.n==9) { + /* id_label_n or id_index_n - attempt to create transaction */ + if(_tmx_tmb.t_newtran(msg)<0) { + LM_ERR("cannot create the transaction\n"); + return pv_get_null(msg, param, res); + } + t = _tmx_tmb.t_gett(); + if (t==NULL || t==T_UNDEFINED) { + return pv_get_null(msg, param, res); + } + } else { + return pv_get_null(msg, param, res); + } } switch(param->pvn.u.isname.name.n) { @@ -723,6 +739,10 @@ int pv_get_t(struct sip_msg *msg, pv_param_t *param, return pv_get_uintval(msg, param, res, 1); } return pv_get_uintval(msg, param, res, 0); + case 8: + return pv_get_uintval(msg, param, res, t->label); + case 9: + return pv_get_uintval(msg, param, res, t->hash_index); default: return pv_get_uintval(msg, param, res, t->label); } ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:196537b0: dialog: exported dlg_manage() to kemi
Module: kamailio Branch: master Commit: 196537b0a226ed8da690d40a0f9526b6fb2a443e URL: https://github.com/kamailio/kamailio/commit/196537b0a226ed8da690d40a0f9526b6fb2a443e Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-06T21:57:17+02:00 dialog: exported dlg_manage() to kemi --- Modified: src/modules/dialog/dialog.c --- Diff: https://github.com/kamailio/kamailio/commit/196537b0a226ed8da690d40a0f9526b6fb2a443e.diff Patch: https://github.com/kamailio/kamailio/commit/196537b0a226ed8da690d40a0f9526b6fb2a443e.patch --- diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c index e784db1..2dc30d8 100644 --- a/src/modules/dialog/dialog.c +++ b/src/modules/dialog/dialog.c @@ -56,6 +56,7 @@ #include "../../core/pvar.h" #include "../../core/mod_fix.h" #include "../../core/script_cb.h" +#include "../../core/kemi.h" #include "../../core/fmsg.h" #include "../../core/hashes.h" #include "../../core/counters.h" @@ -1428,6 +1429,30 @@ static int fixup_dlg_remote_profile(void** param, int param_no) return 0; } +/** + * + */ +/* clang-format off */ +static sr_kemi_t sr_kemi_dialog_exports[] = { + { str_init("dialog"), str_init("dlg_manage"), + SR_KEMIP_INT, dlg_manage, + { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + + { {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } } +}; +/* clang-format on */ + +/** + * + */ +int mod_register(char *path, int *dlflags, void *p1, void *p2) +{ + sr_kemi_modules_add(sr_kemi_dialog_exports); + return 0; +} + / RPC functions **/ /*! * \brief Helper method that outputs a dialog via the RPC interface ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:e4a11d71: dialog: check if dialog exists after event route execution
Module: kamailio Branch: master Commit: e4a11d715e3d4e47aa82b7e8e358000948e26c4c URL: https://github.com/kamailio/kamailio/commit/e4a11d715e3d4e47aa82b7e8e358000948e26c4c Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-06T17:06:37+02:00 dialog: check if dialog exists after event route execution - done for dlg_onroute(), as an extra safety for early detection of races, related to GH #1059 --- Modified: src/modules/dialog/dlg_handlers.c --- Diff: https://github.com/kamailio/kamailio/commit/e4a11d715e3d4e47aa82b7e8e358000948e26c4c.diff Patch: https://github.com/kamailio/kamailio/commit/e4a11d715e3d4e47aa82b7e8e358000948e26c4c.patch --- diff --git a/src/modules/dialog/dlg_handlers.c b/src/modules/dialog/dlg_handlers.c index 539d248..2eb36f5 100644 --- a/src/modules/dialog/dlg_handlers.c +++ b/src/modules/dialog/dlg_handlers.c @@ -1226,12 +1226,14 @@ dlg_cell_t *dlg_get_msg_dialog(sip_msg_t *msg) */ void dlg_onroute(struct sip_msg* req, str *route_params, void *param) { - dlg_cell_t *dlg; - dlg_iuid_t *iuid; + dlg_cell_t *dlg = NULL; + dlg_cell_t *dlg0 = NULL; + dlg_iuid_t *iuid = NULL; str val, callid, ftag, ttag; - int h_entry, h_id, new_state, old_state, unref, event, timeout, reset; - unsigned int dir; - int ret = 0; + int h_entry=0, h_id=0, new_state=0, old_state=0; + int unref=0, event=0, timeout=0, reset=0; + unsigned int dir=0; + int ret=0; dlg = dlg_get_ctx_dialog(); if (dlg!=NULL) { @@ -1321,8 +1323,10 @@ void dlg_onroute(struct sip_msg* req, str *route_params, void *param) /* set current dialog - re-use ref increment from dlg_get() above */ set_current_dialog( req, dlg); -_dlg_ctx.iuid.h_entry = dlg->h_entry; -_dlg_ctx.iuid.h_id = dlg->h_id; +h_entry = dlg->h_entry; +h_id = dlg->h_id; +_dlg_ctx.iuid.h_entry = h_entry; +_dlg_ctx.iuid.h_id = h_id; if(dlg->iflags & DLG_IFLAG_CSEQ_DIFF) { if(dlg_cseq_refresh(req, dlg, dir)<0) { @@ -1364,6 +1368,15 @@ void dlg_onroute(struct sip_msg* req, str *route_params, void *param) dlg_run_event_route(dlg, req, old_state, new_state); + dlg0 = dlg_lookup(h_entry, h_id); + if (dlg0==0) { + LM_ALERT("after event route - dialog not found [%u:%u] (%d/%d) (%p)\n", + h_entry, h_id, old_state, new_state, dlg); + return; + } else { + dlg_release(dlg0); + } + /* delay deletion of dialog until transaction has died off in order * to absorb in-air messages */ if (new_state==DLG_STATE_DELETED && old_state!=DLG_STATE_DELETED) { ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:4.4:459efbd4: kamailio.cfg: handle retransmissions also for request within dialog
Module: kamailio Branch: 4.4 Commit: 459efbd4f32e69001afadd85087cb87b0410b955 URL: https://github.com/kamailio/kamailio/commit/459efbd4f32e69001afadd85087cb87b0410b955 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-06T15:19:59+02:00 kamailio.cfg: handle retransmissions also for request within dialog - skip ACK, it is not a standard transaction by itself (cherry picked from commit 868f9996f39dd76707ed09fce980893bab7c31bc) (cherry picked from commit a5e3a8822bf491516ac3d7ff0fc8ed18f5e26124) --- Modified: etc/kamailio.cfg --- Diff: https://github.com/kamailio/kamailio/commit/459efbd4f32e69001afadd85087cb87b0410b955.diff Patch: https://github.com/kamailio/kamailio/commit/459efbd4f32e69001afadd85087cb87b0410b955.patch --- diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg index 86ac524..f3c51de 100644 --- a/etc/kamailio.cfg +++ b/etc/kamailio.cfg @@ -471,18 +471,20 @@ request_route { exit; } + # handle retransmissions + if (!is_method("ACK")) { + if(t_precheck_trans()) { + t_check_trans(); + exit; + } + t_check_trans(); + } + # handle requests within SIP dialogs route(WITHINDLG); ### only initial requests (no To tag) - # handle retransmissions - if(t_precheck_trans()) { - t_check_trans(); - exit; - } - t_check_trans(); - # authentication route(AUTH); ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:a5e3a882: kamailio.cfg: handle retransmissions also for request within dialog
Module: kamailio Branch: 5.0 Commit: a5e3a8822bf491516ac3d7ff0fc8ed18f5e26124 URL: https://github.com/kamailio/kamailio/commit/a5e3a8822bf491516ac3d7ff0fc8ed18f5e26124 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-06T15:18:34+02:00 kamailio.cfg: handle retransmissions also for request within dialog - skip ACK, it is not a standard transaction by itself (cherry picked from commit 868f9996f39dd76707ed09fce980893bab7c31bc) --- Modified: etc/kamailio.cfg --- Diff: https://github.com/kamailio/kamailio/commit/a5e3a8822bf491516ac3d7ff0fc8ed18f5e26124.diff Patch: https://github.com/kamailio/kamailio/commit/a5e3a8822bf491516ac3d7ff0fc8ed18f5e26124.patch --- diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg index cf8df43..b176b54 100644 --- a/etc/kamailio.cfg +++ b/etc/kamailio.cfg @@ -470,18 +470,20 @@ request_route { exit; } + # handle retransmissions + if (!is_method("ACK")) { + if(t_precheck_trans()) { + t_check_trans(); + exit; + } + t_check_trans(); + } + # handle requests within SIP dialogs route(WITHINDLG); ### only initial requests (no To tag) - # handle retransmissions - if(t_precheck_trans()) { - t_check_trans(); - exit; - } - t_check_trans(); - # authentication route(AUTH); ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:868f9996: kamailio.cfg: handle retransmissions also for request within dialog
Module: kamailio Branch: master Commit: 868f9996f39dd76707ed09fce980893bab7c31bc URL: https://github.com/kamailio/kamailio/commit/868f9996f39dd76707ed09fce980893bab7c31bc Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-06T15:16:05+02:00 kamailio.cfg: handle retransmissions also for request within dialog - skip ACK, it is not a standard transaction by itself --- Modified: etc/kamailio.cfg --- Diff: https://github.com/kamailio/kamailio/commit/868f9996f39dd76707ed09fce980893bab7c31bc.diff Patch: https://github.com/kamailio/kamailio/commit/868f9996f39dd76707ed09fce980893bab7c31bc.patch --- diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg index cf8df43..b176b54 100644 --- a/etc/kamailio.cfg +++ b/etc/kamailio.cfg @@ -470,18 +470,20 @@ request_route { exit; } + # handle retransmissions + if (!is_method("ACK")) { + if(t_precheck_trans()) { + t_check_trans(); + exit; + } + t_check_trans(); + } + # handle requests within SIP dialogs route(WITHINDLG); ### only initial requests (no To tag) - # handle retransmissions - if(t_precheck_trans()) { - t_check_trans(); - exit; - } - t_check_trans(); - # authentication route(AUTH); ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:09fe281b: kamailio.cfg: version updated to 5.1 in top comments
Module: kamailio Branch: master Commit: 09fe281bd5bea0d484a41e13b18fd3d206d2ebd9 URL: https://github.com/kamailio/kamailio/commit/09fe281bd5bea0d484a41e13b18fd3d206d2ebd9 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-06T15:17:47+02:00 kamailio.cfg: version updated to 5.1 in top comments --- Modified: etc/kamailio.cfg --- Diff: https://github.com/kamailio/kamailio/commit/09fe281bd5bea0d484a41e13b18fd3d206d2ebd9.diff Patch: https://github.com/kamailio/kamailio/commit/09fe281bd5bea0d484a41e13b18fd3d206d2ebd9.patch --- diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg index b176b54..99b6cc9 100644 --- a/etc/kamailio.cfg +++ b/etc/kamailio.cfg @@ -1,6 +1,6 @@ #!KAMAILIO # -# Kamailio (OpenSER) SIP Server v5.0 - default configuration script +# Kamailio (OpenSER) SIP Server v5.1 - default configuration script # - web: http://www.kamailio.org # - git: http://sip-router.org # ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] crash on run_rr_callbacks() from dlg_onroute() (#1059)
Is it possible that there is a time consuming operations for BYE (eg, a slow database operation -- accounting or something else) that can take more than 5 seconds? -- 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/1059#issuecomment-292164736___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] crash on run_rr_callbacks() from dlg_onroute() (#1059)
I wonder if there is a copy/paste issue or the `dlg` is printed twice by `info locals`: ``` event = 10498440 dlg = 0x7fad74f20258 ttag = { s = 0x9aabed"0FC4E4CA-58E4A7D4000A8034-123E3700\r\nCall-ID: 3A477FD70434C083@10.10.10.18\r\nCSeq: 5709 BYE\r\nProxy-Authorization: Digest username=\"11\", realm=\"sip.local\", nonce=\"WOUBrFjkp9Qj4YjEwa9jvelH"..., len = 34} h_id = 854147520 dlg = 0x7fad ``` After event and at the end. First looks like a valid value, second a bit more strange. Can you get in the same frame: ``` p dlg p *dlg ``` -- 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/1059#issuecomment-292152509___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] crash on run_rr_callbacks() from dlg_onroute() (#1059)
Did you put in pastebin the wrong file (like dlg_db_handlers.c)? All the tokens provided by kamailio in that log message are by length and pointer (%.*s), so there should be no strlen done on the pointers we set, so not sure on what syslog can do the strlen and crash. -- 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/1059#issuecomment-292151467___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] crash on run_rr_callbacks() from dlg_onroute() (#1059)
Can you do: * frame 4 * list * info locals The code in branch 4.4 for dlg_handlers.c:1350 is: ``` LM_WARN("inconsitent dlg timer data on dlg %p [%u:%u] " "with clid '%.*s' and tags '%.*s' '%.*s'\n", dlg, dlg->h_entry, dlg->h_id, dlg->callid.len, dlg->callid.s, dlg->tag[DLG_CALLER_LEG].len, dlg->tag[DLG_CALLER_LEG].s, dlg->tag[DLG_CALLEE_LEG].len, dlg->tag[DLG_CALLEE_LEG].s); ``` So no strlen() to be used there. -- 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/1059#issuecomment-292134653___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] crash on run_rr_callbacks() from dlg_onroute() (#1059)
Any idea why frames 1 and 2 don't have the symbols? Was there a single core file, presuming the options for core files per pid was set? -- 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/1059#issuecomment-291927497___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Problem with topos together with track_cseq_updates (#1038)
Just re-pinging in case you missed my previous comment. It will help troubleshooting as the issue seems the missing Via headers which should be added by topos callbacks when receiving the sip response. -- 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/1038#issuecomment-291882825___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] ERROR: cnxcc terminate_call(): Error executing dlg_end_dlg command. Return code was [404] (#1051)
Is this happening often? Does it happen to have the sip traffic (pcap) for such case? -- 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/1051#issuecomment-291882384___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] Kamailio v5.0.1 Released
Hello, Kamailio SIP Server v5.0.1 stable release is out! This is a maintenance release of the latest stable branch, 5.0, that includes fixes since the release of v5.0.0. There is no change to database schema or configuration language structure that you have to do on previous installations of v5.0.x. Deployments running previous 5.x.x versions are strongly recommended to be upgraded to v5.0.1. For more details about version 5.0.1 (including links and guidelines to download the tarball or from GIT repository), visit: * https://www.kamailio.org/w/2017/04/kamailio-v5-0-1-released/ RPM, Debian/Ubuntu packages will be available soon as well. Many thanks to all contributing and using Kamailio! Cheers, Daniel -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:cf3b1aea: pkg/rpm: specify the pid file for killproc
Module: kamailio Branch: master Commit: cf3b1aeacfc9d5bd086929a6fae20f379ebb2612 URL: https://github.com/kamailio/kamailio/commit/cf3b1aeacfc9d5bd086929a6fae20f379ebb2612 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-05T16:02:54+02:00 pkg/rpm: specify the pid file for killproc --- Modified: pkg/kamailio/centos/7/kamailio.init --- Diff: https://github.com/kamailio/kamailio/commit/cf3b1aeacfc9d5bd086929a6fae20f379ebb2612.diff Patch: https://github.com/kamailio/kamailio/commit/cf3b1aeacfc9d5bd086929a6fae20f379ebb2612.patch --- diff --git a/pkg/kamailio/centos/7/kamailio.init b/pkg/kamailio/centos/7/kamailio.init index 2cdae7a..d19f376 100644 --- a/pkg/kamailio/centos/7/kamailio.init +++ b/pkg/kamailio/centos/7/kamailio.init @@ -6,7 +6,7 @@ # description: Kamailio (OpenSER) - the Open Source SIP Server # # processname: kamailio -# pidfile: /var/run/kamailio.pid +# pidfile: /var/run/kamailio/kamailio.pid # config: /etc/kamailio/kamailio.cfg # ### BEGIN INIT INFO @@ -69,7 +69,7 @@ start() { stop() { echo -n $"Stopping $PROG: " - killproc $KAM + killproc -p $PID_FILE $KAM RETVAL=$? echo [ $RETVAL = 0 ] && rm -f $LOCK_FILE $PID_FILE ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:cbff0e8a: ChangeLog: content updated for v5.0.1
Module: kamailio Branch: 5.0 Commit: cbff0e8ab509eeb434b140b363ccacda354358cf URL: https://github.com/kamailio/kamailio/commit/cbff0e8ab509eeb434b140b363ccacda354358cf Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-05T15:30:18+02:00 ChangeLog: content updated for v5.0.1 --- Modified: ChangeLog --- Diff: https://github.com/kamailio/kamailio/commit/cbff0e8ab509eeb434b140b363ccacda354358cf.diff Patch: https://github.com/kamailio/kamailio/commit/cbff0e8ab509eeb434b140b363ccacda354358cf.patch ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:d8db52b7: Makefile.defs: version set to 5.0.1
Module: kamailio Branch: 5.0 Commit: d8db52b76bd05b74e6cb4724883854183868eb5d URL: https://github.com/kamailio/kamailio/commit/d8db52b76bd05b74e6cb4724883854183868eb5d Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-05T15:23:42+02:00 Makefile.defs: version set to 5.0.1 --- Modified: src/Makefile.defs --- Diff: https://github.com/kamailio/kamailio/commit/d8db52b76bd05b74e6cb4724883854183868eb5d.diff Patch: https://github.com/kamailio/kamailio/commit/d8db52b76bd05b74e6cb4724883854183868eb5d.patch --- diff --git a/src/Makefile.defs b/src/Makefile.defs index 8b4bccd..ae93d93 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -106,7 +106,7 @@ INSTALL_FLAVOUR=$(FLAVOUR) # version number VERSION = 5 PATCHLEVEL = 0 -SUBLEVEL = 0 +SUBLEVEL = 1 EXTRAVERSION = # memory manager switcher ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Segmentation fault using http_async_client on kamailio 5.0.0 (#1056)
@davyvdm ok, wanted to clarify -- maybe Federico ( @grumvalski ) can assert if the function is expected to run for sip replies or not, and investigate if does the expected behaviour in this case. -- 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/1056#issuecomment-291856051___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Segmentation fault using http_async_client on kamailio 5.0.0 (#1056)
@davyvdm - your config snippet is from a reply_route (executed when handling a SIP response)? -- 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/1056#issuecomment-291848425___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:7b691e97: dispatcher: ds select and next functions exported to kemi
Module: kamailio Branch: master Commit: 7b691e9712fc4b4333698c4538c8209c32eba901 URL: https://github.com/kamailio/kamailio/commit/7b691e9712fc4b4333698c4538c8209c32eba901 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-05T13:37:24+02:00 dispatcher: ds select and next functions exported to kemi --- Modified: src/modules/dispatcher/dispatcher.c --- Diff: https://github.com/kamailio/kamailio/commit/7b691e9712fc4b4333698c4538c8209c32eba901.diff Patch: https://github.com/kamailio/kamailio/commit/7b691e9712fc4b4333698c4538c8209c32eba901.patch --- diff --git a/src/modules/dispatcher/dispatcher.c b/src/modules/dispatcher/dispatcher.c index d0399e0..545d49b 100644 --- a/src/modules/dispatcher/dispatcher.c +++ b/src/modules/dispatcher/dispatcher.c @@ -51,6 +51,7 @@ #include "../../core/mod_fix.h" #include "../../core/rpc.h" #include "../../core/rpc_lookup.h" +#include "../../core/kemi.h" #include "ds_ht.h" #include "dispatch.h" @@ -1004,6 +1005,137 @@ void ds_ping_reply_codes_update(str *gname, str *name) ds_parse_reply_codes(); } +/* KEMI wrappers */ +/** + * + */ +static int ki_ds_select(sip_msg_t *msg, int set, int alg) +{ + return ds_select_dst_limit(msg, set, alg, 0x /* limit number of dst*/, + 2 /*set no dst/uri*/); +} + +/** + * + */ +static int ki_ds_select_limit(sip_msg_t *msg, int set, int alg, int limit) +{ + return ds_select_dst_limit(msg, set, alg, limit /* limit number of dst*/, + 2 /*set no dst/uri*/); +} + +/** + * + */ +static int ki_ds_select_dst(sip_msg_t *msg, int set, int alg) +{ + return ds_select_dst_limit(msg, set, alg, 0x /* limit number of dst*/, + 0 /*set dst uri*/); +} + +/** + * + */ +static int ki_ds_select_dst_limit(sip_msg_t *msg, int set, int alg, int limit) +{ + return ds_select_dst_limit(msg, set, alg, limit /* limit number of dst*/, + 0 /*set dst uri*/); +} + +/** + * + */ +static int ki_ds_select_domain(sip_msg_t *msg, int set, int alg) +{ + return ds_select_dst_limit(msg, set, alg, 0x /* limit number of dst*/, + 1 /*set host port*/); +} + +/** + * + */ +static int ki_ds_select_domain_limit(sip_msg_t *msg, int set, int alg, int limit) +{ + return ds_select_dst_limit(msg, set, alg, limit /* limit number of dst*/, + 1 /*set host port*/); +} + +/** + * + */ +static int ki_ds_next_dst(sip_msg_t *msg) +{ + return ds_next_dst(msg, 0 /*set dst uri*/); +} + +/** + * + */ +static int ki_ds_next_domain(sip_msg_t *msg) +{ + return ds_next_dst(msg, 1 /*set host port*/); +} + + +/** + * + */ +/* clang-format off */ +static sr_kemi_t sr_kemi_dispatcher_exports[] = { + { str_init("dispatcher"), str_init("ds_select"), + SR_KEMIP_INT, ki_ds_select, + { SR_KEMIP_INT, SR_KEMIP_INT, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("dispatcher"), str_init("ds_select_limit"), + SR_KEMIP_INT, ki_ds_select_limit, + { SR_KEMIP_INT, SR_KEMIP_INT, SR_KEMIP_INT, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("dispatcher"), str_init("ds_select_domain"), + SR_KEMIP_INT, ki_ds_select_domain, + { SR_KEMIP_INT, SR_KEMIP_INT, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("dispatcher"), str_init("ds_select_domain_limit"), + SR_KEMIP_INT, ki_ds_select_domain_limit, + { SR_KEMIP_INT, SR_KEMIP_INT, SR_KEMIP_INT, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("dispatcher"), str_init("ds_next_domain"), + SR_KEMIP_INT, ki_ds_next_domain, + { SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("dispatcher"), str_init("ds_select_dst"), + SR_KEMIP_INT, ki_ds_select_dst, + { SR_KEMIP_INT, SR_KEMIP_INT, SR_KEMIP_NONE, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("dispatcher"), str_init("ds_select_dst_limit"), + SR_KEMIP_INT, ki_ds_select_dst_limit, + { SR_KEMIP_INT, SR_KEMIP_INT, SR_KEMIP_INT, + SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } + }, + { str_init("dispatcher"), str_init("ds_next_dst"), + SR_KEMIP_INT, ki_ds_next_dst, + { SR_KEMIP_NONE, SR_K
[sr-dev] git:5.0:b971ff4d: pkg/rpm: version set to 5.0.1 in spec files
Module: kamailio Branch: 5.0 Commit: b971ff4d5efd7debe43c6433056060c2b2f7824b URL: https://github.com/kamailio/kamailio/commit/b971ff4d5efd7debe43c6433056060c2b2f7824b Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-05T13:05:39+02:00 pkg/rpm: version set to 5.0.1 in spec files --- Modified: pkg/kamailio/centos/6/kamailio.spec Modified: pkg/kamailio/centos/7/kamailio.spec Modified: pkg/kamailio/fedora/17/kamailio.spec Modified: pkg/kamailio/oracle/el6/kamailio.spec Modified: pkg/kamailio/oracle/el7/kamailio.spec Modified: pkg/kamailio/rpm/kamailio.spec-4.1 Modified: pkg/kamailio/rpm/kamailio.spec.CenOS Modified: pkg/kamailio/rpm/kamailio.spec.SuSE --- Diff: https://github.com/kamailio/kamailio/commit/b971ff4d5efd7debe43c6433056060c2b2f7824b.diff Patch: https://github.com/kamailio/kamailio/commit/b971ff4d5efd7debe43c6433056060c2b2f7824b.patch --- diff --git a/pkg/kamailio/centos/6/kamailio.spec b/pkg/kamailio/centos/6/kamailio.spec index 439bf22..57839d2 100644 --- a/pkg/kamailio/centos/6/kamailio.spec +++ b/pkg/kamailio/centos/6/kamailio.spec @@ -1,5 +1,5 @@ %define name kamailio -%define ver5.0.0 +%define ver5.0.1 %define reldev0.0%{dist} diff --git a/pkg/kamailio/centos/7/kamailio.spec b/pkg/kamailio/centos/7/kamailio.spec index bb5c414..db3d6b6 100644 --- a/pkg/kamailio/centos/7/kamailio.spec +++ b/pkg/kamailio/centos/7/kamailio.spec @@ -1,5 +1,5 @@ %define namekamailio -%define ver 5.0.0 +%define ver 5.0.1 %define rel dev0.0%{dist} %bcond_with dnssec %bcond_with kazoo diff --git a/pkg/kamailio/fedora/17/kamailio.spec b/pkg/kamailio/fedora/17/kamailio.spec index c33952c..7b6f46f 100644 --- a/pkg/kamailio/fedora/17/kamailio.spec +++ b/pkg/kamailio/fedora/17/kamailio.spec @@ -1,5 +1,5 @@ %define name kamailio -%define ver5.0.0 +%define ver5.0.1 %define reldev7.2%{dist} diff --git a/pkg/kamailio/oracle/el6/kamailio.spec b/pkg/kamailio/oracle/el6/kamailio.spec index e5a48dd..78cbcd1 100644 --- a/pkg/kamailio/oracle/el6/kamailio.spec +++ b/pkg/kamailio/oracle/el6/kamailio.spec @@ -1,5 +1,5 @@ %define namekamailio -%define ver 5.0.0 +%define ver 5.0.1 %define rel 0 %define _sharedir %{_prefix}/share diff --git a/pkg/kamailio/oracle/el7/kamailio.spec b/pkg/kamailio/oracle/el7/kamailio.spec index d027c46..025e039 100644 --- a/pkg/kamailio/oracle/el7/kamailio.spec +++ b/pkg/kamailio/oracle/el7/kamailio.spec @@ -1,5 +1,5 @@ %define namekamailio -%define ver 5.0.0 +%define ver 5.0.1 %define rel 0 %define _sharedir %{_prefix}/share diff --git a/pkg/kamailio/rpm/kamailio.spec-4.1 b/pkg/kamailio/rpm/kamailio.spec-4.1 index 2ef5631..f074108 100644 --- a/pkg/kamailio/rpm/kamailio.spec-4.1 +++ b/pkg/kamailio/rpm/kamailio.spec-4.1 @@ -1,5 +1,5 @@ %define namekamailio -%define ver 5.0.0 +%define ver 5.0.1 %define rel 0 %define EXCLUDED_MODULES mysql jabber cpl-c avp_radius auth_radius group_radius uri_radius pa postgres osp tlsops unixodbc diff --git a/pkg/kamailio/rpm/kamailio.spec.CenOS b/pkg/kamailio/rpm/kamailio.spec.CenOS index e0ba2d2..31176b4 100644 --- a/pkg/kamailio/rpm/kamailio.spec.CenOS +++ b/pkg/kamailio/rpm/kamailio.spec.CenOS @@ -1,5 +1,5 @@ %define namekamailio -%define ver 5.0.0 +%define ver 5.0.1 %define rel 0 %define _sharedir %{_prefix}/share diff --git a/pkg/kamailio/rpm/kamailio.spec.SuSE b/pkg/kamailio/rpm/kamailio.spec.SuSE index 31ec997..5dc393c 100644 --- a/pkg/kamailio/rpm/kamailio.spec.SuSE +++ b/pkg/kamailio/rpm/kamailio.spec.SuSE @@ -1,5 +1,5 @@ %define namekamailio -%define ver 5.0.0 +%define ver 5.0.1 %define rel 0 %define EXCLUDED_MODULES mysql jabber cpl-c auth_radius misc_radius peering postgress pa unixodbc osp tlsops ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] Planning Kamailio v5.0.1
Hello, preparing of v5.0.1 will start very soon, if anyone needs to push commits to the branch 5.0 after 12:00UTC, then write first to sr-dev mailing list on sync on #kamailio IRC channel. Once the announcement of the release is out, the backports can be done again directly. Cheers, Daniel On 04.04.17 12:30, Daniel-Constantin Mierla wrote: > Hello, > > just a reminder about the plan to release v5.0.1 tomorrow. Besides > reporting issues, if there are some patches not backported yet, do reply > about them or, if a developer, cherry-pick them in branch 5.0. > > Cheers, > Daniel > > > On 28.03.17 09:40, Daniel-Constantin Mierla wrote: >> Hello, >> >> I am considering to release Kamailio v5.0.1 sometime next week, likely >> on Wednesday, April 5, 2017. Should anyone be aware of issues not listed >> yet on bug tracker, report them there as soon as possible to try to fix. >> >> Soon after, we should release a new version from branch 4.4 and the last >> one from branch 4.3. >> >> Cheers, >> Daniel >> -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Segmentation fault using http_async_client on kamailio 5.0.0 (#1056)
Also, install kamailio-dbg package (which has the debug symbols) and grab again the backtrace, it will be more useful. -- 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/1056#issuecomment-291780434___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mtree reload RPC error on kamailio 5.0.0 (#1057)
Thanks! Same code was used for rpc and mi, but it was a regression introduced by a0e4a9c18e . It is now fixed in master and backported to 5.0 branch, to be part of v5.0.1 planned to be out later today. -- 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/1057#issuecomment-291780161___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:97481887: mtree: revert a0e4a9c18e and let db_table name not set by default
Module: kamailio Branch: 5.0 Commit: 9748188734df2a49cc40d96d42641c87b5962603 URL: https://github.com/kamailio/kamailio/commit/9748188734df2a49cc40d96d42641c87b5962603 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-05T09:38:54+02:00 mtree: revert a0e4a9c18e and let db_table name not set by default - it breaks some runtime rpc commands, reported by GH #1057 - reset it also if set by mistake when mtree param is used (cherry picked from commit a4cdacd0b63245c48fcc6e0a20c9b665ef877090) --- Modified: src/modules/mtree/mtree_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/9748188734df2a49cc40d96d42641c87b5962603.diff Patch: https://github.com/kamailio/kamailio/commit/9748188734df2a49cc40d96d42641c87b5962603.patch --- diff --git a/src/modules/mtree/mtree_mod.c b/src/modules/mtree/mtree_mod.c index ee03da8..259ef1d 100644 --- a/src/modules/mtree/mtree_mod.c +++ b/src/modules/mtree/mtree_mod.c @@ -74,7 +74,9 @@ CREATE TABLE mtrees ( /** parameters */ static str db_url = str_init(DEFAULT_DB_URL); -static str db_table = str_init("mtrees"); +/* default name created by sql scripts is 'mtrees' + * - don't set it here with default value, only via config param */ +static str db_table = str_init(""); static str tname_column = str_init("tname"); static str tprefix_column = str_init("tprefix"); static str tvalue_column = str_init("tvalue"); @@ -269,6 +271,9 @@ static int mod_init(void) } pt = pt->next; } + /* reset db_table value */ + db_table.s = ""; + db_table.len = 0; } else { if(db_table.len<=0) { ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mtree reload RPC error on kamailio 5.0.0 (#1057)
Closed #1057. -- 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/1057#event-1029849847___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:2df615b6: mtree: clarifications about db table parameter in docs
Module: kamailio Branch: 5.0 Commit: 2df615b6891d822d9e892513b13ff48a3be22faa URL: https://github.com/kamailio/kamailio/commit/2df615b6891d822d9e892513b13ff48a3be22faa Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-05T09:39:03+02:00 mtree: clarifications about db table parameter in docs (cherry picked from commit 1c1e51388aad6c5ba064c283d5e124367b30ad7e) --- Modified: src/modules/mtree/doc/mtree_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/2df615b6891d822d9e892513b13ff48a3be22faa.diff Patch: https://github.com/kamailio/kamailio/commit/2df615b6891d822d9e892513b13ff48a3be22faa.patch --- diff --git a/src/modules/mtree/doc/mtree_admin.xml b/src/modules/mtree/doc/mtree_admin.xml index ec6b2d1..0162e32 100644 --- a/src/modules/mtree/doc/mtree_admin.xml +++ b/src/modules/mtree/doc/mtree_admin.xml @@ -86,19 +86,20 @@ modparam("mtree", "db_url", "") db_table (string) - Name of database table where data for trees is stored. It is ignored if a - 'mtree' parameter is defined. + Name of database table where data for many trees is stored. It is ignored + if a 'mtree' parameter is defined. The SQL scripts creates a table named + 'mtrees' that can be used for this parameter. - Default value is mtrees. + Default value is (no table name). Set db_table parameter ... -modparam("mtree", "db_table", "mymtrees") +modparam("mtree", "db_table", "mtrees") ... ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:1c1e5138: mtree: clarifications about db table parameter in docs
Module: kamailio Branch: master Commit: 1c1e51388aad6c5ba064c283d5e124367b30ad7e URL: https://github.com/kamailio/kamailio/commit/1c1e51388aad6c5ba064c283d5e124367b30ad7e Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-05T09:36:17+02:00 mtree: clarifications about db table parameter in docs --- Modified: src/modules/mtree/doc/mtree_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/1c1e51388aad6c5ba064c283d5e124367b30ad7e.diff Patch: https://github.com/kamailio/kamailio/commit/1c1e51388aad6c5ba064c283d5e124367b30ad7e.patch --- diff --git a/src/modules/mtree/doc/mtree_admin.xml b/src/modules/mtree/doc/mtree_admin.xml index ec6b2d1..0162e32 100644 --- a/src/modules/mtree/doc/mtree_admin.xml +++ b/src/modules/mtree/doc/mtree_admin.xml @@ -86,19 +86,20 @@ modparam("mtree", "db_url", "") db_table (string) - Name of database table where data for trees is stored. It is ignored if a - 'mtree' parameter is defined. + Name of database table where data for many trees is stored. It is ignored + if a 'mtree' parameter is defined. The SQL scripts creates a table named + 'mtrees' that can be used for this parameter. - Default value is mtrees. + Default value is (no table name). Set db_table parameter ... -modparam("mtree", "db_table", "mymtrees") +modparam("mtree", "db_table", "mtrees") ... ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:a4cdacd0: mtree: revert a0e4a9c18e and let db_table name not set by default
Module: kamailio Branch: master Commit: a4cdacd0b63245c48fcc6e0a20c9b665ef877090 URL: https://github.com/kamailio/kamailio/commit/a4cdacd0b63245c48fcc6e0a20c9b665ef877090 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-05T09:34:07+02:00 mtree: revert a0e4a9c18e and let db_table name not set by default - it breaks some runtime rpc commands, reported by GH #1057 - reset it also if set by mistake when mtree param is used --- Modified: src/modules/mtree/mtree_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/a4cdacd0b63245c48fcc6e0a20c9b665ef877090.diff Patch: https://github.com/kamailio/kamailio/commit/a4cdacd0b63245c48fcc6e0a20c9b665ef877090.patch --- diff --git a/src/modules/mtree/mtree_mod.c b/src/modules/mtree/mtree_mod.c index ee03da8..259ef1d 100644 --- a/src/modules/mtree/mtree_mod.c +++ b/src/modules/mtree/mtree_mod.c @@ -74,7 +74,9 @@ CREATE TABLE mtrees ( /** parameters */ static str db_url = str_init(DEFAULT_DB_URL); -static str db_table = str_init("mtrees"); +/* default name created by sql scripts is 'mtrees' + * - don't set it here with default value, only via config param */ +static str db_table = str_init(""); static str tname_column = str_init("tname"); static str tprefix_column = str_init("tprefix"); static str tvalue_column = str_init("tvalue"); @@ -269,6 +271,9 @@ static int mod_init(void) } pt = pt->next; } + /* reset db_table value */ + db_table.s = ""; + db_table.len = 0; } else { if(db_table.len<=0) { ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:fd705268: keepalive: declare variables at the beginning of functions
Module: kamailio Branch: master Commit: fd7052681020b775be253fd936dde8f76a85e198 URL: https://github.com/kamailio/kamailio/commit/fd7052681020b775be253fd936dde8f76a85e198 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-05T08:46:55+02:00 keepalive: declare variables at the beginning of functions - fix for C standard older than C99 --- Modified: src/modules/keepalive/keepalive.h Modified: src/modules/keepalive/keepalive_api.c Modified: src/modules/keepalive/keepalive_mod.c Modified: src/modules/keepalive/keepalive_rpc.c --- Diff: https://github.com/kamailio/kamailio/commit/fd7052681020b775be253fd936dde8f76a85e198.diff Patch: https://github.com/kamailio/kamailio/commit/fd7052681020b775be253fd936dde8f76a85e198.patch ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:338e5df6: keepalive: format to match default conding style and 80 chars lines
Module: kamailio Branch: master Commit: 338e5df6f96ccf1f3df313593d3fc9bb228f5d85 URL: https://github.com/kamailio/kamailio/commit/338e5df6f96ccf1f3df313593d3fc9bb228f5d85 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-05T08:52:01+02:00 keepalive: format to match default conding style and 80 chars lines --- Modified: src/modules/keepalive/api.h Modified: src/modules/keepalive/keepalive.h Modified: src/modules/keepalive/keepalive_api.c Modified: src/modules/keepalive/keepalive_core.c Modified: src/modules/keepalive/keepalive_mod.c Modified: src/modules/keepalive/keepalive_rpc.c --- Diff: https://github.com/kamailio/kamailio/commit/338e5df6f96ccf1f3df313593d3fc9bb228f5d85.diff Patch: https://github.com/kamailio/kamailio/commit/338e5df6f96ccf1f3df313593d3fc9bb228f5d85.patch ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] dmq_usrloc: sync with multi contacts per message (#1054)
@jchavanton: the documentation has to be edited in docbook xml files located in `doc/` subfolder of each module. The readme file must not be edited directly, it is generate on server from those file. -- 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/1054#issuecomment-291636160___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:27062612: evapi: documentation for event_callaback
Module: kamailio Branch: master Commit: 27062612b08ace21c07366aa8ab1ca4931fc4503 URL: https://github.com/kamailio/kamailio/commit/27062612b08ace21c07366aa8ab1ca4931fc4503 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T22:21:16+02:00 evapi: documentation for event_callaback --- Modified: src/modules/evapi/doc/evapi_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/27062612b08ace21c07366aa8ab1ca4931fc4503.diff Patch: https://github.com/kamailio/kamailio/commit/27062612b08ace21c07366aa8ab1ca4931fc4503.patch --- diff --git a/src/modules/evapi/doc/evapi_admin.xml b/src/modules/evapi/doc/evapi_admin.xml index 3cb587e..41bb01b 100644 --- a/src/modules/evapi/doc/evapi_admin.xml +++ b/src/modules/evapi/doc/evapi_admin.xml @@ -122,6 +122,38 @@ modparam("evapi", "netstring_format", 0) + + event_callback (str) + + The name of the function in the kemi configuration file (embedded + scripting language such as Lua, Python, ...) to be executed instead + of event_route[...] blocks. + + + The function receives a string parameter with the name of the event, + the values are: 'evapi:connection-new', 'evapi:connection-closed', + 'evapi:message-received'. + + + + Default value is 'empty' (no function is executed for events). + + + + Set event_callback parameter + +... +modparam("evapi", "event_callback", "ksr_evapi_event") +... +-- event callback function implemented in Lua +function ksr_evapi_event(evname) + KSR.info("= evapi module triggered event: " .. evname .. "\n"); + return 1; +end +... + + + ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:2889db1a: evapi: enable execution of event routes via kemi
Module: kamailio Branch: master Commit: 2889db1a4b294c045021807965b507b38de258a5 URL: https://github.com/kamailio/kamailio/commit/2889db1a4b294c045021807965b507b38de258a5 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T22:18:27+02:00 evapi: enable execution of event routes via kemi - event callback function can be set via event_callback parameter --- Modified: src/modules/evapi/evapi_dispatch.c Modified: src/modules/evapi/evapi_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/2889db1a4b294c045021807965b507b38de258a5.diff Patch: https://github.com/kamailio/kamailio/commit/2889db1a4b294c045021807965b507b38de258a5.patch ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Keepalive module - prototype (#1045)
Thanks! Merged manually in a single push. -- 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/1045#issuecomment-291509671___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Keepalive module - prototype (#1045)
Closed #1045. -- 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/1045#event-1028454741___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:c0696ec3: keepalive: added initial README file
Module: kamailio Branch: master Commit: c0696ec38076b01be258faa3cf4c7e687e19e52e URL: https://github.com/kamailio/kamailio/commit/c0696ec38076b01be258faa3cf4c7e687e19e52e Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T16:01:07+02:00 keepalive: added initial README file --- Added: src/modules/keepalive/README --- Diff: https://github.com/kamailio/kamailio/commit/c0696ec38076b01be258faa3cf4c7e687e19e52e.diff Patch: https://github.com/kamailio/kamailio/commit/c0696ec38076b01be258faa3cf4c7e687e19e52e.patch --- diff --git a/src/modules/keepalive/README b/src/modules/keepalive/README new file mode 100644 index 000..b4467ce --- /dev/null +++ b/src/modules/keepalive/README @@ -0,0 +1,126 @@ +KeepAlive Module + +Guillaume Bour + + <guilla...@bour.cc> + +Edited by + +Guillaume Bour + + <guilla...@bour.cc> + + Copyright © 2017 Guillaume Bour + __ + + Table of Contents + + 1. Admin Guide + +1. Overview +2. Dependencies + + 2.1. Kamailio Modules + 2.2. External Libraries or Applications + 2.3. Parameters + +2.3.1. ping_interval (integer) +2.3.2. destination (string) + + 2.4. Functions + +2.4.1. is_alive(destination) + + List of Examples + + 1.1. Set ping_interval parameter + 1.2. Set destination parameter + 1.3. is_alive() usage + +Chapter 1. Admin Guide + + Table of Contents + + 1. Overview + 2. Dependencies + +2.1. Kamailio Modules +2.2. External Libraries or Applications +2.3. Parameters + + 2.3.1. ping_interval (integer) + 2.3.2. destination (string) + +2.4. Functions + + 2.4.1. is_alive(destination) + +1. Overview + + This module performs destinations monitoring either for itself, or on + the behalf of other modules + +2. Dependencies + + 2.1. Kamailio Modules + 2.2. External Libraries or Applications + 2.3. Parameters + +2.3.1. ping_interval (integer) +2.3.2. destination (string) + + 2.4. Functions + +2.4.1. is_alive(destination) + +2.1. Kamailio Modules + + The following modules must be loaded before this module: + * tm - Transaction module + +2.2. External Libraries or Applications + + The following libraries or applications must be installed before + running Kamailio with this module loaded: + * none + +2.3. Parameters + +2.3.1. ping_interval (integer) + + Interval requests are sent to destinations (in seconds) + + Default value is 30 seconds. + + Example 1.1. Set ping_interval parameter +... +modparam("keepalive", "ping_interval", 10) +... + +2.3.2. destination (string) + + Allows to specify statically destinations you want to monitor + + Example 1.2. Set destination parameter +... +modparam("keepalive", "destination", "192.168.10.20") +modparam("keepalive", "destination", "sip.provider.com") +... + +2.4. Functions + +2.4.1. is_alive(destination) + + Get destination status + + Parameter "destination" is destination you want to check status + + Return value: 1 if destination is up, 2 if destination is down, -1 on + error. + + This function can be used from ANY_ROUTE. + + Example 1.3. is_alive() usage +... +is_alive("192.168.10.20"); +... ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:cf07d3fe: keepalive: new module to monitor remote destinations
Module: kamailio Branch: master Commit: cf07d3feab3494c934b27a8e52724be3d94fe00a URL: https://github.com/kamailio/kamailio/commit/cf07d3feab3494c934b27a8e52724be3d94fe00a Author: Guillaume Bour <guilla...@bour.cc> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T16:00:15+02:00 keepalive: new module to monitor remote destinations --- Added: src/modules/keepalive/Makefile Added: src/modules/keepalive/api.h Added: src/modules/keepalive/doc/Makefile Added: src/modules/keepalive/doc/keepalive.xml Added: src/modules/keepalive/doc/keepalive_admin.xml Added: src/modules/keepalive/keepalive.h Added: src/modules/keepalive/keepalive_api.c Added: src/modules/keepalive/keepalive_core.c Added: src/modules/keepalive/keepalive_mod.c Added: src/modules/keepalive/keepalive_rpc.c --- Diff: https://github.com/kamailio/kamailio/commit/cf07d3feab3494c934b27a8e52724be3d94fe00a.diff Patch: https://github.com/kamailio/kamailio/commit/cf07d3feab3494c934b27a8e52724be3d94fe00a.patch ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:8fafc501: Makefile.groups: added keepalive module to group extra
Module: kamailio Branch: master Commit: 8fafc501d9c0a254412cd88d3d071d6e4f375210 URL: https://github.com/kamailio/kamailio/commit/8fafc501d9c0a254412cd88d3d071d6e4f375210 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T16:02:08+02:00 Makefile.groups: added keepalive module to group extra --- Modified: src/Makefile.groups --- Diff: https://github.com/kamailio/kamailio/commit/8fafc501d9c0a254412cd88d3d071d6e4f375210.diff Patch: https://github.com/kamailio/kamailio/commit/8fafc501d9c0a254412cd88d3d071d6e4f375210.patch --- diff --git a/src/Makefile.groups b/src/Makefile.groups index 74065b5..7646c68 100644 --- a/src/Makefile.groups +++ b/src/Makefile.groups @@ -21,7 +21,7 @@ mod_list_basic=async auth benchmark blst cfg_rpc cfgutils corex counters \ mod_list_extra=avp auth_diameter call_control call_obj dmq domainpolicy msrp \ pdb qos sca seas sms sst timer tmrec uac_redirect xhttp \ xhttp_rpc xprint jsonrpcs nosip dmq_usrloc statsd rtjson \ -log_custom ss7ops +log_custom keepalive ss7ops # - common modules depending on database mod_list_db=acc alias_db auth_db avpops cfg_db db_text db_flatstore \ ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:079b84b1: dialog: documented the event_callback parameter
Module: kamailio Branch: master Commit: 079b84b1351a19334a478226b83f4d3193d050bb URL: https://github.com/kamailio/kamailio/commit/079b84b1351a19334a478226b83f4d3193d050bb Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T15:50:41+02:00 dialog: documented the event_callback parameter - allow specifying the function name to be executed by kemi on event routes --- Modified: src/modules/dialog/doc/dialog_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/079b84b1351a19334a478226b83f4d3193d050bb.diff Patch: https://github.com/kamailio/kamailio/commit/079b84b1351a19334a478226b83f4d3193d050bb.patch --- diff --git a/src/modules/dialog/doc/dialog_admin.xml b/src/modules/dialog/doc/dialog_admin.xml index 7b39bc9..af1443e 100644 --- a/src/modules/dialog/doc/dialog_admin.xml +++ b/src/modules/dialog/doc/dialog_admin.xml @@ -1443,6 +1443,39 @@ modparam("dialog", "lreq_callee_headers", "TH: dlh\r\n") + + event_callback (str) + + The name of the function in the kemi configuration file (embedded + scripting language such as Lua, Python, ...) to be executed instead + of event_route[...] blocks. + + + The function receives a string parameter with the name of the event, + the values are: 'dialog:start', 'dialog:end', 'dialog:failed'. It + is also executed if '$dlg_ctx(timeout_route)' is set, the callback + function being executed with the variable value as parameter. + + + + Default value is 'empty' (no function is executed for events). + + + + Set event_callback parameter + +... +modparam("dialog", "event_callback", "ksr_dialog_event") +... +-- event callback function implemented in Lua +function ksr_dialog_event(evname) + KSR.info("= dialog module triggered event: " .. evname .. "\n"); + return 1; +end +... + + + ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:a1756010: dispatcher: listed the options for the kemi event callback parameters
Module: kamailio Branch: master Commit: a17560105cf28f67c5eaf4ed7401615f64fb9cd0 URL: https://github.com/kamailio/kamailio/commit/a17560105cf28f67c5eaf4ed7401615f64fb9cd0 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T15:50:14+02:00 dispatcher: listed the options for the kemi event callback parameters --- Modified: src/modules/dispatcher/doc/dispatcher_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/a17560105cf28f67c5eaf4ed7401615f64fb9cd0.diff Patch: https://github.com/kamailio/kamailio/commit/a17560105cf28f67c5eaf4ed7401615f64fb9cd0.patch --- diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml index 6950a2d..ab40fb5 100644 --- a/src/modules/dispatcher/doc/dispatcher_admin.xml +++ b/src/modules/dispatcher/doc/dispatcher_admin.xml @@ -874,8 +874,11 @@ modparam("dispatcher", "force_dst", 1) The name of the function in the kemi configuration file (embedded scripting language such as Lua, Python, ...) to be executed instead - of event_route[...] blocks. The function receives a string parameter - with the name of the event. + of event_route[...] blocks. + + + The function receives a string parameter with the name of the event, + the values are: 'dispatcher:dst-down', 'dispatcher:dst-up'. ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:5b7838c9: dialog: enable execution of dialog event routes via kemi
Module: kamailio Branch: master Commit: 5b7838c9a5a865158c9572835c876d19a06780fb URL: https://github.com/kamailio/kamailio/commit/5b7838c9a5a865158c9572835c876d19a06780fb Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T15:23:07+02:00 dialog: enable execution of dialog event routes via kemi - requires to set the event_callback parameters --- Modified: src/modules/dialog/dialog.c Modified: src/modules/dialog/dlg_handlers.c --- Diff: https://github.com/kamailio/kamailio/commit/5b7838c9a5a865158c9572835c876d19a06780fb.diff Patch: https://github.com/kamailio/kamailio/commit/5b7838c9a5a865158c9572835c876d19a06780fb.patch ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:bb24683b: htable: more details about kemi callback function parameter
Module: kamailio Branch: master Commit: bb24683ba00dac15428ed4c1a6f2f9f2e8f60106 URL: https://github.com/kamailio/kamailio/commit/bb24683ba00dac15428ed4c1a6f2f9f2e8f60106 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T15:49:43+02:00 htable: more details about kemi callback function parameter --- Modified: src/modules/htable/doc/htable_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/bb24683ba00dac15428ed4c1a6f2f9f2e8f60106.diff Patch: https://github.com/kamailio/kamailio/commit/bb24683ba00dac15428ed4c1a6f2f9f2e8f60106.patch --- diff --git a/src/modules/htable/doc/htable_admin.xml b/src/modules/htable/doc/htable_admin.xml index f7d98ce..8c99ed8 100644 --- a/src/modules/htable/doc/htable_admin.xml +++ b/src/modules/htable/doc/htable_admin.xml @@ -677,8 +677,12 @@ modparam("htable", "timer_procs", 4) The name of the function in the kemi configuration file (embedded scripting language such as Lua, Python, ...) to be executed instead - of event_route[...] blocks. The function receives a string parameter - with the name of the event. + of event_route[...] blocks. + + + The function receives a string parameter with the name of the event, + the values can be: 'htable:mod-init', 'htable:expired:htname' + ('htname' being the name of hash table). ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:6aa21738: dispatcher: enable execution of event routes via kemi
Module: kamailio Branch: master Commit: 6aa21738dd860eee60b433a48d11c58f5d67618f URL: https://github.com/kamailio/kamailio/commit/6aa21738dd860eee60b433a48d11c58f5d67618f Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T14:22:33+02:00 dispatcher: enable execution of event routes via kemi --- Modified: src/modules/dispatcher/dispatch.c Modified: src/modules/dispatcher/dispatcher.c Modified: src/modules/htable/htable.c --- Diff: https://github.com/kamailio/kamailio/commit/6aa21738dd860eee60b433a48d11c58f5d67618f.diff Patch: https://github.com/kamailio/kamailio/commit/6aa21738dd860eee60b433a48d11c58f5d67618f.patch --- diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index da0cb4e..e63ca93 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -51,6 +51,7 @@ #include "../../lib/srdb1/db_res.h" #include "../../core/str.h" #include "../../core/script_cb.h" +#include "../../core/kemi.h" #include "../../core/fmsg.h" #include "ds_ht.h" @@ -72,6 +73,7 @@ static ds_ht_t *_dsht_load = NULL; static int *_ds_ping_active = NULL; extern int ds_force_dst; +extern str ds_event_callback; static db_func_t ds_dbf; static db1_con_t *ds_db_handle = NULL; @@ -2263,6 +2265,8 @@ static void ds_run_route(sip_msg_t *msg, str *uri, char *route) int rt, backup_rt; struct run_act_ctx ctx; sip_msg_t *fmsg; + sr_kemi_eng_t *keng = NULL; + str evname; if(route == NULL) { LM_ERR("bad route\n"); @@ -2271,10 +2275,20 @@ static void ds_run_route(sip_msg_t *msg, str *uri, char *route) LM_DBG("ds_run_route event_route[%s]\n", route); - rt = route_get(_rt, route); - if(rt < 0 || event_rt.rlist[rt] == NULL) { - LM_DBG("route does not exist"); - return; + rt = -1; + if(ds_event_callback.s==NULL || ds_event_callback.len<=0) { + rt = route_lookup(_rt, route); + if(rt < 0 || event_rt.rlist[rt] == NULL) { + LM_DBG("route does not exist"); + return; + } + } else { + keng = sr_kemi_eng_get(); + if(keng==NULL) { + LM_DBG("event callback (%s) set, but no cfg engine\n", + ds_event_callback.s); + return; + } } if(msg == NULL) { @@ -2289,11 +2303,24 @@ static void ds_run_route(sip_msg_t *msg, str *uri, char *route) fmsg = msg; } - backup_rt = get_route_type(); - set_route_type(REQUEST_ROUTE); - init_run_actions_ctx(); - run_top_route(event_rt.rlist[rt], fmsg, 0); - set_route_type(backup_rt); + if(rt>=0 || ds_event_callback.len>0) { + backup_rt = get_route_type(); + set_route_type(REQUEST_ROUTE); + init_run_actions_ctx(); + if(rt>=0) { + run_top_route(event_rt.rlist[rt], fmsg, 0); + } else { + if(keng!=NULL) { + evname.s = route; + evname.len = strlen(evname.s); + if(keng->froute(fmsg, EVENT_ROUTE, + _event_callback, )<0) { + LM_ERR("error running event route kemi callback\n"); + } + } + } + set_route_type(backup_rt); + } } diff --git a/src/modules/dispatcher/dispatcher.c b/src/modules/dispatcher/dispatcher.c index 748f470..d0399e0 100644 --- a/src/modules/dispatcher/dispatcher.c +++ b/src/modules/dispatcher/dispatcher.c @@ -136,6 +136,8 @@ pv_spec_t ds_setid_pv; str ds_attrs_pvname = STR_NULL; pv_spec_t ds_attrs_pv; +str ds_event_callback = STR_NULL; + /** module functions */ static int mod_init(void); static int child_init(int); @@ -248,6 +250,7 @@ static param_export_t params[]={ {"outbound_proxy", PARAM_STR, _outbound_proxy}, {"ds_default_socket", PARAM_STR, _default_socket}, {"ds_timer_mode", PARAM_INT, _timer_mode}, + {"event_callback", PARAM_STR, _event_callback}, {0,0,0} }; diff --git a/src/modules/htable/htable.c b/src/modules/htable/htable.c index d04143d..1876b28 100644 --- a/src/modules/htable/htable.c +++ b/src/modules/htable/htable.c @@ -263,7 +263,7 @@ static int child_init(int rank) rtb = get_route_type(); set_route_type(REQUEST_ROUTE); init_run_actions_ctx(); -
[sr-dev] git:master:9b72c40a: dispatcher: documentation for event_callback parameter
Module: kamailio Branch: master Commit: 9b72c40ab7ddba0766961557067a969dfc3a000a URL: https://github.com/kamailio/kamailio/commit/9b72c40ab7ddba0766961557067a969dfc3a000a Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T14:35:03+02:00 dispatcher: documentation for event_callback parameter --- Modified: src/modules/dispatcher/doc/dispatcher_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/9b72c40ab7ddba0766961557067a969dfc3a000a.diff Patch: https://github.com/kamailio/kamailio/commit/9b72c40ab7ddba0766961557067a969dfc3a000a.patch --- diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml index d0dc575..6950a2d 100644 --- a/src/modules/dispatcher/doc/dispatcher_admin.xml +++ b/src/modules/dispatcher/doc/dispatcher_admin.xml @@ -869,6 +869,34 @@ modparam("dispatcher", "force_dst", 1) + + event_callback (str) + + The name of the function in the kemi configuration file (embedded + scripting language such as Lua, Python, ...) to be executed instead + of event_route[...] blocks. The function receives a string parameter + with the name of the event. + + + + Default value is 'empty' (no function is executed for events). + + + + Set event_callback parameter + +... +modparam("dispatcher", "event_callback", "ksr_dispatcher_event") +... +-- event callback function implemented in Lua +function ksr_dispatcher_event(evname) + KSR.info("= dispatcher module triggered event: " .. evname .. "\n"); + return 1; +end +... + + + ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:30668abe: topoh: add additional safety checks
Module: kamailio Branch: 5.0 Commit: 30668abe2499d56d63efd4b860a154076e2150e7 URL: https://github.com/kamailio/kamailio/commit/30668abe2499d56d63efd4b860a154076e2150e7 Author: Claudiu Boriga <paul.bor...@1and1.ro> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T13:53:48+02:00 topoh: add additional safety checks - verify that headers contain expected prefix (including mask ip) before trying to unmask them; otherwise there may be issues when kamailio receives messages that are not masked and topoh is enabled. (cherry picked from commit 055fca8dd2ca9c2ea683a2ea3748d6728d54e5a5) --- Modified: src/modules/topoh/th_msg.c --- Diff: https://github.com/kamailio/kamailio/commit/30668abe2499d56d63efd4b860a154076e2150e7.diff Patch: https://github.com/kamailio/kamailio/commit/30668abe2499d56d63efd4b860a154076e2150e7.patch --- diff --git a/src/modules/topoh/th_msg.c b/src/modules/topoh/th_msg.c index a320c4a..a1f117e3 100644 --- a/src/modules/topoh/th_msg.c +++ b/src/modules/topoh/th_msg.c @@ -390,6 +390,14 @@ int th_unmask_via(sip_msg_t *msg, str *cookie) LM_DBG("body: %d: [%.*s]\n", vlen, vlen, via->name.s); if(i!=1) { + /* Skip if via is not encoded */ + if (via->host.len!=th_ip.len + || strncasecmp(via->host.s, th_ip.s, th_ip.len)!=0) + { + LM_DBG("via %d is not encoded",i); + continue; + } + vp = th_get_via_param(via, _vparam_name); if(vp==NULL) { @@ -404,7 +412,7 @@ int th_unmask_via(sip_msg_t *msg, str *cookie) _vparam_prefix, 0, ); if(out.s==NULL) { - LM_ERR("cannot encode via %d\n", i); + LM_ERR("cannot decode via %d\n", i); return -1; } @@ -475,6 +483,14 @@ int th_unmask_callid(sip_msg_t *msg) LM_ERR("cannot get Call-Id header\n"); return -1; } + + /* Do nothing if call-id is not encoded */ + if ((msg->callid->body.len<th_callid_prefix.len) || + (strncasecmp(msg->callid->body.s,th_callid_prefix.s,th_callid_prefix.len)!=0)) + { + LM_DBG("call-id [%.*s] not encoded",msg->callid->body.len,msg->callid->body.s); + return 0; + } out.s = th_mask_decode(msg->callid->body.s, msg->callid->body.len, _callid_prefix, 0, ); @@ -670,6 +686,15 @@ int th_unmask_route(sip_msg_t *msg) i++; if(i!=1) { + /* Skip if route is not encoded */ + if ((rr->nameaddr.uri.len<th_uri_prefix.len) || + (strncasecmp(rr->nameaddr.uri.s,th_uri_prefix.s,th_uri_prefix.len)!=0)) + { + LM_DBG("rr %d is not encoded: [%.*s]",i,rr->nameaddr.uri.len,rr->nameaddr.uri.s); + rr = rr->next; + continue; + } + if(th_get_uri_param_value(>nameaddr.uri, _uparam_name, )<0 || eval.len<=0) return -1; @@ -710,6 +735,14 @@ int th_unmask_ruri(sip_msg_t *msg) struct lump* l; str out; + /* Do nothing if ruri is not encoded */ + if ((REQ_LINE(msg).uri.len<th_uri_prefix.len) || + (strncasecmp(REQ_LINE(msg).uri.s,th_uri_prefix.s,th_uri_prefix.len)!=0)) + { + LM_DBG("ruri [%.*s] is not encoded",REQ_LINE(msg).uri.len,REQ_LINE(msg).uri.s); + return 0; + } + if(th_get_uri_param_value(_LINE(msg).uri, _uparam_name, )<0 || eval.len<=0) return -1; @@ -763,6 +796,15 @@ int th_unmask_refer_to(sip_msg_t *msg) } uri = &(get_refer_to(msg)->uri); + + /* Do nothing if refer_to is not encoded */ + if ((uri->len<th_uri_prefix.len) + || (strncasecmp(uri->s, th_uri_prefix.s, th_uri_pre
[sr-dev] git:5.0:0c2a5b7d: pkg: create /var/run/kamailio with user permissions in centos 7 spec
Module: kamailio Branch: 5.0 Commit: 0c2a5b7dc31751e6753a13f6956795e3ad15cf73 URL: https://github.com/kamailio/kamailio/commit/0c2a5b7dc31751e6753a13f6956795e3ad15cf73 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T13:54:05+02:00 pkg: create /var/run/kamailio with user permissions in centos 7 spec (cherry picked from commit 8f407a915785a2bd594567399cd52a305ccb274e) --- Modified: pkg/kamailio/centos/7/kamailio.init Modified: pkg/kamailio/centos/7/kamailio.spec --- Diff: https://github.com/kamailio/kamailio/commit/0c2a5b7dc31751e6753a13f6956795e3ad15cf73.diff Patch: https://github.com/kamailio/kamailio/commit/0c2a5b7dc31751e6753a13f6956795e3ad15cf73.patch --- diff --git a/pkg/kamailio/centos/7/kamailio.init b/pkg/kamailio/centos/7/kamailio.init index 3ee9677..2cdae7a 100644 --- a/pkg/kamailio/centos/7/kamailio.init +++ b/pkg/kamailio/centos/7/kamailio.init @@ -23,7 +23,8 @@ KAM=/usr/sbin/kamailio KAMCFG=/etc/kamailio/kamailio.cfg PROG=kamailio -PID_FILE=/var/run/kamailio.pid +HOMEDIR=/var/run/$PROG +PID_FILE=/var/run/$PROG/kamailio.pid LOCK_FILE=/var/lock/subsys/kamailio RETVAL=0 DEFAULTS=/etc/sysconfig/kamailio @@ -101,6 +102,12 @@ if test "$DUMP_CORE" = "yes" ; then echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern fi +# /var/run can be a tmpfs +if [ ! -d $HOMEDIR ]; then +mkdir -p $HOMEDIR + chown ${USER}:${GROUP} $HOMEDIR +fi + OPTIONS="-P $PID_FILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP $EXTRA_OPTIONS" diff --git a/pkg/kamailio/centos/7/kamailio.spec b/pkg/kamailio/centos/7/kamailio.spec index 053fe9a..bb5c414 100644 --- a/pkg/kamailio/centos/7/kamailio.spec +++ b/pkg/kamailio/centos/7/kamailio.spec @@ -622,6 +622,8 @@ install -m644 pkg/kamailio/centos/%{?centos}/kamailio.sysconfig \ /usr/sbin/groupadd -r kamailio 2> /dev/null || : /usr/sbin/useradd -r -g kamailio -s /bin/false -c "Kamailio daemon" -d \ %{_libdir}/kamailio kamailio 2> /dev/null || : +mkdir -p %{_var}/run/kamailio 2> /dev/null || : +chown kamailio:kamailio %{_var}/run/kamailio 2> /dev/null || : ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:f4ef9ca5: misc/examples: kemi - fixed cfgengine for javascript engine
Module: kamailio Branch: 5.0 Commit: f4ef9ca5108cad5a8ee7549ec3434f1a03fd4115 URL: https://github.com/kamailio/kamailio/commit/f4ef9ca5108cad5a8ee7549ec3434f1a03fd4115 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T13:51:42+02:00 misc/examples: kemi - fixed cfgengine for javascript engine (cherry picked from commit d01141e635e35c2f7b204e11b4a2587e5993d155) --- Modified: misc/examples/kemi/kamailio-basic-kemi.cfg --- Diff: https://github.com/kamailio/kamailio/commit/f4ef9ca5108cad5a8ee7549ec3434f1a03fd4115.diff Patch: https://github.com/kamailio/kamailio/commit/f4ef9ca5108cad5a8ee7549ec3434f1a03fd4115.patch --- diff --git a/misc/examples/kemi/kamailio-basic-kemi.cfg b/misc/examples/kemi/kamailio-basic-kemi.cfg index a9cdc78..41f06ba 100644 --- a/misc/examples/kemi/kamailio-basic-kemi.cfg +++ b/misc/examples/kemi/kamailio-basic-kemi.cfg @@ -366,7 +366,7 @@ cfgengine "lua" #!ifdef WITH_CFGJSDT modparam("app_jsdt", "load", "/usr/local/etc/kamailio/kamailio-basic-kemi-jsdt.js") -cfgengine "lua" +cfgengine "jsdt" #!else cfgengine "native" include_file "/usr/local/etc/kamailio/kamailio-basic-kemi-native.cfg" ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:16a54ceb: htable: handle blob/text columns when loading from database
Module: kamailio Branch: 5.0 Commit: 16a54ceb0b5443aebe8d6e6a87838847343b7f54 URL: https://github.com/kamailio/kamailio/commit/16a54ceb0b5443aebe8d6e6a87838847343b7f54 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T13:53:31+02:00 htable: handle blob/text columns when loading from database - reported by Patrick Ginhoux (cherry picked from commit 24e729698017b5d898a92cdf7acb024e44252b84) --- Modified: src/modules/htable/ht_db.c --- Diff: https://github.com/kamailio/kamailio/commit/16a54ceb0b5443aebe8d6e6a87838847343b7f54.diff Patch: https://github.com/kamailio/kamailio/commit/16a54ceb0b5443aebe8d6e6a87838847343b7f54.patch --- diff --git a/src/modules/htable/ht_db.c b/src/modules/htable/ht_db.c index 6ce3fc9..83a9f01 100644 --- a/src/modules/htable/ht_db.c +++ b/src/modules/htable/ht_db.c @@ -114,7 +114,8 @@ static char ht_name_buf[HT_NAME_BUF_SIZE]; static int ht_pack_values(ht_t *ht, db1_res_t* db_res, int row, int cols, str *hvalue) { - static char vbuf[4096]; +#define HTABLE_PACK_BUF_SIZE 4096 + static char vbuf[HTABLE_PACK_BUF_SIZE]; int c; int len; char *p; @@ -128,6 +129,8 @@ static int ht_pack_values(ht_t *ht, db1_res_t* db_res, len += strlen(RES_ROWS(db_res)[row].values[c].val.string_val); } else if(RES_ROWS(db_res)[row].values[c].type == DB1_STR) { len += RES_ROWS(db_res)[row].values[c].val.str_val.len; + } else if(RES_ROWS(db_res)[row].values[c].type == DB1_BLOB) { + len += RES_ROWS(db_res)[row].values[c].val.blob_val.len; } else if(RES_ROWS(db_res)[row].values[c].type == DB1_INT) { len += 12; } else { @@ -135,8 +138,9 @@ static int ht_pack_values(ht_t *ht, db1_res_t* db_res, return -1; } } - if(len + c>=4096) { - LM_ERR("too large values (need %d)\n", len+c); + if(len + c>=HTABLE_PACK_BUF_SIZE) { + LM_ERR("too large values (need %d, have %d)\n", len+c, + HTABLE_PACK_BUF_SIZE); return -1; } p = vbuf; @@ -151,6 +155,10 @@ static int ht_pack_values(ht_t *ht, db1_res_t* db_res, strncpy(p, RES_ROWS(db_res)[row].values[c].val.str_val.s, RES_ROWS(db_res)[row].values[c].val.str_val.len); p += RES_ROWS(db_res)[row].values[c].val.str_val.len; + } else if(RES_ROWS(db_res)[row].values[c].type == DB1_BLOB) { + memcpy(p, RES_ROWS(db_res)[row].values[c].val.blob_val.s, + RES_ROWS(db_res)[row].values[c].val.blob_val.len); + p += RES_ROWS(db_res)[row].values[c].val.blob_val.len; } else if(RES_ROWS(db_res)[row].values[c].type == DB1_INT) { iv.s = sint2str(RES_ROWS(db_res)[row].values[c].val.int_val, ); strncpy(p, iv.s, iv.len); @@ -280,6 +288,14 @@ int ht_db_load_table(ht_t *ht, str *dbtable, int mode) } kname.len = (RES_ROWS(db_res)[i].values[0].val.str_val.len); break; + case DB1_BLOB: + kname.s = (RES_ROWS(db_res)[i].values[0].val.blob_val.s); + if(kname.s==NULL) { + LM_ERR("null key in row %d\n", i); + goto error; + } + kname.len = (RES_ROWS(db_res)[i].values[0].val.blob_val.len); + break; case DB1_STRING: kname.s = (char*)(RES_ROWS(db_res)[i].values[0].val.string_val); if(kname.s==NULL) { @@ -392,6 +408,14 @@ int ht_db_load_table(ht_t *ht, str *dbtable, int mode) } str2sint(, ); break; + case DB1_BLOB: + kvalue = RES_ROWS(db_res)[i].values[3].val.blob_val; + if(kvalue.s==NULL) { + LM_ERR("null value in row %d\n", i); + goto error; + } + str2sint(, ); +
[sr-dev] git:5.0:d3a67fec: erlang: allow user to set ERLANG_xxxDIR
Module: kamailio Branch: 5.0 Commit: d3a67fec5eeca80f0feb46422ab3b5ef84016616 URL: https://github.com/kamailio/kamailio/commit/d3a67fec5eeca80f0feb46422ab3b5ef84016616 Author: Fabrice Fontaine <fontaine.fabr...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T13:51:14+02:00 erlang: allow user to set ERLANG_xxxDIR If erl is not installed on the system or can not be used (for example when cross-compiling), then erlang module will use the values set by the user in ERLANG_INCDIR and ERLANG_LIBDIR instead of returning en error Signed-off-by: Fabrice Fontaine <fontaine.fabr...@gmail.com> (cherry picked from commit 0d83c02f6389bf0adf9cc8afd5e19e2d0e94cd1a) --- Modified: src/modules/erlang/Makefile --- Diff: https://github.com/kamailio/kamailio/commit/d3a67fec5eeca80f0feb46422ab3b5ef84016616.diff Patch: https://github.com/kamailio/kamailio/commit/d3a67fec5eeca80f0feb46422ab3b5ef84016616.patch --- diff --git a/src/modules/erlang/Makefile b/src/modules/erlang/Makefile index e75176c..1886bd0 100644 --- a/src/modules/erlang/Makefile +++ b/src/modules/erlang/Makefile @@ -10,9 +10,12 @@ ERLANG=$(shell which erl) ifneq ($(ERLANG),) ERLANG_LIBDIR=$(shell $(ERLANG) -noshell -eval 'io:format("~n~s/lib~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1) ERLANG_INCDIR=$(shell $(ERLANG) -noshell -eval 'io:format("~n~s/include~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt | tail -n 1) -else +endif + +ifeq ($(ERLANG_LIBDIR)$(ERLANG_INCDIR),) $(error Not found Erlang) endif + LIBS=-L$(ERLANG_LIBDIR) -lei -lpthread DEFS+=-I$(ERLANG_INCDIR) ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:b30edd2b: dmq: attempt to re-initialize if node becomes detatched from cluster
Module: kamailio Branch: 5.0 Commit: b30edd2b19d7e30c1d2f9cef9303ae86bcd1c0f2 URL: https://github.com/kamailio/kamailio/commit/b30edd2b19d7e30c1d2f9cef9303ae86bcd1c0f2 Author: Charles Chance <charles.cha...@sipcentric.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T13:52:37+02:00 dmq: attempt to re-initialize if node becomes detatched from cluster - issue reported by José Seabra on sr-users mailing list (cherry picked from commit 666ebb63aecf2254b8efeae261452fc75c6d3aed) --- Modified: src/modules/dmq/dmq_funcs.c --- Diff: https://github.com/kamailio/kamailio/commit/b30edd2b19d7e30c1d2f9cef9303ae86bcd1c0f2.diff Patch: https://github.com/kamailio/kamailio/commit/b30edd2b19d7e30c1d2f9cef9303ae86bcd1c0f2.patch --- diff --git a/src/modules/dmq/dmq_funcs.c b/src/modules/dmq/dmq_funcs.c index 57c8c88..622ec42 100644 --- a/src/modules/dmq/dmq_funcs.c +++ b/src/modules/dmq/dmq_funcs.c @@ -459,12 +459,28 @@ void ping_servers(unsigned int ticks, void *param) { str* body; int ret; LM_DBG("ping_servers\n"); + + if (!node_list->nodes || (node_list->nodes->local && !node_list->nodes->next)) { + LM_DBG("node list is empty - attempt to rebuild from notification address\n"); + *dmq_init_callback_done = 0; + if(dmq_notification_address.s) { + notification_node = add_server_and_notify(_notification_address); + if(!notification_node) { + LM_ERR("cannot retrieve initial nodelist from %.*s\n", + STR_FMT(_notification_address)); + } + } else { + LM_ERR("no notification address"); + } + return; + } + body = build_notification_body(); if (!body) { LM_ERR("could not build notification body\n"); return; } - ret = bcast_dmq_message(dmq_notification_peer, body, notification_node, + ret = bcast_dmq_message(dmq_notification_peer, body, NULL, _callback, 1, _content_type); pkg_free(body->s); pkg_free(body); ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:1ed8f8aa: kamctl: added srv command
Module: kamailio Branch: 5.0 Commit: 1ed8f8aabe7e1e444f9fabd4728896d23a48f630 URL: https://github.com/kamailio/kamailio/commit/1ed8f8aabe7e1e444f9fabd4728896d23a48f630 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T13:53:10+02:00 kamctl: added srv command - shortcuts to RPC commands to print sockets, aliases and available RPC commands (cherry picked from commit e271bb60d4cb0e3e2ec1ecca4ff2833885331732) --- Modified: utils/kamctl/kamctl Modified: utils/kamctl/kamctl.base --- Diff: https://github.com/kamailio/kamailio/commit/1ed8f8aabe7e1e444f9fabd4728896d23a48f630.diff Patch: https://github.com/kamailio/kamailio/commit/1ed8f8aabe7e1e444f9fabd4728896d23a48f630.patch --- diff --git a/utils/kamctl/kamctl b/utils/kamctl/kamctl index 9e954c6..30d5878 100755 --- a/utils/kamctl/kamctl +++ b/utils/kamctl/kamctl @@ -1686,6 +1686,35 @@ dispatcher() { # # # +### Server management +# +ksr_srv() { + case $1 in + sockets) + require_ctlengine + mecho "list listen sockets" + ctl_cmd_run corex.list_sockets corex.list_sockets + ;; + aliases) + require_ctlengine + mecho "list server aliases" + ctl_cmd_run corex.list_aliases corex.list_aliases + ;; + rpclist) + require_ctlengine + mecho "list server rpc commands" + ctl_cmd_run system.listMethods system.listMethods + ;; + *) + usage_ksr_srv + exit 1 + + esac +} + + +# +# # ### DIALOG management # dialog() { @@ -2904,6 +2933,11 @@ case $1 in fi ;; + srv) + shift + ksr_srv "$@" + ;; + restart) kamailio_stop sleep 2 diff --git a/utils/kamctl/kamctl.base b/utils/kamctl/kamctl.base index fe67a0c..29ee217 100644 --- a/utils/kamctl/kamctl.base +++ b/utils/kamctl/kamctl.base @@ -535,6 +535,20 @@ cat <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:cecb5186: utils/pdbt: FreeBSD fix, gcc is hardcoded, header is missing
Module: kamailio Branch: 5.0 Commit: cecb51863e3b92577ea600089254ed4f30e9ce0d URL: https://github.com/kamailio/kamailio/commit/cecb51863e3b92577ea600089254ed4f30e9ce0d Author: Rick Barenthin <r...@terralink.de> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T13:50:42+02:00 utils/pdbt: FreeBSD fix, gcc is hardcoded, header is missing - use CC environment variable if set - added missing sys/stat.h header (cherry picked from commit 32e1e5040d2ff5e13d5bd0373e7edd6cef56f172) --- Modified: utils/pdbt/Makefile Modified: utils/pdbt/pdbt.c --- Diff: https://github.com/kamailio/kamailio/commit/cecb51863e3b92577ea600089254ed4f30e9ce0d.diff Patch: https://github.com/kamailio/kamailio/commit/cecb51863e3b92577ea600089254ed4f30e9ce0d.patch --- diff --git a/utils/pdbt/Makefile b/utils/pdbt/Makefile index b16d3cb..e354f6c 100644 --- a/utils/pdbt/Makefile +++ b/utils/pdbt/Makefile @@ -1,3 +1,11 @@ +#set some vars from the environment (and not make builtins) +CC := $(shell echo "$${CC}") + +# find compiler name & version +ifeq ($(CC),) +CC=gcc +endif + .phony: all clean install header=common.h carrier.h dt.h dtm.h pdb_server_backend.h log.h @@ -10,13 +18,13 @@ extdep=Makefile all: pdbt pdb_server $(obj): %.o : %.c %.h $(header) $(extdep) - gcc $(cflags) -c $< + $(CC) $(cflags) -c $< pdbt: pdbt.c $(obj) $(header) $(extdep) - gcc $(cflags) -o $@ $< $(obj) + $(CC) $(cflags) -o $@ $< $(obj) pdb_server: pdb_server.c $(pdb_server_obj) $(header) $(extdep) - gcc $(cflags) -o $@ $< $(pdb_server_obj) + $(CC) $(cflags) -o $@ $< $(pdb_server_obj) clean: rm -f *~ *.o pdbt pdb_server diff --git a/utils/pdbt/pdbt.c b/utils/pdbt/pdbt.c index fac466a..afd3695 100644 --- a/utils/pdbt/pdbt.c +++ b/utils/pdbt/pdbt.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:ec2d2cd2: rabbitmq: added link to rabbitmq c lib
Module: kamailio Branch: 5.0 Commit: ec2d2cd29400ec198377033a09edcc8843747190 URL: https://github.com/kamailio/kamailio/commit/ec2d2cd29400ec198377033a09edcc8843747190 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-04T13:49:42+02:00 rabbitmq: added link to rabbitmq c lib - GH #903 (cherry picked from commit 52e8634807b8c64a8ecd432a3c0e024185d3a447) --- Modified: src/modules/rabbitmq/doc/rabbitmq_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/ec2d2cd29400ec198377033a09edcc8843747190.diff Patch: https://github.com/kamailio/kamailio/commit/ec2d2cd29400ec198377033a09edcc8843747190.patch --- diff --git a/src/modules/rabbitmq/doc/rabbitmq_admin.xml b/src/modules/rabbitmq/doc/rabbitmq_admin.xml index 6165baf..7bb6003 100644 --- a/src/modules/rabbitmq/doc/rabbitmq_admin.xml +++ b/src/modules/rabbitmq/doc/rabbitmq_admin.xml @@ -10,7 +10,7 @@ http://www.w3.org/2001/XInclude;> - + @@ -18,7 +18,8 @@ This module offers amqp communication using librabbitmq. - This module was created based on rabbitmq-c C client. + This module was created using rabbitmq-c C client + (https://github.com/alanxz/rabbitmq-c;>https://github.com/alanxz/rabbitmq-c). An new amqp connection is setup on a per-children basis, when Kamailio starts. If connection is lost, the process tries to re-establish it when a new amqp action is required. @@ -60,7 +61,8 @@ - librabbitmq-dev. + librabbitmq-dev - + (https://github.com/alanxz/rabbitmq-c;>https://github.com/alanxz/rabbitmq-c). ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] git:master:6d87794c: ndb_redis: Added REDIS-Cluster support [BETA]
Hello, I haven't checked the merged version, but if I spotted correctly from the patch, it moves the redis response structure in shared memory. Is is right? If yes, why? Having it in shared memory will create races between kamailio processes that store results on same container id -- one worker can overwrite on data stored by another ine. Cheers, Daniel On 04.04.17 12:55, Carsten Bock wrote: > Module: kamailio > Branch: master > Commit: 6d87794cac3f6f3bb967d6e0bf6714a4d78f1bd5 > URL: > https://github.com/kamailio/kamailio/commit/6d87794cac3f6f3bb967d6e0bf6714a4d78f1bd5 > > Author: Carsten Bock <cars...@ng-voice.com> > Committer: Carsten Bock <cars...@ng-voice.com> > Date: 2017-04-04T12:55:26+02:00 > > ndb_redis: Added REDIS-Cluster support [BETA] > > --- > > Modified: src/modules/ndb_redis/doc/ndb_redis.xml > Modified: src/modules/ndb_redis/doc/ndb_redis_admin.xml > Modified: src/modules/ndb_redis/ndb_redis_mod.c > Modified: src/modules/ndb_redis/redis_client.c > Modified: src/modules/ndb_redis/redis_client.h > > --- > > Diff: > https://github.com/kamailio/kamailio/commit/6d87794cac3f6f3bb967d6e0bf6714a4d78f1bd5.diff > Patch: > https://github.com/kamailio/kamailio/commit/6d87794cac3f6f3bb967d6e0bf6714a4d78f1bd5.patch > > > ___ > sr-dev mailing list > sr-dev@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] Planning Kamailio v5.0.1
Hello, just a reminder about the plan to release v5.0.1 tomorrow. Besides reporting issues, if there are some patches not backported yet, do reply about them or, if a developer, cherry-pick them in branch 5.0. Cheers, Daniel On 28.03.17 09:40, Daniel-Constantin Mierla wrote: > Hello, > > I am considering to release Kamailio v5.0.1 sometime next week, likely > on Wednesday, April 5, 2017. Should anyone be aware of issues not listed > yet on bug tracker, report them there as soon as possible to try to fix. > > Soon after, we should release a new version from branch 4.4 and the last > one from branch 4.3. > > Cheers, > Daniel > -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Problem parsing content-type with numbers in multipart INVITE (#1053)
Fixed by @camilleoudot and it will be backported. -- 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/1053#issuecomment-291246788___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] core: parser - allow more chars in mime type (#1055)
Merged #1055. -- 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/1055#event-1027108978___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Problem parsing content-type with numbers in multipart INVITE (#1053)
Closed #1053 via #1055. -- 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/1053#event-1027108975___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] core: parser - allow more chars in mime type (#1055)
Thanks! -- 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/1055#issuecomment-291246500___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] topoh: add additional safety checks (#1052)
Merged #1052. -- 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/1052#event-1026492917___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] topoh: add additional safety checks (#1052)
Thanks! -- 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/1052#issuecomment-291146273___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] INFO: Shifting mailing lists to kamailio.org domain
Hello, I think it is time to migrate the mailing lists under kamailio.org domain, respectively use lists.kamailio.org. The lists.sip-router.org will still work, but lists.kamailio.org is intended to become the primary domain for mailing lists. The sip-router.org was the quick solution for integrating Kamailio and SER in one project back in 2008, when kamailio.org and iptel.org still needed to be operated for a while as independent projects. For few years now, Kamailio is the only project name that is used out there and it will make operating everything a bit smoother, more coherent and also avoid eventual confusions for people new into the project. As a matter of fact, we even had a small incident few weeks ago -- due to split management of sip-router.org and DNS registration expire notifications going to an email address on a different server than kamailio.org, the domain was expired for few hours (although it was kept on hold by registrar) and mailing lists started to be unavailable. Fortunately that was discovered and fixed in time. The names will stay the same sr-users and sr-dev, just primary domain will be using kamailio.org (which should 'hopefully' work even now, as this email was addressed with mixed sr-dev@lists.sip-router.org and sr-us...@lists.kamailio.org). If anyone has different opinions or suggestions, let's discuss them! Cheers, Daniel -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:71fce8d0: pv: remove unused vars in $hdrc(...) implementation
Module: kamailio Branch: master Commit: 71fce8d061c50e6ad80947f16c1fe6ed8760d634 URL: https://github.com/kamailio/kamailio/commit/71fce8d061c50e6ad80947f16c1fe6ed8760d634 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-04-03T14:02:28+02:00 pv: remove unused vars in $hdrc(...) implementation - reported by Juha Heinanen --- Modified: src/modules/pv/pv_core.c --- Diff: https://github.com/kamailio/kamailio/commit/71fce8d061c50e6ad80947f16c1fe6ed8760d634.diff Patch: https://github.com/kamailio/kamailio/commit/71fce8d061c50e6ad80947f16c1fe6ed8760d634.patch --- diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c index 40a9952..cf0b606 100644 --- a/src/modules/pv/pv_core.c +++ b/src/modules/pv/pv_core.c @@ -1802,13 +1802,8 @@ int pv_get_hdr(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) */ int pv_get_hdrc(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) { - int idx; - int idxf; pv_value_t tv; struct hdr_field *hf; - struct hdr_field *hf0; - char *p, *p_ini; - int n, p_size; int hcount; if(msg==NULL || res==NULL || param==NULL) ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] sipcapture: Fragmented packets are not captured on mirror port (#1049)
indeed, same simple and cool stuff by sipgrep as well! -- 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/1049#issuecomment-290709234___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] sipcapture: Fragmented packets are not captured on mirror port (#1049)
Just to add for those not aware of it yet -- instead of captagent, one can also use sngrep to push traffic from network to Kamailio sipcapture/Homer server; it might not be as flexible as captagent, but for SIP traffic is good enough, allowing to do filtering from command line as well. -- 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/1049#issuecomment-290706201___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:4.4:406c02f7: tls: do kerberos and zlib init checks only for libssl < 1.1.0
Module: kamailio Branch: 4.4 Commit: 406c02f7b76ada56d6e1f73e763fecb05c1f51c5 URL: https://github.com/kamailio/kamailio/commit/406c02f7b76ada56d6e1f73e763fecb05c1f51c5 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-03-31T13:01:24+02:00 tls: do kerberos and zlib init checks only for libssl < 1.1.0 - using string matching inside libssl compile flags is no longer reliable - reported by GH #1050 (cherry picked from commit e59fa823b7b9513d3d1adb958d5e8ec055082d83) (cherry picked from commit b12ac4ea9efae41b83a2664ea4f25b1d59bc2032) --- Modified: modules/tls/tls_init.c --- Diff: https://github.com/kamailio/kamailio/commit/406c02f7b76ada56d6e1f73e763fecb05c1f51c5.diff Patch: https://github.com/kamailio/kamailio/commit/406c02f7b76ada56d6e1f73e763fecb05c1f51c5.patch --- diff --git a/modules/tls/tls_init.c b/modules/tls/tls_init.c index af2d4c5..133bc7f 100644 --- a/modules/tls/tls_init.c +++ b/modules/tls/tls_init.c @@ -563,11 +563,13 @@ int init_tls_h(void) { /*struct socket_info* si;*/ long ssl_version; +#if OPENSSL_VERSION_NUMBER < 0x01010L int lib_kerberos; int lib_zlib; int kerberos_support; int comp_support; const char* lib_cflags; +#endif int low_mem_threshold1; int low_mem_threshold2; str tls_grp; @@ -603,6 +605,10 @@ int init_tls_h(void) else return -1; /* safer to exit */ } + +/* check kerberos support using compile flags only for version < 1.1.0 */ +#if OPENSSL_VERSION_NUMBER < 0x01010L + #ifdef TLS_KERBEROS_SUPPORT kerberos_support=1; #else @@ -672,6 +678,9 @@ int init_tls_h(void) " kerberos support will be disabled...\n"); } #endif + +#endif /* libssl version < 1.1.0 (OPENSSL_VERSION_NUMBER < 0x01010L) */ + /* set free memory threshold for openssl bug #1491 workaround */ low_mem_threshold1 = cfg_get(tls, tls_cfg, low_mem_threshold1); low_mem_threshold2 = cfg_get(tls, tls_cfg, low_mem_threshold2); ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:5.0:b12ac4ea: tls: do kerberos and zlib init checks only for libssl < 1.1.0
Module: kamailio Branch: 5.0 Commit: b12ac4ea9efae41b83a2664ea4f25b1d59bc2032 URL: https://github.com/kamailio/kamailio/commit/b12ac4ea9efae41b83a2664ea4f25b1d59bc2032 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-03-31T13:00:25+02:00 tls: do kerberos and zlib init checks only for libssl < 1.1.0 - using string matching inside libssl compile flags is no longer reliable - reported by GH #1050 (cherry picked from commit e59fa823b7b9513d3d1adb958d5e8ec055082d83) --- Modified: src/modules/tls/tls_init.c --- Diff: https://github.com/kamailio/kamailio/commit/b12ac4ea9efae41b83a2664ea4f25b1d59bc2032.diff Patch: https://github.com/kamailio/kamailio/commit/b12ac4ea9efae41b83a2664ea4f25b1d59bc2032.patch --- diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c index 96231dc..5d977fc 100644 --- a/src/modules/tls/tls_init.c +++ b/src/modules/tls/tls_init.c @@ -563,11 +563,13 @@ int init_tls_h(void) { /*struct socket_info* si;*/ long ssl_version; +#if OPENSSL_VERSION_NUMBER < 0x01010L int lib_kerberos; int lib_zlib; int kerberos_support; int comp_support; const char* lib_cflags; +#endif int low_mem_threshold1; int low_mem_threshold2; str tls_grp; @@ -603,6 +605,10 @@ int init_tls_h(void) else return -1; /* safer to exit */ } + +/* check kerberos support using compile flags only for version < 1.1.0 */ +#if OPENSSL_VERSION_NUMBER < 0x01010L + #ifdef TLS_KERBEROS_SUPPORT kerberos_support=1; #else @@ -672,6 +678,9 @@ int init_tls_h(void) " kerberos support will be disabled...\n"); } #endif + +#endif /* libssl version < 1.1.0 (OPENSSL_VERSION_NUMBER < 0x01010L) */ + /* set free memory threshold for openssl bug #1491 workaround */ low_mem_threshold1 = cfg_get(tls, tls_cfg, low_mem_threshold1); low_mem_threshold2 = cfg_get(tls, tls_cfg, low_mem_threshold2); ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:e59fa823: tls: do kerberos and zlib init checks only for libssl < 1.1.0
Module: kamailio Branch: master Commit: e59fa823b7b9513d3d1adb958d5e8ec055082d83 URL: https://github.com/kamailio/kamailio/commit/e59fa823b7b9513d3d1adb958d5e8ec055082d83 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-03-31T12:56:52+02:00 tls: do kerberos and zlib init checks only for libssl < 1.1.0 - using string matching inside libssl compile flags is no longer reliable - reported by GH #1050 --- Modified: src/modules/tls/tls_init.c --- Diff: https://github.com/kamailio/kamailio/commit/e59fa823b7b9513d3d1adb958d5e8ec055082d83.diff Patch: https://github.com/kamailio/kamailio/commit/e59fa823b7b9513d3d1adb958d5e8ec055082d83.patch --- diff --git a/src/modules/tls/tls_init.c b/src/modules/tls/tls_init.c index 96231dc..5d977fc 100644 --- a/src/modules/tls/tls_init.c +++ b/src/modules/tls/tls_init.c @@ -563,11 +563,13 @@ int init_tls_h(void) { /*struct socket_info* si;*/ long ssl_version; +#if OPENSSL_VERSION_NUMBER < 0x01010L int lib_kerberos; int lib_zlib; int kerberos_support; int comp_support; const char* lib_cflags; +#endif int low_mem_threshold1; int low_mem_threshold2; str tls_grp; @@ -603,6 +605,10 @@ int init_tls_h(void) else return -1; /* safer to exit */ } + +/* check kerberos support using compile flags only for version < 1.1.0 */ +#if OPENSSL_VERSION_NUMBER < 0x01010L + #ifdef TLS_KERBEROS_SUPPORT kerberos_support=1; #else @@ -672,6 +678,9 @@ int init_tls_h(void) " kerberos support will be disabled...\n"); } #endif + +#endif /* libssl version < 1.1.0 (OPENSSL_VERSION_NUMBER < 0x01010L) */ + /* set free memory threshold for openssl bug #1491 workaround */ low_mem_threshold1 = cfg_get(tls, tls_cfg, low_mem_threshold1); low_mem_threshold2 = cfg_get(tls, tls_cfg, low_mem_threshold2); ___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tls: detection of kerberos support for openssl at runtime (#1050)
Somehow similar, but it should include more code -- I am preparing right now a patch. -- 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/1050#issuecomment-290681280___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tls: detection of kerberos support for openssl at runtime (#1050)
I think all those extra checks should be done only for older versions. Relying on matching inside the compile flags is probably no longer a safe bet. I think that just matching on version should be ok, so we can add an ifdef on OPENSSL_VERSION_NUMBER to enclose these checks only for versions older than libssl 1.1.0 -- 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/1050#issuecomment-290678483___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:e271bb60: kamctl: added srv command
Module: kamailio Branch: master Commit: e271bb60d4cb0e3e2ec1ecca4ff2833885331732 URL: https://github.com/kamailio/kamailio/commit/e271bb60d4cb0e3e2ec1ecca4ff2833885331732 Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-03-31T12:06:32+02:00 kamctl: added srv command - shortcuts to RPC commands to print sockets, aliases and available RPC commands --- Modified: utils/kamctl/kamctl Modified: utils/kamctl/kamctl.base --- Diff: https://github.com/kamailio/kamailio/commit/e271bb60d4cb0e3e2ec1ecca4ff2833885331732.diff Patch: https://github.com/kamailio/kamailio/commit/e271bb60d4cb0e3e2ec1ecca4ff2833885331732.patch --- diff --git a/utils/kamctl/kamctl b/utils/kamctl/kamctl index 9e954c6..30d5878 100755 --- a/utils/kamctl/kamctl +++ b/utils/kamctl/kamctl @@ -1686,6 +1686,35 @@ dispatcher() { # # # +### Server management +# +ksr_srv() { + case $1 in + sockets) + require_ctlengine + mecho "list listen sockets" + ctl_cmd_run corex.list_sockets corex.list_sockets + ;; + aliases) + require_ctlengine + mecho "list server aliases" + ctl_cmd_run corex.list_aliases corex.list_aliases + ;; + rpclist) + require_ctlengine + mecho "list server rpc commands" + ctl_cmd_run system.listMethods system.listMethods + ;; + *) + usage_ksr_srv + exit 1 + + esac +} + + +# +# # ### DIALOG management # dialog() { @@ -2904,6 +2933,11 @@ case $1 in fi ;; + srv) + shift + ksr_srv "$@" + ;; + restart) kamailio_stop sleep 2 diff --git a/utils/kamctl/kamctl.base b/utils/kamctl/kamctl.base index fe67a0c..29ee217 100644 --- a/utils/kamctl/kamctl.base +++ b/utils/kamctl/kamctl.base @@ -535,6 +535,20 @@ cat <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Problem with topos together with track_cseq_updates (#1038)
Hmm, can you provide log messages with debug=3 when topos is loaded before dialog module? -- 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/1038#issuecomment-290658021___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Problem with topos together with track_cseq_updates (#1038)
Can you try changing the order you load dialog and topos modules and test again? It may be a quick fix after looking a bit at the code -- even if working, I am planning a more consistent 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/1038#issuecomment-290395977___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc: adding params (#1048)
Merged #1048. -- 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/1048#event-1022128340___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Kamailio crashes when it receives a 404 reply to an INVITE originated after a 302. (#875)
Closed #875. -- 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/875#event-1022125306___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Kamailio crashes when it receives a 404 reply to an INVITE originated after a 302. (#875)
Reopen if still an issue with latest versions, there were some fixes impacting this. -- 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/875#issuecomment-290383237___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] "shm_mem_size" does not work if it was set in config file (#950)
Closed #950. -- 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/950#event-1022123454___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tr_lookup(): error parsing [{param.count, , }] (#1041)
Reopen if the option with variable doesn't work. -- 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/1041#issuecomment-290382310___ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev