[sr-dev] Re: [kamailio/kamailio] New module/file_out: Module to log custom strings to file (PR #3741)
Adding a few more details, previous comment was done on mobile, typing there on the web form is not the easiest. I think that log_file would be a candidate for the name of a module that writes all the logs in a file, similar to log_custom that sends all the log to an udp target. Then having a module named log_file and another one file_log would looks rather confusing. Renaming can still be done till the branch 5.8 is created, even if it is past the freezing time. First part of testing phase is to tune accordingly the new features to be more suitable for long term maintenance. Names that came meanwhile in my mind would be: fqwrite (file-queued-write); fqout (fout being rather commonly used to name output file variables, adding q for queuing). This just ideas if renaming is still considered, of course other variant can be used. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3741#issuecomment-1922127906 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:40b73521: rtpengine: optional ping parameter for rpc reload command
Module: kamailio Branch: master Commit: 40b735216c610cae2da5b0758af31b1d3ade4731 URL: https://github.com/kamailio/kamailio/commit/40b735216c610cae2da5b0758af31b1d3ade4731 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-01T21:38:25+01:00 rtpengine: optional ping parameter for rpc reload command - specify if ping should be done to rtpengines at reload time --- Modified: src/modules/rtpengine/rtpengine.c --- Diff: https://github.com/kamailio/kamailio/commit/40b735216c610cae2da5b0758af31b1d3ade4731.diff Patch: https://github.com/kamailio/kamailio/commit/40b735216c610cae2da5b0758af31b1d3ade4731.patch --- diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c index e3e4c6e1d50..74983124964 100644 --- a/src/modules/rtpengine/rtpengine.c +++ b/src/modules/rtpengine/rtpengine.c @@ -1609,6 +1609,8 @@ static int rtpp_test_ping(struct rtpp_node *node) static void rtpengine_rpc_reload(rpc_t *rpc, void *ctx) { time_t tnow; + int rping = 1; + int n = 0; if(rtpp_db_url.s == NULL) { // no database @@ -1621,6 +1623,13 @@ static void rtpengine_rpc_reload(rpc_t *rpc, void *ctx) return; } + n = rpc->scan(ctx, "*d", &rping); + if(n != 1) { + rping = 1; + } else if(rping != 0) { + rping = 1; + } + tnow = time(NULL); if(tnow - _rtpe_list_version->vertime < RTPE_LIST_VERSION_DELAY) { rpc->fault(ctx, 500, "Too short reload interval - try later"); @@ -1634,7 +1643,7 @@ static void rtpengine_rpc_reload(rpc_t *rpc, void *ctx) return; } - if(build_rtpp_socks(1, 1)) { + if(build_rtpp_socks(1, rping)) { rpc->fault(ctx, 500, "Failed to build rtpengine sockets"); return; } ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:49bc5b26: rtpengine: new modparam to disable pinging rtpengines at startup
Module: kamailio Branch: master Commit: 49bc5b266dad33e418e8895e9ed7ead46e254016 URL: https://github.com/kamailio/kamailio/commit/49bc5b266dad33e418e8895e9ed7ead46e254016 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-01T21:38:25+01:00 rtpengine: new modparam to disable pinging rtpengines at startup --- Modified: src/modules/rtpengine/rtpengine.c --- Diff: https://github.com/kamailio/kamailio/commit/49bc5b266dad33e418e8895e9ed7ead46e254016.diff Patch: https://github.com/kamailio/kamailio/commit/49bc5b266dad33e418e8895e9ed7ead46e254016.patch --- diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c index 74983124964..c0727ed4e19 100644 --- a/src/modules/rtpengine/rtpengine.c +++ b/src/modules/rtpengine/rtpengine.c @@ -347,6 +347,7 @@ static enum hash_algo_t hash_algo = RTP_HASH_CALLID; static str rtpengine_dtmf_event_sock; static int rtpengine_dtmf_event_fd; int dtmf_event_rt = -1; /* default disabled */ +static int rtpengine_ping_mode = 1; /* clang-format off */ typedef struct rtpp_set_link { @@ -465,6 +466,7 @@ static param_export_t params[] = { &default_rtpengine_cfg.rtpengine_tout_ms}, {"rtpengine_allow_op", INT_PARAM, &rtpengine_allow_op}, {"control_cmd_tos", INT_PARAM, &control_cmd_tos}, + {"ping_mode", PARAM_INT, &rtpengine_ping_mode}, {"db_url", PARAM_STR, &rtpp_db_url}, {"table_name", PARAM_STR, &rtpp_table_name}, {"setid_col", PARAM_STR, &rtpp_setid_col}, @@ -2519,7 +2521,7 @@ static int child_init(int rank) /* Iterate known RTPEngine instances - create sockets */ if(rank == PROC_SIPINIT) { /* probe rtpengines only in first worker */ - if(build_rtpp_socks(0, 1)) + if(build_rtpp_socks(0, rtpengine_ping_mode)) return -1; else { if(build_rtpp_socks(0, 0)) ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:03e60c80: Makefile.groups: added file_out to extra group
Module: kamailio Branch: master Commit: 03e60c809a0ac26b402bdf1154d6ec7b0476f26a URL: https://github.com/kamailio/kamailio/commit/03e60c809a0ac26b402bdf1154d6ec7b0476f26a Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-02T07:35:48+01:00 Makefile.groups: added file_out to extra group --- Modified: src/Makefile.groups --- Diff: https://github.com/kamailio/kamailio/commit/03e60c809a0ac26b402bdf1154d6ec7b0476f26a.diff Patch: https://github.com/kamailio/kamailio/commit/03e60c809a0ac26b402bdf1154d6ec7b0476f26a.patch --- diff --git a/src/Makefile.groups b/src/Makefile.groups index a9b7d16133f..fec21d47bdd 100644 --- a/src/Makefile.groups +++ b/src/Makefile.groups @@ -22,7 +22,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 \ carrierroute pdb qos sca seas sms sst timer tmrec uac_redirect \ xhttp xhttp_rpc xprint jsonrpcs nosip dmq_usrloc statsd rtjson \ - log_custom keepalive ss7ops acc_diameter evrexec \ + log_custom keepalive ss7ops acc_diameter evrexec file_out \ sipjson lrkproxy math posops xhttp_prom dlgs sworker influxdbc # - common modules depending on database ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:8c5e9758: Makefile.defs: version set to 5.8.0-dev3
Module: kamailio Branch: master Commit: 8c5e97589fc0fed121ee6e8ca4adbf9ec63ad2eb URL: https://github.com/kamailio/kamailio/commit/8c5e97589fc0fed121ee6e8ca4adbf9ec63ad2eb Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-02T08:55:38+01:00 Makefile.defs: version set to 5.8.0-dev3 - mark end of development for v5.8.x series --- Modified: src/Makefile.defs --- Diff: https://github.com/kamailio/kamailio/commit/8c5e97589fc0fed121ee6e8ca4adbf9ec63ad2eb.diff Patch: https://github.com/kamailio/kamailio/commit/8c5e97589fc0fed121ee6e8ca4adbf9ec63ad2eb.patch --- diff --git a/src/Makefile.defs b/src/Makefile.defs index b088bcfffe2..b3067c493d3 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -107,7 +107,7 @@ INSTALL_FLAVOUR=$(FLAVOUR) VERSION = 5 PATCHLEVEL = 8 SUBLEVEL = 0 -EXTRAVERSION = -dev2 +EXTRAVERSION = -dev3 # memory manager switcher # 0 - f_malloc (fast malloc) @@ -2212,4 +2212,3 @@ export $(saved_chg_vars) endif # ifneq ($(exported_vars),1) endif # ifeq ($(makefile_defs),1) - ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:b85471a7: Makefile.defs: version set to 5.8.0-pre0
Module: kamailio Branch: master Commit: b85471a7c28324fcb890961a1ad67810bfbb8ac4 URL: https://github.com/kamailio/kamailio/commit/b85471a7c28324fcb890961a1ad67810bfbb8ac4 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-02T08:56:52+01:00 Makefile.defs: version set to 5.8.0-pre0 - mark start of testing for v5.8.x series --- Modified: src/Makefile.defs --- Diff: https://github.com/kamailio/kamailio/commit/b85471a7c28324fcb890961a1ad67810bfbb8ac4.diff Patch: https://github.com/kamailio/kamailio/commit/b85471a7c28324fcb890961a1ad67810bfbb8ac4.patch --- diff --git a/src/Makefile.defs b/src/Makefile.defs index b3067c493d3..0b6086d0a3d 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -107,7 +107,7 @@ INSTALL_FLAVOUR=$(FLAVOUR) VERSION = 5 PATCHLEVEL = 8 SUBLEVEL = 0 -EXTRAVERSION = -dev3 +EXTRAVERSION = -pre0 # memory manager switcher # 0 - f_malloc (fast malloc) ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:a2268239: influxdbc: fix compile warnings
Module: kamailio Branch: master Commit: a226823910735c315fc31df0e46132710db38def URL: https://github.com/kamailio/kamailio/commit/a226823910735c315fc31df0e46132710db38def Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-02T09:27:10+01:00 influxdbc: fix compile warnings --- Modified: src/modules/influxdbc/ic.c --- Diff: https://github.com/kamailio/kamailio/commit/a226823910735c315fc31df0e46132710db38def.diff Patch: https://github.com/kamailio/kamailio/commit/a226823910735c315fc31df0e46132710db38def.patch --- diff --git a/src/modules/influxdbc/ic.c b/src/modules/influxdbc/ic.c index 093eb5dd60b..09ab462ffcb 100644 --- a/src/modules/influxdbc/ic.c +++ b/src/modules/influxdbc/ic.c @@ -145,8 +145,6 @@ void ic_influx_userpw(char *user, char *pw) int create_socket() /* returns 1 for error and 0 for ok */ { - int i; - static char buffer[4096]; static struct sockaddr_in serv_addr; if(debug) @@ -171,11 +169,11 @@ int create_socket() /* returns 1 for error and 0 for ok */ void ic_check(long adding) /* Check the buffer space */ { - if(output == (char *)0) { /* First time create the buffer * - if( (output = (char *)malloc(MEGABYTE)) == (char *)-1) + if(output == (char *)0) { /* First time create the buffer */ + /* if( (output = (char *)malloc(MEGABYTE)) == (char *)-1) error("failed to malloc() output buffer"); } -if(output_char + (2*adding) > output_size) /* When near the end of the output buffer, extend it*/ +if(output_char + (2*adding) > output_size) */ /* When near the end of the output buffer, extend it*/ if((output = (char *)realloc(output, output_size + MEGABYTE)) == (char *)-1) error("failed to realloc() output buffer"); @@ -293,7 +291,6 @@ void ic_string(char *name, char *value) void ic_push() { - char header[1024]; char result[1024]; char buffer[1024 * 8]; int ret; ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:82593a09: core: properly handle drop() action for kemi engines
Module: kamailio Branch: master Commit: 82593a09f8ef6d53e7e88238c057bbcdd9ab287b URL: https://github.com/kamailio/kamailio/commit/82593a09f8ef6d53e7e88238c057bbcdd9ab287b Author: Xenofon Karamanos Committer: Daniel-Constantin Mierla Date: 2024-02-02T10:56:41+01:00 core: properly handle drop() action for kemi engines - GH #3718 --- Modified: src/core/onsend.c --- Diff: https://github.com/kamailio/kamailio/commit/82593a09f8ef6d53e7e88238c057bbcdd9ab287b.diff Patch: https://github.com/kamailio/kamailio/commit/82593a09f8ef6d53e7e88238c057bbcdd9ab287b.patch --- diff --git a/src/core/onsend.c b/src/core/onsend.c index a4d81781de7..84186cd67ed 100644 --- a/src/core/onsend.c +++ b/src/core/onsend.c @@ -87,7 +87,18 @@ int run_onsend(sip_msg_t *orig_msg, dest_info_t *dst, char *buf, int len) orig_msg->fwd_send_flags = fwd_snd_flags_bak; orig_msg->rpl_send_flags = rpl_snd_flags_bak; exec_post_script_cb(orig_msg, ONSEND_CB_TYPE); - if((ret == 0) && !(ra_ctx.run_flags & DROP_R_F)) { + /* - handle drop action with flag DROP_R_F +* KEMI case (python,lua,jsdt) +* ret = 1 always +* Native case: +* ret = 1 success +* ret = 0 drop the message +*/ + if(ra_ctx.run_flags & DROP_R_F) { + ret = 0; + } else if(ret == 0) { + /* native case where run_actions return 0 +* but DROP_R_F is not set */ ret = 1; } } else { ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] core: Fix check to also work for KEMI framework (PR #3718)
Closed #3718. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3718#event-11681948132 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] core: Fix check to also work for KEMI framework (PR #3718)
I have just merged it manually to change a bit the commit message and comments. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3718#issuecomment-1923465954 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] db schemes - db_unixodbc, usrloc: MariaDB partition is a reserved word and not quoted (Issue #3742)
The quote_char param has this role, it is hard to avoid all keywords on various databases and changing the schema is not really recommended, in the future there can be other keywords that will conflict with existing names. The only constraint is that all DBs used with db_unixodbc at the same time have to support same quoting character. A possible enhancement here would be to be able to specify the quoting char via the db url. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3742#issuecomment-1923831146 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Development for v5.8.x is frozen
Hello, the formal notification that the development for the next major version 5.8.0 is now frozen. The focus has to be on testing the master branch. Also, the master branch should not get commits with new features till the branch 5.8 is created, expected to happen in 2-4 weeks, a matter of how testing goes on. Meanwhile, the commits with new features in the C code can be pushed to personal branches, new pull requests can still be done, but they will be merged after branching 5.8. Can still be done commits with documentation improvements, enhancements to related tools (e.g., kamctl, kamcmd), merging exiting pull requests at this moment, exporting missing KEMI functions and completing the functionality of the new modules added for 5.8. Once the branch 5.8 is created, new features can be pushed again to master branch as usual. From that moment, the v5.8.0 should be out very soon, time used for further testing but also preparing the release of packages. If someone is not sure if a commit brings a new feature, just make a pull request and it can be discussed there on github portal or via sr-dev mailing list. A summary of what is new in upcoming 5.8 is going to be built at: * https://www.kamailio.org/wikidocs/features/new-in-5.8.x/ Upgrade guidelines will be collected at: * https://www.kamailio.org/wikidocs/install/upgrade/5.7.x-to-5.8.0/ Everyone is more than welcome to contribute to the above wiki pages, especially to the upgrade guidelines, to help everyone else during the migration process from v5.7.x to 5.8.x. Cheers, Daniel -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio Advanced Training, February 20-22, 2024 -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:faaad7e0: rtpengine: docs for ping_mode parameter
Module: kamailio Branch: master Commit: faaad7e0e654359e744d0c18253cc0dc84cd906e URL: https://github.com/kamailio/kamailio/commit/faaad7e0e654359e744d0c18253cc0dc84cd906e Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-05T16:19:20+01:00 rtpengine: docs for ping_mode parameter --- Modified: src/modules/rtpengine/doc/rtpengine_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/faaad7e0e654359e744d0c18253cc0dc84cd906e.diff Patch: https://github.com/kamailio/kamailio/commit/faaad7e0e654359e744d0c18253cc0dc84cd906e.patch --- diff --git a/src/modules/rtpengine/doc/rtpengine_admin.xml b/src/modules/rtpengine/doc/rtpengine_admin.xml index fea67a665a2..adb3af92bdd 100644 --- a/src/modules/rtpengine/doc/rtpengine_admin.xml +++ b/src/modules/rtpengine/doc/rtpengine_admin.xml @@ -2348,6 +2348,28 @@ modparam("rtpengine", "dtmf_events_sock", "127.0.0.1:2223") + + ping_mode (integer) + + Specify if the RTPEngine instances have to be pinged at startup to + detect if they are active. Set it to 0 to disable pinging and to 1 + to activate pinging. + + + + Default value is 1. + + + + Set ping_mode parameter + +... +modparam("rtpengine", "ping_mode", 0) +... + + + + ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:10b86323: influxdbc: convert string value to double
Module: kamailio Branch: master Commit: 10b86323cc47f29b41c21fd601d5b309cca050e6 URL: https://github.com/kamailio/kamailio/commit/10b86323cc47f29b41c21fd601d5b309cca050e6 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-05T16:19:20+01:00 influxdbc: convert string value to double --- Modified: src/modules/influxdbc/influxdbc_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/10b86323cc47f29b41c21fd601d5b309cca050e6.diff Patch: https://github.com/kamailio/kamailio/commit/10b86323cc47f29b41c21fd601d5b309cca050e6.patch --- diff --git a/src/modules/influxdbc/influxdbc_mod.c b/src/modules/influxdbc/influxdbc_mod.c index b1c79b4b494..2c2f8804bb4 100644 --- a/src/modules/influxdbc/influxdbc_mod.c +++ b/src/modules/influxdbc/influxdbc_mod.c @@ -242,6 +242,8 @@ static int w_influxdbc_double(sip_msg_t *msg, char *pname, char *pvalue) return -1; } + dval = strtod(sval.s, NULL); + ic_double(sname.s, dval); return 1; ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:ba2d0e17: influxdbc: docs for several parameters and functions
Module: kamailio Branch: master Commit: ba2d0e171b0171ba98bc7219a420dcda7677d366 URL: https://github.com/kamailio/kamailio/commit/ba2d0e171b0171ba98bc7219a420dcda7677d366 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-05T16:19:20+01:00 influxdbc: docs for several parameters and functions --- Modified: src/modules/influxdbc/doc/influxdbc_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/ba2d0e171b0171ba98bc7219a420dcda7677d366.diff Patch: https://github.com/kamailio/kamailio/commit/ba2d0e171b0171ba98bc7219a420dcda7677d366.patch --- diff --git a/src/modules/influxdbc/doc/influxdbc_admin.xml b/src/modules/influxdbc/doc/influxdbc_admin.xml index c59fe92a126..a02af97e048 100644 --- a/src/modules/influxdbc/doc/influxdbc_admin.xml +++ b/src/modules/influxdbc/doc/influxdbc_admin.xml @@ -68,6 +68,44 @@ ... modparam("influxdbc", "server", "127.0.0.1") ... + + + + + port (int) + + Address of InfluxDB server. + + + + Default value is 8086. + + + + Set port parameter + +... +modparam("influxdbc", "port", 8808) +... + + + + + database (int) + + Database of InfluxDB server. + + + + Default value is empty. + + + + Set database parameter + +... +modparam("influxdbc", "database", "stats") +... @@ -86,7 +124,7 @@ modparam("influxdbc", "server", "127.0.0.1") This function can be used from ANY_ROUTE. - async_route usage + influxdbc_measure() usage ... request_route { @@ -95,6 +133,53 @@ request_route { ... } ... + + + + + + influxdbc_measureend() + + + End the current measure group. + + + This function can be used from ANY_ROUTE. + + + influxdbc_measureend() usage + +... +request_route { +... +influxdbc_measureend(); +... +} +... + + + + + + influxdbc_long(name, value) + + + Save the pair with provided name and value. Both parameters can + have variables. + + + This function can be used from ANY_ROUTE. + + + influxdbc_long() usage + +... +request_route { +... +influxdbc_long("active", "$shv(active)"); +... +} +... ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: git:master:ba921b21: core/rthread.h: add prototype for db queries
Hello, by latest commits, I notice that more functions need to be executed in another thread when having to deal libssl3. I wonder if it is not an alternative to run only the tls module functions in other threads? If not, maybe we can introduce a global parameter (or per module) that makes this wrapper functions to execute directly or through another thread. There are cases when it is no need to run through different threads. Cheers, Daniel On 06.02.24 03:40, S-P Chan via sr-dev wrote: > Module: kamailio > Branch: master > Commit: ba921b2112e87625fba5789d1b049161bb611073 > URL: > https://github.com/kamailio/kamailio/commit/ba921b2112e87625fba5789d1b049161bb611073 > > Author: S-P Chan > Committer: S-P Chan > Date: 2024-02-06T10:17:53+08:00 > > core/rthread.h: add prototype for db queries > > --- > > Modified: src/core/rthreads.h > > --- > > Diff: > https://github.com/kamailio/kamailio/commit/ba921b2112e87625fba5789d1b049161bb611073.diff > Patch: > https://github.com/kamailio/kamailio/commit/ba921b2112e87625fba5789d1b049161bb611073.patch > > --- > > diff --git a/src/core/rthreads.h b/src/core/rthreads.h > index a5ad7670dae..a416ad2ca50 100644 > --- a/src/core/rthreads.h > +++ b/src/core/rthreads.h > @@ -98,3 +98,60 @@ static void run_threadV(_thread_protoV fn) > pthread_join(tid, NULL); > } > #endif > + > +/* > + * prototype: int fn(void *, void *) { ... } > + */ > +#ifdef KSR_RTHREAD_NEED_4PP > +typedef int (*_thread_proto4PP)(void *, void *); > +struct _thread_args4PP > +{ > + _thread_proto4PP fn; > + void *arg1; > + void *arg2; > + int *ret; > +}; > +static void *run_thread_wrap4PP(struct _thread_args4PP *args) > +{ > + *args->ret = (*args->fn)(args->arg1, args->arg2); > + return NULL; > +} > + > +static int run_thread4PP(_thread_proto4PP fn, void *arg1, void *arg2) > +{ > + pthread_t tid; > + int ret; > + > + pthread_create(&tid, NULL, (_thread_proto)run_thread_wrap4PP, > + &(struct _thread_args4PP){fn, arg1, arg2, &ret}); > + pthread_join(tid, NULL); > + > + return ret; > +} > +#endif > + > +/* > + * prototype: void fn(void *) { ... } > + */ > +#ifdef KSR_RTHREAD_NEED_0P > +typedef void (*_thread_proto0P)(void *); > +struct _thread_args0P > +{ > + _thread_proto0P fn; > + void *arg1; > +}; > +static void *run_thread_wrap0P(struct _thread_args0P *args) > +{ > + (*args->fn)(args->arg1); > + return NULL; > +} > + > +static void run_thread0P(_thread_proto0P fn, void *arg1) > +{ > + pthread_t tid; > + > + pthread_create(&tid, NULL, (_thread_proto)run_thread_wrap0P, > + &(struct _thread_args0P){fn, arg1}); > + pthread_join(tid, NULL); > +} > +#endif > > ___ > Kamailio (SER) - Development Mailing List > To unsubscribe send an email to sr-dev-le...@lists.kamailio.org -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio Advanced Training, February 20-22, 2024 -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] [DRAFT]: restrict thread execution to process_no = 0 (PR #3744)
@space88man: regarding the above comment, you tagged the wrong Henning in the PR description, the one involved in Kamailio development is @henningw. The patch in PR seems ok, just wait a bit till merging just in case someone else wants to take a look. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3744#issuecomment-1929553161 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:4d6e37fa: core: added tls_threads_mode global parameter
Module: kamailio Branch: master Commit: 4d6e37fa048a1aaa2d2fc6655985b4bcb9754258 URL: https://github.com/kamailio/kamailio/commit/4d6e37fa048a1aaa2d2fc6655985b4bcb9754258 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-06T14:24:08+01:00 core: added tls_threads_mode global parameter - control how to execute functions that may be using libssl3 behind --- Modified: src/core/cfg.lex Modified: src/core/cfg.y Modified: src/core/globals.h Modified: src/main.c --- Diff: https://github.com/kamailio/kamailio/commit/4d6e37fa048a1aaa2d2fc6655985b4bcb9754258.diff Patch: https://github.com/kamailio/kamailio/commit/4d6e37fa048a1aaa2d2fc6655985b4bcb9754258.patch --- diff --git a/src/core/cfg.lex b/src/core/cfg.lex index be4467efa88..aa998d37985 100644 --- a/src/core/cfg.lex +++ b/src/core/cfg.lex @@ -442,6 +442,7 @@ TCP_WAIT_DATA "tcp_wait_data" TCP_SCRIPT_MODE"tcp_script_mode" DISABLE_TLS"disable_tls"|"tls_disable" ENABLE_TLS "enable_tls"|"tls_enable" +TLS_THREADS_MODE "tls_threads_mode" TLSLOG "tlslog"|"tls_log" TLS_PORT_NO"tls_port_no" TLS_METHOD "tls_method" @@ -960,6 +961,7 @@ IMPORTFILE "import_file" {TCP_SCRIPT_MODE} { count(); yylval.strval=yytext; return TCP_SCRIPT_MODE; } {DISABLE_TLS} { count(); yylval.strval=yytext; return DISABLE_TLS; } {ENABLE_TLS} { count(); yylval.strval=yytext; return ENABLE_TLS; } +{TLS_THREADS_MODE}{ count(); yylval.strval=yytext; return TLS_THREADS_MODE; } {TLSLOG} { count(); yylval.strval=yytext; return TLS_PORT_NO; } {TLS_PORT_NO} { count(); yylval.strval=yytext; return TLS_PORT_NO; } {TLS_METHOD} { count(); yylval.strval=yytext; return TLS_METHOD; } diff --git a/src/core/cfg.y b/src/core/cfg.y index c357faa927d..799c95697df 100644 --- a/src/core/cfg.y +++ b/src/core/cfg.y @@ -472,6 +472,7 @@ extern char *default_routename; %token TCP_SCRIPT_MODE %token DISABLE_TLS %token ENABLE_TLS +%token TLS_THREADS_MODE %token TLSLOG %token TLS_PORT_NO %token TLS_METHOD @@ -1467,6 +1468,14 @@ assign_stm: #endif } | ENABLE_TLS EQUAL error { yyerror("boolean value expected"); } + | TLS_THREADS_MODE EQUAL NUMBER { + #ifdef USE_TLS + ksr_tls_threads_mode = $3; + #else + warn("tls support not compiled in"); + #endif + } + | TLS_THREADS_MODE EQUAL error { yyerror("int value expected"); } | TLSLOG EQUAL NUMBER { #ifdef CORE_TLS tls_log=$3; diff --git a/src/core/globals.h b/src/core/globals.h index f8b77edb328..0ec87c89a12 100644 --- a/src/core/globals.h +++ b/src/core/globals.h @@ -109,6 +109,7 @@ extern int ksr_tcp_script_mode; #ifdef USE_TLS extern int tls_disable; extern unsigned short tls_port_no; +extern int ksr_tls_threads_mode; #endif #ifdef USE_SCTP extern int sctp_disable; diff --git a/src/main.c b/src/main.c index fc1570c3b7a..1856bf7bc03 100644 --- a/src/main.c +++ b/src/main.c @@ -338,8 +338,9 @@ int tcp_disable = 0; /* 1 if tcp is disabled */ int tls_disable = 0; /* tls enabled by default */ #else int tls_disable = 1; /* tls disabled by default */ -#endif /* CORE_TLS */ -#endif /* USE_TLS */ +#endif /* CORE_TLS */ +int ksr_tls_threads_mode = 0; /* threads execution mode for tls with libssl */ +#endif /* USE_TLS */ #ifdef USE_SCTP int sctp_children_no = 0; int sctp_disable = 2; /* 1 if sctp is disabled, 2 if auto mode, 0 enabled */ ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: git:master:ba921b21: core/rthread.h: add prototype for db queries
Hello Richard, I added the global parameter tls_threads_mode, I consider to reflect better the purpose than the proposed enable_tls_threads. In the code it is the global variable ksr_tls_threads_mode which is exposed via core/globals.h -- you can see commit: - https://github.com/kamailio/kamailio/commit/4d6e37fa048a1aaa2d2fc6655985b4bcb9754258 Cheers, Daniel On 06.02.24 12:20, Richard Chan wrote: > Hi Daniel / Henning, > > I would like to propose a global config to restore the non-threaded > default: > > enable_tls = no|yes #(EXISTING) boolean > enable_tls_threads = 0 | 1 | 2 #(NEW) int > > 0: disable thread-wrappers (restores kamailio behaviour) > - default when enable_tls = no > > 1: thread-wrapper only for process_no = 0 (main process) > - default when enable_tls = yes > > 2: thread-wrapper on for all processes > > Now the behaviour for the thread wrappers can be > > /* pseudo-code > * fn is the wrapped function */ > run_thread (fn, ...) > { > int flag = cfg_get_tls_threads(); > if (likely(flag == 0 || (flag == 1 && process_no != 0))) { > return fn(...) ; // execute wrapped function directly - no thread > } else { /* flag == 2 ||( flag == 1 && process_no == 0) */ > /* > ** run fn in thread > */ > } > > I am not familiar with the bison grammar or parsing of the global > config file — I would need your help (or another developer familiar > with the core parsing) to set this up. When this cfg flag is available > I can change all the thread-runners to check the global config. > > With respect to 5.7 - stable branch - unfortunately due to the changes > to OpenSSL 3 it is broken - #3635 - with more load there will be > double-free errors; #3727 - cannot load tls and db module (even if the > db module does not use TLS it may initialize OpenSSL). > > The changes while more intrusive than usual are the minimal viable set > of changes. With the commits on 5.7 you can have a TLS-enabled > /etc/kamailio.cfg using OpenSSL 3 and load a db module (with or > without TLS). To reiterate - even a pure in-memory TLS proxy without > database is subject to double free corruption. > > To make the changes less intrusive: backport the global > enable_tls_threads config to 5.7.5+ or make the thread wrappers check > for process_no = 0. The latter (and more minimal) change would mean > that all Kamailio workers will have the existing behaviour and only > process_no = 0 tries to run thread wrappers. > > Options: > A 5.8-pre:. add a global config enable_tls_threads to 5.8-pre (need > help on this part - the thread wrappers I would be able to fix) > B. 5.7.5+: backport A to 5.7 OR check for process_no = 0 in thread > wrappers(only change in parent process, no change to worker processes) > > Let me know what you think - thanks for the comments. > > Cheers > Richard > > > > > > > > > > > > -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio Advanced Training, February 20-22, 2024 -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] DRAFT: new global config var to constrain thread wrapping (PR #3745)
Looks like we were working in parallel and I pushed a commit to add the global parameter with the name `tls_threads_mode` (internal global variable `ksr_tls_threads_mode`). I also replied to the email on sr-dev where you asked for assistance on it. Maybe you can amend your code to use the global parameter that I added because I consider it to reflect better its scope. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3745#issuecomment-1929632724 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:5844207c: influxdbc: functions for kemi framework
Module: kamailio Branch: master Commit: 5844207ce42ef830fe560e408c6e807184c8d31e URL: https://github.com/kamailio/kamailio/commit/5844207ce42ef830fe560e408c6e807184c8d31e Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-08T16:31:19+01:00 influxdbc: functions for kemi framework --- Modified: src/modules/influxdbc/influxdbc_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/5844207ce42ef830fe560e408c6e807184c8d31e.diff Patch: https://github.com/kamailio/kamailio/commit/5844207ce42ef830fe560e408c6e807184c8d31e.patch --- diff --git a/src/modules/influxdbc/influxdbc_mod.c b/src/modules/influxdbc/influxdbc_mod.c index 0ec502a7d71..90f6107ac68 100644 --- a/src/modules/influxdbc/influxdbc_mod.c +++ b/src/modules/influxdbc/influxdbc_mod.c @@ -165,6 +165,16 @@ static int w_influxdbc_measure(sip_msg_t *msg, char *pname, char *p2) return 1; } +/** + * + */ +static int ki_influxdbc_measure(sip_msg_t *msg, str *name) +{ + ic_measure(name->s); + + return 1; +} + /** * */ @@ -175,6 +185,16 @@ static int w_influxdbc_measureend(sip_msg_t *msg, char *p1, char *p2) return 1; } +/** + * + */ +static int ki_influxdbc_measureend(sip_msg_t *msg) +{ + ic_measureend(); + + return 1; +} + /** * */ @@ -212,6 +232,16 @@ static int w_influxdbc_push(sip_msg_t *msg, char *p1, char *p2) return 1; } +/** + * + */ +static int ki_influxdbc_push(sip_msg_t *msg) +{ + ic_push(); + + return 1; +} + /** * */ @@ -234,6 +264,16 @@ static int w_influxdbc_long(sip_msg_t *msg, char *pname, char *pvalue) return 1; } +/** + * + */ +static int ki_influxdbc_long(sip_msg_t *msg, str *name, int val) +{ + ic_long(name->s, val); + + return 1; +} + /** * */ @@ -288,6 +328,27 @@ static int w_influxdbc_double(sip_msg_t *msg, char *pname, char *pvalue) */ /* clang-format off */ static sr_kemi_t sr_kemi_influxdbc_exports[] = { +{ str_init("influxdbc"), str_init("measure"), +SR_KEMIP_INT, ki_influxdbc_measure, +{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE, +SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } +}, +{ str_init("influxdbc"), str_init("measureend"), +SR_KEMIP_INT, ki_influxdbc_measureend, +{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE, +SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } +}, +{ str_init("influxdbc"), str_init("ic_long"), +SR_KEMIP_INT, ki_influxdbc_long, +{ SR_KEMIP_STR, SR_KEMIP_INT, SR_KEMIP_NONE, +SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE } +}, +{ str_init("influxdbc"), str_init("push"), +SR_KEMIP_INT, ki_influxdbc_push, +{ 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 */ ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:c8306ceb: influxdb: added missing for sub start and end
Module: kamailio Branch: master Commit: c8306ceb46c201172f84f72e5566922c22578fc2 URL: https://github.com/kamailio/kamailio/commit/c8306ceb46c201172f84f72e5566922c22578fc2 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-08T08:02:49+01:00 influxdb: added missing for sub start and end --- Modified: src/modules/influxdbc/influxdbc_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/c8306ceb46c201172f84f72e5566922c22578fc2.diff Patch: https://github.com/kamailio/kamailio/commit/c8306ceb46c201172f84f72e5566922c22578fc2.patch --- diff --git a/src/modules/influxdbc/influxdbc_mod.c b/src/modules/influxdbc/influxdbc_mod.c index 2c2f8804bb4..0ec502a7d71 100644 --- a/src/modules/influxdbc/influxdbc_mod.c +++ b/src/modules/influxdbc/influxdbc_mod.c @@ -47,6 +47,8 @@ static char *_infdbc_tags = NULL; static int w_influxdbc_measure(sip_msg_t *msg, char *pname, char *p2); static int w_influxdbc_measureend(sip_msg_t *msg, char *p1, char *p2); +static int w_influxdbc_sub(sip_msg_t *msg, char *pname, char *p2); +static int w_influxdbc_subend(sip_msg_t *msg, char *p1, char *p2); static int w_influxdbc_push(sip_msg_t *msg, char *p1, char *p2); static int w_influxdbc_long(sip_msg_t *msg, char *pname, char *pvalue); static int w_influxdbc_string(sip_msg_t *msg, char *pname, char *pvalue); @@ -62,6 +64,10 @@ static cmd_export_t cmds[] = { 1, fixup_spve_null, 0, ANY_ROUTE}, {"influxdbc_measureend", (cmd_function)w_influxdbc_measureend, 0, 0, 0, ANY_ROUTE}, + {"influxdbc_sub", (cmd_function)w_influxdbc_sub, + 1, fixup_spve_null, 0, ANY_ROUTE}, + {"influxdbc_subend", (cmd_function)w_influxdbc_subend, + 0, 0, 0, ANY_ROUTE}, {"influxdbc_push", (cmd_function)w_influxdbc_push, 0, 0, 0, ANY_ROUTE}, {"influxdbc_long", (cmd_function)w_influxdbc_long, @@ -169,6 +175,33 @@ static int w_influxdbc_measureend(sip_msg_t *msg, char *p1, char *p2) return 1; } +/** + * + */ +static int w_influxdbc_sub(sip_msg_t *msg, char *pname, char *p2) +{ + str sname; + + if(fixup_get_svalue(msg, (gparam_t *)pname, &sname) != 0) { + LM_ERR("unable to get name parameter\n"); + return -1; + } + + ic_sub(sname.s); + + return 1; +} + +/** + * + */ +static int w_influxdbc_subend(sip_msg_t *msg, char *p1, char *p2) +{ + ic_subend(); + + return 1; +} + /** * */ ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] tools/kemi: update kemi_mock for python (PR #3751)
Fine to merge it. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3751#issuecomment-1934871905 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] file_out: Add support for extensions and interval per file. (PR #3750)
If nobody has comments on code, being a new module in this series, it can be merged till branch 5.8 is created. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3750#issuecomment-1934876134 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] ldap: option to start even when connecting to ldap server fails (PR #3747)
It is rather the common to stop starting kamailio if connection to backend fails, that's the common afaik, although couple of modules allow to start without being able to connect to backend. Not having the backend available is very likely to have the routing fail as well. Anyhow, overall, I am not against to merge it till the 4.8 branch is created. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3747#issuecomment-1934909974 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] RTPengine call was not terminated on BYE (Issue #3749)
At this phase this is something to discuss on users mailing lists (sr-us...@lists.kamailio.org), it is not a clear report of a bug in the C code, but rather something to sort out how your config is written, whether the function is executed or not, in which block, what debug messages say, etc ... When it is clear discovered that it is about an issue in the C code, then the tracker can be used to describe it. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3749#issuecomment-1935431634 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] RTPengine call was not terminated on BYE (Issue #3749)
Closed #3749 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3749#event-11754554016 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Kamailio segfaults when KEMI functions are invoked from app_python script (Issue #3746)
Try to get a core dump file and then get the full backtrace and past it here, it is useful for troubleshooting: - https://www.kamailio.org/wikidocs/tutorials/troubleshooting/coredumpfile/#how-to-get-core-files Also, add the snippet of the python code that causes the crash. On the other hand, you should switch to using app_python3 or app_python3s, the app_python is for Python2 which is no longer supported, so this module might get also deprecated very soon. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3746#issuecomment-1935445222 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Segfault in pua_dialoginfo.c when starting up with a dialog in the database (Issue #3743)
The corefile from where you got the attached backtrace is generated at shut down, it is not the one that caused the crash, but a side effect as the structures might be compromised at that phase. Practically the above backtrace does not reflect the reason of the real crash. You have to enable core file per pid and get the backtraces from all core files. >From the log messages, there is a hint that the R-URI is invalid, maybe you do >some operations in config that break it. Anyhow, it would be good to get it >caught, crashing should not happen even with a config-made invalid R-URI. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3743#issuecomment-1935454766 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:f2772bd0: influxdbc: function to add double value as divison of int numbers
Module: kamailio Branch: master Commit: f2772bd0248a1e75a82f4cad55280fa2b4f98578 URL: https://github.com/kamailio/kamailio/commit/f2772bd0248a1e75a82f4cad55280fa2b4f98578 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-10T22:28:26+01:00 influxdbc: function to add double value as divison of int numbers --- Modified: src/modules/influxdbc/influxdbc_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/f2772bd0248a1e75a82f4cad55280fa2b4f98578.diff Patch: https://github.com/kamailio/kamailio/commit/f2772bd0248a1e75a82f4cad55280fa2b4f98578.patch --- diff --git a/src/modules/influxdbc/influxdbc_mod.c b/src/modules/influxdbc/influxdbc_mod.c index 90f6107ac68..5261b5ea5c4 100644 --- a/src/modules/influxdbc/influxdbc_mod.c +++ b/src/modules/influxdbc/influxdbc_mod.c @@ -53,6 +53,8 @@ static int w_influxdbc_push(sip_msg_t *msg, char *p1, char *p2); static int w_influxdbc_long(sip_msg_t *msg, char *pname, char *pvalue); static int w_influxdbc_string(sip_msg_t *msg, char *pname, char *pvalue); static int w_influxdbc_double(sip_msg_t *msg, char *pname, char *pvalue); +static int w_influxdbc_division( + sip_msg_t *msg, char *pname, char *pdividend, char *pdivisor); static int mod_init(void); static int child_init(int); @@ -76,6 +78,8 @@ static cmd_export_t cmds[] = { 2, fixup_spve_spve, 0, ANY_ROUTE}, {"influxdbc_double", (cmd_function)w_influxdbc_double, 2, fixup_spve_spve, 0, ANY_ROUTE}, + {"influxdbc_division", (cmd_function)w_influxdbc_division, + 3, fixup_sii, fixup_free_sii, ANY_ROUTE}, {0, 0, 0, 0, 0, 0} }; @@ -323,6 +327,38 @@ static int w_influxdbc_double(sip_msg_t *msg, char *pname, char *pvalue) } +/** + * + */ +static int w_influxdbc_division( + sip_msg_t *msg, char *pname, char *pdividend, char *pdivisor) +{ + str sname; + int idividend; + int idivisor; + + if(fixup_get_svalue(msg, (gparam_t *)pname, &sname) != 0) { + LM_ERR("unable to get name parameter\n"); + return -1; + } + if(fixup_get_ivalue(msg, (gparam_t *)pdividend, &idividend) != 0) { + LM_ERR("unable to get dividend parameter\n"); + return -1; + } + if(fixup_get_ivalue(msg, (gparam_t *)pdivisor, &idivisor) != 0) { + LM_ERR("unable to get divisor parameter\n"); + return -1; + } + if(idivisor == 0) { + ic_double(sname.s, 0.0); + return 1; + } + + ic_double(sname.s, (double)idividend / (double)idivisor); + + return 1; +} + /** * */ ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:ce437384: core: helper fixup functions for (str, str, int) parameters
Module: kamailio Branch: master Commit: ce437384ce13bb78b01d3d18f9ddfdd6b8e37fa5 URL: https://github.com/kamailio/kamailio/commit/ce437384ce13bb78b01d3d18f9ddfdd6b8e37fa5 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-10T22:28:26+01:00 core: helper fixup functions for (str, str, int) parameters --- Modified: src/core/mod_fix.c Modified: src/core/mod_fix.h --- Diff: https://github.com/kamailio/kamailio/commit/ce437384ce13bb78b01d3d18f9ddfdd6b8e37fa5.diff Patch: https://github.com/kamailio/kamailio/commit/ce437384ce13bb78b01d3d18f9ddfdd6b8e37fa5.patch --- diff --git a/src/core/mod_fix.c b/src/core/mod_fix.c index ecd870c0ca5..10be560982f 100644 --- a/src/core/mod_fix.c +++ b/src/core/mod_fix.c @@ -843,6 +843,38 @@ int fixup_free_ssi(void **param, int param_no) } } +/** + * + */ +int fixup_sii(void **param, int param_no) +{ + switch(param_no) { + case 1: + return fixup_spve_null(param, 1); + case 2: + case 3: + return fixup_igp_null(param, 1); + default: + return E_UNSPEC; + } +} + +/** + * + */ +int fixup_free_sii(void **param, int param_no) +{ + switch(param_no) { + case 1: + return fixup_free_spve_null(param, 1); + case 2: + case 3: + return fixup_free_igp_null(param, 1); + default: + return E_UNSPEC; + } +} + /** * */ diff --git a/src/core/mod_fix.h b/src/core/mod_fix.h index a76d64f0ce7..3143f060426 100644 --- a/src/core/mod_fix.h +++ b/src/core/mod_fix.h @@ -168,6 +168,9 @@ int fixup_free_igp_regexp(void **param, int param_no); int fixup_ssi(void **param, int param_no); int fixup_free_ssi(void **param, int param_no); +int fixup_sii(void **param, int param_no); +int fixup_free_sii(void **param, int param_no); + int fixup_sssi(void **param, int param_no); int fixup_free_sssi(void **param, int param_no); ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:7e1f521f: influxdbc: docs for a couple of existing functions
Module: kamailio Branch: master Commit: 7e1f521f2086b50b3ad73bc19ea98deb18686e82 URL: https://github.com/kamailio/kamailio/commit/7e1f521f2086b50b3ad73bc19ea98deb18686e82 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-12T08:17:50+01:00 influxdbc: docs for a couple of existing functions --- Modified: src/modules/influxdbc/doc/influxdbc_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/7e1f521f2086b50b3ad73bc19ea98deb18686e82.diff Patch: https://github.com/kamailio/kamailio/commit/7e1f521f2086b50b3ad73bc19ea98deb18686e82.patch --- diff --git a/src/modules/influxdbc/doc/influxdbc_admin.xml b/src/modules/influxdbc/doc/influxdbc_admin.xml index a02af97e048..e6560bc0d69 100644 --- a/src/modules/influxdbc/doc/influxdbc_admin.xml +++ b/src/modules/influxdbc/doc/influxdbc_admin.xml @@ -156,6 +156,75 @@ request_route { ... } ... + + + + + + influxdbc_sub(name) + + + Start a measure subgroup with the given name. + + + This function can be used from ANY_ROUTE. + + + influxdbc_sub() usage + +... +request_route { +... +influxdbc_sub("grp1"); +... +} +... + + + + + + influxdbc_subend() + + + End the current measure subgroup. + + + This function can be used from ANY_ROUTE. + + + influxdbc_subend() usage + +... +request_route { +... +influxdbc_subend(); +... +} +... + + + + + + influxdbc_push() + + + Push accumulated values to the server. + + + This function can be used from ANY_ROUTE. + + + influxdbc_push() usage + +... +request_route { +... +influxdbc_push(); +... +} +... ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] User id conflict between kamctl et. al. and Linux OS installations (Issue #3752)
The `kamctl start|stop|restart` is provided as a basic non-unix/linux-standard way to start stop kamailio. It should not be mixed with other start/stop systems such as init.d or systemd. While you encounter the issue on an OS using systemd, there are other OSes still using init.d or maybe even other start/stop systems. Kamailio can also be started by hand from terminal, like running just `kamailio` or with cli parameters `kamailio -f /etc/kamailio/kamailio.cfg -w /run/kamailio -m 128 -M 12 ...` I think it will be rather complex for kamctl to figure out how kamailio was started (or how it was supposed to be started on that OS) in order have all start/stop variants working all the time. If someone wants to undertake such task, he/she is welcome to make a pull request. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3752#issuecomment-1938350964 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] registrar: Consider changing default setting for case matching of username (Issue #3719)
Iirc, the decision to make it case insensitive by default, unlike the RFC specifies, because of user experience when using names as user identity. Usually the UA (e.g., desktop or smartphone app) they do autocorrect to camel-case the names. So if one wants to dial `alice`, the app is changing it to `Alice`. It was also considered that having `alice` and `Alice` as different users to be unlikely desirable. Moreover, for telephone numbers, matching is the same. In the context of random-gemerated alphanumeric user ids, it can lead to conflicts indeed. However, as this setting has this value for very long time, I would rather keep it as it is, because there were not many complaints about it in the past. Changing it may bring some unexpected call failures for existing deployments. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3719#issuecomment-1938376837 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Kamailio 5.6 (and 5.7) core dumps with uac_req_send() from uac module (Issue #3725)
Can you install debugging symbols for Kamailio and retake the backtrace with gdb? The one above does not show the details of the code during the execution. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3725#issuecomment-1941230202 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Consider adding socket options SO_BINDTODEVICE when the interface name is given for listen in the config file (Issue #3716)
Kamailio needs to know the IP address of the socket in order to set in the SIP routing headers. When interface name is provided, Kamailio discovers its IP address to listen on it. If SO_BINDTODEVICE can be done with preserving proper working for SIP routing, then anyone is welcome to make a PR with such addition. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3716#issuecomment-1941311368 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: Roadmap to next major Kamailio release series v5.8.x
Hello, hopefully the devel version is now more stabilized after the freezing, the new components being adjusted enough not to need many more changes. Therefore I consider to branch 5.8 out of devel version next week on Friday, February 23, 2024, sometime around noon UTC. After that the master branch becomes open for new features, and branch 5.8 has to be hammered further to build the 5.8.x series. Cheers, Daniel On 10.01.24 10:11, Daniel-Constantin Mierla wrote: > Hello, > > discussed a bit during the online Kamailio devel meeting, it is time to > set the milestones towards the next major Kamailio release series v5.8.x. > > If no other suggestions that suit more developers, I would propose to > freeze by end of this month or early February, then test for about 4 > weeks as usual and release by end of February or during March. > > If anyone wants to add new features/modules, they have to be published > till freezing date, either pushed in the git repository or proposed as > pull request. > > Cheers, > Daniel -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio Advanced Training, February 20-22, 2024 -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:e3e6fd75: core: tcp - skip checking when tcp_accept_iplimit is 0
Module: kamailio Branch: master Commit: e3e6fd75bdd688acebf0ec8a1b7efa6fcada1de6 URL: https://github.com/kamailio/kamailio/commit/e3e6fd75bdd688acebf0ec8a1b7efa6fcada1de6 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-19T22:24:21+01:00 core: tcp - skip checking when tcp_accept_iplimit is 0 --- Modified: src/core/tcp_main.c --- Diff: https://github.com/kamailio/kamailio/commit/e3e6fd75bdd688acebf0ec8a1b7efa6fcada1de6.diff Patch: https://github.com/kamailio/kamailio/commit/e3e6fd75bdd688acebf0ec8a1b7efa6fcada1de6.patch --- diff --git a/src/core/tcp_main.c b/src/core/tcp_main.c index 35034d1baa8..757329a8543 100644 --- a/src/core/tcp_main.c +++ b/src/core/tcp_main.c @@ -1169,6 +1169,10 @@ int tcp_connection_limit_srcip(union sockaddr_union *srcaddr, int limit) int n; int i; + if(limit <= 0) { + return 0; + } + n = 0; su2ip_addr(&src_ip, srcaddr); TCPCONN_LOCK; ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] performance regression related to new TCP connection tracking feature with a high number of connections (Issue #3759)
Is this performance penalty only observed because of new connections being done at a high rate, or even after the large number of connections is established? The limit should be enforced only when accepting new connection, if it does in other cases, it is then some mistake. Disabling this limit checking is indeed good to have, I pushed a commit so in case the parameter is set to 0 or negative value, the limiting is no longer done (e3e6fd75bdd688acebf0ec8a1b7efa6fcada1de6). The commit can be backported if you have the chance to test it and works as expected. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3759#issuecomment-1954702980 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: Roadmap to next major Kamailio release series v5.8.x
Hello, quick note that later today I will create the branch 5.8, notification emails will be sent once done. Cheers, Daniel On 16.02.24 08:01, Daniel-Constantin Mierla wrote: > Hello, > > hopefully the devel version is now more stabilized after the freezing, > the new components being adjusted enough not to need many more changes. > Therefore I consider to branch 5.8 out of devel version next week on > Friday, February 23, 2024, sometime around noon UTC. > > After that the master branch becomes open for new features, and branch > 5.8 has to be hammered further to build the 5.8.x series. > > Cheers, > Daniel > > On 10.01.24 10:11, Daniel-Constantin Mierla wrote: >> Hello, >> >> discussed a bit during the online Kamailio devel meeting, it is time to >> set the milestones towards the next major Kamailio release series v5.8.x. >> >> If no other suggestions that suit more developers, I would propose to >> freeze by end of this month or early February, then test for about 4 >> weeks as usual and release by end of February or during March. >> >> If anyone wants to add new features/modules, they have to be published >> till freezing date, either pushed in the git repository or proposed as >> pull request. >> >> Cheers, >> Daniel > -- > Daniel-Constantin Mierla (@ asipto.com) > twitter.com/miconda -- linkedin.com/in/miconda > Kamailio Consultancy, Training and Development Services -- asipto.com > Kamailio Advanced Training, February 20-22, 2024 -- asipto.com > Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com > -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio Advanced Training, February 20-22, 2024 -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:6948a3cc: microhttpd: added the header return option for pv
Module: kamailio Branch: master Commit: 6948a3cc1f81cd468eae92518215d0fe9178b1e7 URL: https://github.com/kamailio/kamailio/commit/6948a3cc1f81cd468eae92518215d0fe9178b1e7 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-23T12:18:07+01:00 microhttpd: added the header return option for pv --- Modified: src/modules/microhttpd/microhttpd_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/6948a3cc1f81cd468eae92518215d0fe9178b1e7.diff Patch: https://github.com/kamailio/kamailio/commit/6948a3cc1f81cd468eae92518215d0fe9178b1e7.patch --- diff --git a/src/modules/microhttpd/microhttpd_mod.c b/src/modules/microhttpd/microhttpd_mod.c index 692c9e752e2..f1ee8334b8b 100644 --- a/src/modules/microhttpd/microhttpd_mod.c +++ b/src/modules/microhttpd/microhttpd_mod.c @@ -236,6 +236,13 @@ int pv_parse_mhttpd_name(pv_spec_p sp, str *in) } break; default: + if(in->len > 2 && in->s[1] == ':' + && (in->s[0] == 'h' || in->s[0] == 'H')) { + sp->pvp.pvn.type = PV_NAME_INTSTR; + sp->pvp.pvn.u.isname.type = PVT_HDR; + sp->pvp.pvn.u.isname.name.s = *in; + return 0; + } goto error; } sp->pvp.pvn.type = PV_NAME_INTSTR; @@ -254,12 +261,23 @@ int pv_parse_mhttpd_name(pv_spec_p sp, str *in) int pv_get_mhttpd(sip_msg_t *msg, pv_param_t *param, pv_value_t *res) { struct sockaddr *srcaddr = NULL; + const char *hdrval = NULL; + if(param == NULL) { return -1; } if(_ksr_mhttpd_ctx.connection == NULL) { return pv_get_null(msg, param, res); } + if(param->pvn.u.isname.type == PVT_HDR) { + hdrval = MHD_lookup_connection_value(_ksr_mhttpd_ctx.connection, + MHD_HEADER_KIND, param->pvn.u.isname.name.s.s + 2); + if(hdrval == NULL) { + return pv_get_null(msg, param, res); + } + return pv_get_strzval(msg, param, res, (char *)hdrval); + } + switch(param->pvn.u.isname.name.n) { case 0: /* url */ return pv_get_strval(msg, param, res, &_ksr_mhttpd_ctx.url); ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)
I am merging it, then rename the option for FULLADDRSOCK trying to reflect better that socket alone has more priority than port+protocol. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3699#issuecomment-1961172542 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:17536b10: dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching
Module: kamailio Branch: master Commit: 17536b1064b40c305f28c4c19392504afc0b9701 URL: https://github.com/kamailio/kamailio/commit/17536b1064b40c305f28c4c19392504afc0b9701 Author: Dennis Yurasov Committer: Daniel-Constantin Mierla Date: 2024-02-23T12:36:20+01:00 dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching - Two new flgs added: DS_MATCH_SOCKET (8) to take in account socket/sockname attribute of gw DS_MATCH_TRY_FULLADDRSOCK (16) try to find the most complete "address/protocol/port/local socket" combination for all dispatcher targets --- Modified: src/modules/dispatcher/dispatch.c Modified: src/modules/dispatcher/dispatch.h Modified: src/modules/dispatcher/doc/dispatcher_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/17536b1064b40c305f28c4c19392504afc0b9701.diff Patch: https://github.com/kamailio/kamailio/commit/17536b1064b40c305f28c4c19392504afc0b9701.patch ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)
Merged #3699 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3699#event-11902601725 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] extented haproxy protocol support (PR #3731)
Indeed, it would be good to try to find a more generic way to approach this kind of needs to store intermediary hop address. The patch is rather consistent for the core part and couldn't assert the impact so far. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3731#issuecomment-1961178513 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:7e22636b: dispatcher: rename interal define to reflect better is a mix of matching
Module: kamailio Branch: master Commit: 7e22636bb2797f6ed9cac677678a7a1bfc4f2537 URL: https://github.com/kamailio/kamailio/commit/7e22636bb2797f6ed9cac677678a7a1bfc4f2537 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-23T12:53:39+01:00 dispatcher: rename interal define to reflect better is a mix of matching - rather than a full address matching --- Modified: src/modules/dispatcher/dispatch.c Modified: src/modules/dispatcher/dispatch.h --- Diff: https://github.com/kamailio/kamailio/commit/7e22636bb2797f6ed9cac677678a7a1bfc4f2537.diff Patch: https://github.com/kamailio/kamailio/commit/7e22636bb2797f6ed9cac677678a7a1bfc4f2537.patch --- diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index 0a609075a5e..9e27f998c25 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -3605,9 +3605,9 @@ int ds_is_addr_from_set(sip_msg_t *_m, struct ip_addr *pipaddr, if(ip_addr_cmp(pipaddr, ipa) && ((mode & DS_MATCH_NOPORT) || node->dlist[j].port == 0 || tport == node->dlist[j].port - || (mode & DS_MATCH_TRY_FULLADDRSOCK)) + || (mode & DS_MATCH_MIXSOCKPRPORT)) && ((mode & DS_MATCH_NOPROTO) || tproto == node->dlist[j].proto - || (mode & DS_MATCH_TRY_FULLADDRSOCK)) + || (mode & DS_MATCH_MIXSOCKPRPORT)) && (((mode & DS_MATCH_ACTIVE) && !ds_skip_dst(node->dlist[j].flags)) || !(mode & DS_MATCH_ACTIVE)) @@ -3615,7 +3615,7 @@ int ds_is_addr_from_set(sip_msg_t *_m, struct ip_addr *pipaddr, && node->dlist[j].sock == _m->rcv.bind_address) || !node->dlist[j].sock || !(mode & DS_MATCH_SOCKET))) { - if(mode & DS_MATCH_TRY_FULLADDRSOCK) { + if(mode & DS_MATCH_MIXSOCKPRPORT) { node_strictness = DS_MATCHED_ADDR; if(node->dlist[j].port) { if(tport != node->dlist[j].port) @@ -3738,7 +3738,7 @@ int ds_is_addr_from_list(sip_msg_t *_m, int group, str *uri, int mode) } - if(mode & DS_MATCH_TRY_FULLADDRSOCK) { + if(mode & DS_MATCH_MIXSOCKPRPORT) { ds_strictness = 0; ds_strictest_node = NULL; } @@ -3753,7 +3753,7 @@ int ds_is_addr_from_list(sip_msg_t *_m, int group, str *uri, int mode) } } - if(rc == -1 && mode & DS_MATCH_TRY_FULLADDRSOCK && ds_strictest_node) { + if(rc == -1 && (mode & DS_MATCH_MIXSOCKPRPORT) && ds_strictest_node) { rc = ds_set_vars( _m, ds_strictest_node, ds_strictest_idx, group == -1 ? 1 : 0); } diff --git a/src/modules/dispatcher/dispatch.h b/src/modules/dispatcher/dispatch.h index a628a426a61..a887c555932 100644 --- a/src/modules/dispatcher/dispatch.h +++ b/src/modules/dispatcher/dispatch.h @@ -60,7 +60,7 @@ #define DS_MATCH_NOPROTO 2 #define DS_MATCH_ACTIVE4 #define DS_MATCH_SOCKET8 -#define DS_MATCH_TRY_FULLADDRSOCK 16 +#define DS_MATCH_MIXSOCKPRPORT 16 #define DS_SETOP_DSTURI0 #define DS_SETOP_RURI 1 ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:71631908: Makefile.defs: version set to 5.8.0-pre1
Module: kamailio Branch: master Commit: 716319089c3e7bbc4caf9a2454235d77c3a9f88b URL: https://github.com/kamailio/kamailio/commit/716319089c3e7bbc4caf9a2454235d77c3a9f88b Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-23T19:24:55+01:00 Makefile.defs: version set to 5.8.0-pre1 - marking end of first phase of testing --- Modified: src/Makefile.defs --- Diff: https://github.com/kamailio/kamailio/commit/716319089c3e7bbc4caf9a2454235d77c3a9f88b.diff Patch: https://github.com/kamailio/kamailio/commit/716319089c3e7bbc4caf9a2454235d77c3a9f88b.patch --- diff --git a/src/Makefile.defs b/src/Makefile.defs index 0b6086d0a3d..b195c7fe59d 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -107,7 +107,7 @@ INSTALL_FLAVOUR=$(FLAVOUR) VERSION = 5 PATCHLEVEL = 8 SUBLEVEL = 0 -EXTRAVERSION = -pre0 +EXTRAVERSION = -pre1 # memory manager switcher # 0 - f_malloc (fast malloc) ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:48f4da34: Makefile.defs: version set to 5.9.0-dev0
Module: kamailio Branch: master Commit: 48f4da344bd96e9a19b7c99c37d9dfe29de78933 URL: https://github.com/kamailio/kamailio/commit/48f4da344bd96e9a19b7c99c37d9dfe29de78933 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-23T19:28:52+01:00 Makefile.defs: version set to 5.9.0-dev0 - master branch is open for new features to be part of the future major series, to be versioned 5.9.x or maybe 6.0.x --- Modified: src/Makefile.defs --- Diff: https://github.com/kamailio/kamailio/commit/48f4da344bd96e9a19b7c99c37d9dfe29de78933.diff Patch: https://github.com/kamailio/kamailio/commit/48f4da344bd96e9a19b7c99c37d9dfe29de78933.patch --- diff --git a/src/Makefile.defs b/src/Makefile.defs index b195c7fe59d..4165ca084fb 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -105,9 +105,9 @@ INSTALL_FLAVOUR=$(FLAVOUR) # version number VERSION = 5 -PATCHLEVEL = 8 +PATCHLEVEL = 9 SUBLEVEL = 0 -EXTRAVERSION = -pre1 +EXTRAVERSION = -dev0 # memory manager switcher # 0 - f_malloc (fast malloc) ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:5.8:faddcecb: Makefile.defs: version set to 5.8.0-rc0
Module: kamailio Branch: 5.8 Commit: faddcecbf04a0221aa4a2531141571246d043060 URL: https://github.com/kamailio/kamailio/commit/faddcecbf04a0221aa4a2531141571246d043060 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-23T19:35:27+01:00 Makefile.defs: version set to 5.8.0-rc0 - entering the phase to prepare releasing next major version series 5.8.x --- Modified: src/Makefile.defs --- Diff: https://github.com/kamailio/kamailio/commit/faddcecbf04a0221aa4a2531141571246d043060.diff Patch: https://github.com/kamailio/kamailio/commit/faddcecbf04a0221aa4a2531141571246d043060.patch --- diff --git a/src/Makefile.defs b/src/Makefile.defs index b195c7fe59d..62f1dd78273 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -107,7 +107,7 @@ INSTALL_FLAVOUR=$(FLAVOUR) VERSION = 5 PATCHLEVEL = 8 SUBLEVEL = 0 -EXTRAVERSION = -pre1 +EXTRAVERSION = -rc0 # memory manager switcher # 0 - f_malloc (fast malloc) ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Branch 5.8 has been created
Hello, the branch 5.8 has been created, to be used for releasing v5.8.x series. To check out this branch, the following commands can be used: git clone https://github.com/kamailio/kamailio kamailio-5.8 cd kamailio-5.8 git checkout -b 5.8 origin/5.8 Pushing commits in this branch: git push origin 5.8:5.8 Note that 5.8 is an official stable branch, so only bug fixes, missing kemi exports (discuss on sr-dev if not sure) or improvements to documentation or helper tools can be pushed to this branch. As usual, if there is a bug fixed, commit and push first to master branch and then cherry pick to 5.8 branch: git cherry-pick -x COMMITID In few weeks, the first release from branch 5.8 will be out, respectively Kamailio v5.8.0. Cheers, Daniel -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Development is open for future release of v5.9.x series
Hello, the branch 5.8 was created, therefore the master branch is open for adding new features, to be part of future release series v5.9.x (or whatever version is decided for next series). Any bug fix committed to master that applies to 5.8.x or older stable branches should be backported as usual with "git cherry-pick -x ..." to appropriate branches like 5.8 or 5.7. Expect that v5.8.0 will be released in a few weeks from now. Based on the workflow used during the past years, the next future release v5.9.0 should be out after another 8-10 months of development, plus 1-2 months of testing, so sometime during the last part of 2024 or the beginning of 2025. Cheers, Daniel -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: git:master:8b2573c1: OpenSSL integration: manage curl_global_init(...) used by modules
Hello, do not forget that you have to split the commits per component (e.g., core, module, ...): - https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md#commit-message-rules It makes it easier to review by the maintainer of each component as well as for management in case of need to revert, backport, etc ... When I have to deal with same commit that has to be done for many modules, I use a shell script that I edit to change the commit messages and then run in the root folder with Kamailio sources: """ MODS=`git status | grep "modified:" | grep "src/modules/" | awk '{ print $2 }' | awk -F/ '{ print $1 "/" $2 "/" $3 }' | uniq` for M in $MODS do NAME=`echo $M | awk -F/ '{ print $3 }'` echo "module path: $M" echo "module name: $NAME" git ci -n ${M}/ -m "${NAME}: use literal module name for stats group" -m "- prevent conflicts with global exports" done """ For core I do it separately, it is usually a single commit. Also, backporting has to be done using "git cherry-pick -x ...", like at: - https://www.kamailio.org/wikidocs/devel/backporting-to-3.2.x/#backporting-to-branch-32 This helps to track easier what commits were not backported. Cheers, Daniel On 26.02.24 03:41, S-P Chan via sr-dev wrote: > Module: kamailio > Branch: master > Commit: 8b2573c1f7c5e4bed24f8c5ca09817f613641a03 > URL: > https://github.com/kamailio/kamailio/commit/8b2573c1f7c5e4bed24f8c5ca09817f613641a03 > > Author: S-P Chan > Committer: S-P Chan > Date: 2024-02-26T10:40:19+08:00 > > OpenSSL integration: manage curl_global_init(...) used by modules > > - http_client, http_async_client, xcap_client use libcurl > - call curl_global_init in a thread executor as it invokes > OpenSSL functions on Debian 12 > - clang-format > > --- > > Modified: src/core/rthreads.h > Modified: src/modules/http_async_client/http_multi.c > Modified: src/modules/http_client/http_client.c > Modified: src/modules/xcap_client/xcap_client.c > > --- > > Diff: > https://github.com/kamailio/kamailio/commit/8b2573c1f7c5e4bed24f8c5ca09817f613641a03.diff > Patch: > https://github.com/kamailio/kamailio/commit/8b2573c1f7c5e4bed24f8c5ca09817f613641a03.patch > > ___ > Kamailio (SER) - Development Mailing List > To unsubscribe send an email to sr-dev-le...@lists.kamailio.org -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:65eef5c5: evrexec: reformat exported structures
Module: kamailio Branch: master Commit: 65eef5c5446c1f6870eecf8bbc84d68d12271bc7 URL: https://github.com/kamailio/kamailio/commit/65eef5c5446c1f6870eecf8bbc84d68d12271bc7 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-26T07:29:26+01:00 evrexec: reformat exported structures --- Modified: src/modules/evrexec/evrexec_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/65eef5c5446c1f6870eecf8bbc84d68d12271bc7.diff Patch: https://github.com/kamailio/kamailio/commit/65eef5c5446c1f6870eecf8bbc84d68d12271bc7.patch --- diff --git a/src/modules/evrexec/evrexec_mod.c b/src/modules/evrexec/evrexec_mod.c index 96493da0fda..3fb99535a0a 100644 --- a/src/modules/evrexec/evrexec_mod.c +++ b/src/modules/evrexec/evrexec_mod.c @@ -74,29 +74,33 @@ void evrexec_process_socket(evrexec_task_t *it, int idx); static int pv_get_evr(sip_msg_t *msg, pv_param_t *param, pv_value_t *res); static int pv_parse_evr_name(pv_spec_p sp, str *in); +/* clang-format off */ static param_export_t params[] = { - {"exec", PARAM_STRING | USE_FUNC_PARAM, (void *)evrexec_param}, - {0, 0, 0}}; + {"exec", PARAM_STRING | USE_FUNC_PARAM, (void *)evrexec_param}, + {0, 0, 0} +}; static pv_export_t mod_pvs[] = { - {{"evr", (sizeof("evr") - 1)}, PVT_OTHER, pv_get_evr, 0, - pv_parse_evr_name, 0, 0, 0}, + {{"evr", (sizeof("evr") - 1)}, PVT_OTHER, pv_get_evr, 0, + pv_parse_evr_name, 0, 0, 0}, - {{0, 0}, 0, 0, 0, 0, 0, 0, 0}}; + {{0, 0}, 0, 0, 0, 0, 0, 0, 0} +}; /** module exports */ struct module_exports exports = { - "evrexec", /* module name */ - DEFAULT_DLFLAGS, /* dlopen flags */ - 0, /* exported functions */ - params, /* exported parameters */ - 0, /* RPC method exports */ - mod_pvs, /* exported pseudo-variables */ - 0, /* response handling function */ - mod_init,/* module initialization function */ - child_init, /* per-child init function */ - 0/* module destroy function */ + "evrexec", /* module name */ + DEFAULT_DLFLAGS, /* dlopen flags */ + 0, /* exported functions */ + params, /* exported parameters */ + 0, /* RPC method exports */ + mod_pvs, /* exported pseudo-variables */ + 0, /* response handling function */ + mod_init,/* module initialization function */ + child_init, /* per-child init function */ + 0/* module destroy function */ }; +/* clang-format on */ static rpc_export_t evr_rpc_methods[]; @@ -583,5 +587,9 @@ void rpc_evr_run(rpc_t *rpc, void *c) /** * */ +/* clang-format off */ static rpc_export_t evr_rpc_methods[] = { - {"evrexec.run", rpc_evr_run, rpc_evr_run_doc, 0}, {0, 0, 0, 0}}; + {"evrexec.run", rpc_evr_run, rpc_evr_run_doc, 0}, + {0, 0, 0, 0} +}; +/* clang-format on */ ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:fb21f89d: ndb_redis: reformat exported structures
Module: kamailio Branch: master Commit: fb21f89dc544551b1bb65805303131fa990d2f44 URL: https://github.com/kamailio/kamailio/commit/fb21f89dc544551b1bb65805303131fa990d2f44 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-26T07:15:31+01:00 ndb_redis: reformat exported structures --- Modified: src/modules/ndb_redis/ndb_redis_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/fb21f89dc544551b1bb65805303131fa990d2f44.diff Patch: https://github.com/kamailio/kamailio/commit/fb21f89dc544551b1bb65805303131fa990d2f44.patch ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] ndb_reids module in event_route[tcp:closed] route block error: "no redis context for server" (Issue #3768)
My guess is that the event route is executed by tcp-main process and that one has never had the connection to redis, as I looked at the code, it is like that since 2011 or so. Probably what is newer is the log error message. Therefore the question is whether it actually worked to use redis_cmd() in that event rate (it did what it was supposed to do), or it was just no error log message, but the command didn't work? -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3768#issuecomment-1963595956 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] ndb_reids module in event_route[tcp:closed] route block error: "no redis context for server" (Issue #3768)
Can you also provide the output of "kamctl ps" for the same instance from where you get the logs? -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3768#issuecomment-1963704189 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] ndb_reids module in event_route[tcp:closed] route block error: "no redis context for server" (Issue #3768)
That's exactly the code I looked at and said that is there from like 2011, therefore questioning if it really worked differently in 5.4.x vs 5.7.x. The log message might not have been there, but the condition was. If I haven't missed any related commit, it is no major difference in the internal TCP design between 5.4 and 5.7. Anyhow, I will commit an update to initialise the ndb context for tcp-main and look to see if it is needed for the main attendant as well. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3768#issuecomment-1963993740 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:99358301: microhttpd: docs - note about variables available in the event route
Module: kamailio Branch: master Commit: 993583015b127b0a83603acd352925c8d6e6db70 URL: https://github.com/kamailio/kamailio/commit/993583015b127b0a83603acd352925c8d6e6db70 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-26T13:09:27+01:00 microhttpd: docs - note about variables available in the event route --- Modified: src/modules/microhttpd/doc/microhttpd_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/993583015b127b0a83603acd352925c8d6e6db70.diff Patch: https://github.com/kamailio/kamailio/commit/993583015b127b0a83603acd352925c8d6e6db70.patch --- diff --git a/src/modules/microhttpd/doc/microhttpd_admin.xml b/src/modules/microhttpd/doc/microhttpd_admin.xml index 1967c845b82..c548d0dfc42 100644 --- a/src/modules/microhttpd/doc/microhttpd_admin.xml +++ b/src/modules/microhttpd/doc/microhttpd_admin.xml @@ -157,6 +157,11 @@ event_route[microhttpd:request] { The event route is executed when a new HTTP request is received. + + Inside it, the $mhttpd(...) group of variables is available, giving + access to several attributes of the HTTP request, such as method, + URL, data (body) or headers. + ... ... ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:19e5bf3d: ndb_redis: init enabled for tcp-main and postchildinit callbacks
Module: kamailio Branch: master Commit: 19e5bf3d4cfc2b7d47623e307fff7e60e73e8a18 URL: https://github.com/kamailio/kamailio/commit/19e5bf3d4cfc2b7d47623e307fff7e60e73e8a18 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-26T14:06:38+01:00 ndb_redis: init enabled for tcp-main and postchildinit callbacks - GH #3768 --- Modified: src/modules/ndb_redis/ndb_redis_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/19e5bf3d4cfc2b7d47623e307fff7e60e73e8a18.diff Patch: https://github.com/kamailio/kamailio/commit/19e5bf3d4cfc2b7d47623e307fff7e60e73e8a18.patch --- diff --git a/src/modules/ndb_redis/ndb_redis_mod.c b/src/modules/ndb_redis/ndb_redis_mod.c index d082bd82ae8..8256c0a619a 100644 --- a/src/modules/ndb_redis/ndb_redis_mod.c +++ b/src/modules/ndb_redis/ndb_redis_mod.c @@ -79,8 +79,9 @@ static int w_redis_execute(struct sip_msg *msg, char *ssrv); static int w_redis_free_reply(struct sip_msg *msg, char *res); -static void mod_destroy(void); +static int mod_init(void); static int child_init(int rank); +static void mod_destroy(void); int bind_ndb_redis(ndb_redis_api_t *api); @@ -146,23 +147,37 @@ static param_export_t params[] = { }; struct module_exports exports = { - "ndb_redis", + "ndb_redis",/* module name */ DEFAULT_DLFLAGS,/* dlopen flags */ - cmds, params, 0,/* exported RPC methods */ + cmds, /* exported functions */ + params, /* exported parameters */ + 0, /* exported RPC methods */ mod_pvs,/* exported pseudo-variables */ 0, /* response function */ - 0, /* module initialization function */ + mod_init, /* module initialization function */ child_init, /* per child init function */ mod_destroy /* destroy function */ }; /* clang-format on */ +/** + * + */ +static int mod_init(void) +{ + /* +* register the need to be called post-fork of all children +* with the special rank PROC_POSTCHILDINIT by main attendant +*/ + ksr_module_set_flag(KSRMOD_FLAG_POSTCHILDINIT); + return 0; +} /* each child get a new connection to the database */ static int child_init(int rank) { - /* skip child init for non-worker process ranks */ - if(rank == PROC_INIT || rank == PROC_MAIN || rank == PROC_TCP_MAIN) + /* skip child init for special process ranks */ + if(rank == PROC_INIT || rank == PROC_MAIN) return 0; if(redisc_init() < 0) { ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] ndb_reids module in event_route[tcp:closed] route block error: "no redis context for server" (Issue #3768)
I pushed a commit to git master branch, can you try with it and see if works as expected? -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3768#issuecomment-1964108110 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:59230a07: tcpops: variables to get active connection attributes
Module: kamailio Branch: master Commit: 59230a07b8c6a79c4a574890bae775c3d166c471 URL: https://github.com/kamailio/kamailio/commit/59230a07b8c6a79c4a574890bae775c3d166c471 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-27T07:58:14+01:00 tcpops: variables to get active connection attributes --- Modified: src/modules/tcpops/tcpops_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/59230a07b8c6a79c4a574890bae775c3d166c471.diff Patch: https://github.com/kamailio/kamailio/commit/59230a07b8c6a79c4a574890bae775c3d166c471.patch --- diff --git a/src/modules/tcpops/tcpops_mod.c b/src/modules/tcpops/tcpops_mod.c index d8953c4345f..15e39993d64 100644 --- a/src/modules/tcpops/tcpops_mod.c +++ b/src/modules/tcpops/tcpops_mod.c @@ -762,24 +762,42 @@ static int pv_get_tcp(sip_msg_t *msg, pv_param_t *param, pv_value_t *res) return -1; } - if((con = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0, 0)) == NULL) { - return pv_get_null(msg, param, res); - } switch(param->pvn.u.isname.name.n) { case 1: + sval.s = ip_addr2a(&msg->rcv.src_ip); + sval.len = strlen(sval.s); + return pv_get_strval(msg, param, res, &sval); + case 2: + ival = msg->rcv.src_port; + return pv_get_sintval(msg, param, res, ival); + case 3: + if((con = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0, 0)) + == NULL) { + return pv_get_null(msg, param, res); + } sval.s = ip_addr2a(&con->cinfo.src_ip); tcpconn_put(con); sval.len = strlen(sval.s); return pv_get_strval(msg, param, res, &sval); - case 2: + case 4: + if((con = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0, 0)) + == NULL) { + return pv_get_null(msg, param, res); + } ival = con->cinfo.src_port; tcpconn_put(con); return pv_get_sintval(msg, param, res, ival); - default: + case 5: + if((con = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0, 0)) + == NULL) { + return pv_get_null(msg, param, res); + } ival = con->id; tcpconn_put(con); return pv_get_sintval(msg, param, res, ival); + default: + return pv_get_sintval(msg, param, res, msg->rcv.proto_reserved1); } } @@ -805,6 +823,17 @@ static int pv_parse_tcp_name(pv_spec_p sp, str *in) case 5: if(strncmp(in->s, "conid", 5) == 0) { sp->pvp.pvn.u.isname.name.n = 0; + } else if(strncmp(in->s, "ac_si", 5) == 0) { + sp->pvp.pvn.u.isname.name.n = 3; + } else if(strncmp(in->s, "ac_sp", 5) == 0) { + sp->pvp.pvn.u.isname.name.n = 4; + } else { + goto error; + } + break; + case 6: + if(strncmp(in->s, "aconid", 6) == 0) { + sp->pvp.pvn.u.isname.name.n = 5; } else { goto error; } ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:c3d75388: tcpops: if connection not found, return attributes from sip msg rcv
Module: kamailio Branch: master Commit: c3d753885b3cd1bc0cb9f46986e5798dfb5f6552 URL: https://github.com/kamailio/kamailio/commit/c3d753885b3cd1bc0cb9f46986e5798dfb5f6552 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-02-27T09:50:05+01:00 tcpops: if connection not found, return attributes from sip msg rcv --- Modified: src/modules/tcpops/tcpops_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/c3d753885b3cd1bc0cb9f46986e5798dfb5f6552.diff Patch: https://github.com/kamailio/kamailio/commit/c3d753885b3cd1bc0cb9f46986e5798dfb5f6552.patch --- diff --git a/src/modules/tcpops/tcpops_mod.c b/src/modules/tcpops/tcpops_mod.c index 15e39993d64..aad29665d72 100644 --- a/src/modules/tcpops/tcpops_mod.c +++ b/src/modules/tcpops/tcpops_mod.c @@ -762,41 +762,50 @@ static int pv_get_tcp(sip_msg_t *msg, pv_param_t *param, pv_value_t *res) return -1; } + con = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0, 0); switch(param->pvn.u.isname.name.n) { - case 1: - sval.s = ip_addr2a(&msg->rcv.src_ip); + case 1: /* c_si */ + if(con == NULL) { + sval.s = ip_addr2a(&msg->rcv.src_ip); + sval.len = strlen(sval.s); + return pv_get_strval(msg, param, res, &sval); + } + sval.s = ip_addr2a(&con->cinfo.src_ip); + tcpconn_put(con); sval.len = strlen(sval.s); return pv_get_strval(msg, param, res, &sval); - case 2: - ival = msg->rcv.src_port; + case 2: /* c_sp */ + if(con == NULL) { + ival = msg->rcv.src_port; + return pv_get_sintval(msg, param, res, ival); + } + ival = con->cinfo.src_port; + tcpconn_put(con); return pv_get_sintval(msg, param, res, ival); - case 3: - if((con = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0, 0)) - == NULL) { + case 3: /* ac_si */ + if(con == NULL) { return pv_get_null(msg, param, res); } sval.s = ip_addr2a(&con->cinfo.src_ip); tcpconn_put(con); sval.len = strlen(sval.s); return pv_get_strval(msg, param, res, &sval); - case 4: - if((con = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0, 0)) - == NULL) { + case 4: /* ac_sp */ + if(con == NULL) { return pv_get_null(msg, param, res); } ival = con->cinfo.src_port; tcpconn_put(con); return pv_get_sintval(msg, param, res, ival); - case 5: - if((con = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0, 0)) - == NULL) { + case 5: /* aconid */ + if(con == NULL) { return pv_get_null(msg, param, res); } ival = con->id; tcpconn_put(con); return pv_get_sintval(msg, param, res, ival); - default: + default: /* conid */ return pv_get_sintval(msg, param, res, msg->rcv.proto_reserved1); } } ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: Roadmap to next major Kamailio release series v5.8.x
Hello, I propose to aim to get out 5.8.0 next week on Wednesday or Thursday (March 6 or 7, 2024). I haven't seen much activity around issues in the new features/modules. If time allows to build the pages for what-is-new and how-to-upgrade (which I think it should be rather minimal), then I think it should be no other major task. Overall it will be almost two weeks since the 5.8 branch was created. Cheers, Daniel On 23.02.24 12:11, Daniel-Constantin Mierla wrote: > Hello, > > quick note that later today I will create the branch 5.8, notification > emails will be sent once done. > > Cheers, > Daniel > > On 16.02.24 08:01, Daniel-Constantin Mierla wrote: >> Hello, >> >> hopefully the devel version is now more stabilized after the freezing, >> the new components being adjusted enough not to need many more changes. >> Therefore I consider to branch 5.8 out of devel version next week on >> Friday, February 23, 2024, sometime around noon UTC. >> >> After that the master branch becomes open for new features, and branch >> 5.8 has to be hammered further to build the 5.8.x series. >> >> Cheers, >> Daniel >> >> On 10.01.24 10:11, Daniel-Constantin Mierla wrote: >>> Hello, >>> >>> discussed a bit during the online Kamailio devel meeting, it is time to >>> set the milestones towards the next major Kamailio release series v5.8.x. >>> >>> If no other suggestions that suit more developers, I would propose to >>> freeze by end of this month or early February, then test for about 4 >>> weeks as usual and release by end of February or during March. >>> >>> If anyone wants to add new features/modules, they have to be published >>> till freezing date, either pushed in the git repository or proposed as >>> pull request. >>> >>> Cheers, >>> Daniel >> -- >> Daniel-Constantin Mierla (@ asipto.com) >> twitter.com/miconda -- linkedin.com/in/miconda >> Kamailio Consultancy, Training and Development Services -- asipto.com >> Kamailio Advanced Training, February 20-22, 2024 -- asipto.com >> Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com >> > -- > Daniel-Constantin Mierla (@ asipto.com) > twitter.com/miconda -- linkedin.com/in/miconda > Kamailio Consultancy, Training and Development Services -- asipto.com > Kamailio Advanced Training, February 20-22, 2024 -- asipto.com > Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com > -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:17bdbd34: ims_usrloc: make matching of username in contact conditional
Module: kamailio Branch: master Commit: 17bdbd34b1038de936f14c1a41ce55f571e6402a URL: https://github.com/kamailio/kamailio/commit/17bdbd34b1038de936f14c1a41ce55f571e6402a Author: herlesupreeth Committer: Daniel-Constantin Mierla Date: 2024-02-28T17:24:15+01:00 ims_usrloc: make matching of username in contact conditional --- Modified: src/modules/ims_usrloc_pcscf/udomain.c --- Diff: https://github.com/kamailio/kamailio/commit/17bdbd34b1038de936f14c1a41ce55f571e6402a.diff Patch: https://github.com/kamailio/kamailio/commit/17bdbd34b1038de936f14c1a41ce55f571e6402a.patch --- diff --git a/src/modules/ims_usrloc_pcscf/udomain.c b/src/modules/ims_usrloc_pcscf/udomain.c index 0d7c14390ac..3c754a6f17f 100644 --- a/src/modules/ims_usrloc_pcscf/udomain.c +++ b/src/modules/ims_usrloc_pcscf/udomain.c @@ -616,32 +616,40 @@ int get_pcontact_from_cache(udomain_t *_d, pcontact_info_t *contact_info, continue; } } - if((contact_info->aor.len > 0) && (needle_uri.user.len != 0)) { - if((needle_uri.user.len != c->contact_user.len) - || (memcmp(needle_uri.user.s, c->contact_user.s, - needle_uri.user.len) - != 0)) { - LM_ERR("user name does not match - no match here...\n"); - LM_DBG("found pcontact username [%d]: [%.*s]\n", i, - c->contact_user.len, c->contact_user.s); - LM_DBG("incoming contact username: [%.*s]\n", - needle_uri.user.len, needle_uri.user.s); - c = c->next; - continue; - } - if((contact_info->aor.len >= 4) - && (memcmp(contact_info->aor.s, c->aor.s, 4) - != 0)) { // do not mix up sip- and tel-URIs. - LM_ERR("scheme does not match - no match here...\n"); - LM_DBG("found pcontact scheme [%d]: [%.*s]\n", i, 4, - c->aor.s); - LM_DBG("incoming contact scheme: [%.*s]\n", 4, - contact_info->aor.s); - c = c->next; - continue; + + // perform full contact match + if(match_contact_host_port == 0) { + if((contact_info->aor.len > 0) + && (needle_uri.user.len != 0)) { + if((needle_uri.user.len != c->contact_user.len) + || (memcmp(needle_uri.user.s, c->contact_user.s, + needle_uri.user.len) + != 0)) { + LM_ERR("user name does not match - no match " + "here...\n"); + LM_DBG("found pcontact username [%d]: [%.*s]\n", i, + c->contact_user.len, c->contact_user.s); + LM_DBG("incoming contact username: [%.*s]\n", + needle_uri.user.len, needle_uri.user.s); + c = c->next; + continue; + } + if((contact_info->aor.len >= 4) + && (memcmp(contact_info->aor.s, c->aor.s, 4) + != 0)) { // do not mix up sip- and tel-URIs. + LM_ERR("scheme does not match - no match " +
[sr-dev] Re: [kamailio/kamailio] Fixes related to contact updation and searching in P-CSCF modules (PR #3771)
Merged #3771 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3771#event-11954201920 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Fixes related to contact updation and searching in P-CSCF modules (PR #3771)
Thanks! -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3771#issuecomment-1969358610 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:4fb8accc: ims_registrar_pcscf: update registered state to pending registration if contact exists
Module: kamailio Branch: master Commit: 4fb8accc6747ad56fec3dc84d70cb2b8bbd7316e URL: https://github.com/kamailio/kamailio/commit/4fb8accc6747ad56fec3dc84d70cb2b8bbd7316e Author: herlesupreeth Committer: Daniel-Constantin Mierla Date: 2024-02-28T17:24:15+01:00 ims_registrar_pcscf: update registered state to pending registration if contact exists --- Modified: src/modules/ims_registrar_pcscf/save.c --- Diff: https://github.com/kamailio/kamailio/commit/4fb8accc6747ad56fec3dc84d70cb2b8bbd7316e.diff Patch: https://github.com/kamailio/kamailio/commit/4fb8accc6747ad56fec3dc84d70cb2b8bbd7316e.patch --- diff --git a/src/modules/ims_registrar_pcscf/save.c b/src/modules/ims_registrar_pcscf/save.c index 7e425230d0d..679abc99ca5 100644 --- a/src/modules/ims_registrar_pcscf/save.c +++ b/src/modules/ims_registrar_pcscf/save.c @@ -477,8 +477,15 @@ int save_pending(struct sip_msg *_m, udomain_t *_d) ul.unlock_udomain(_d, &ci.via_host, ci.via_port, ci.via_prot); return -2; } - } else { - LM_DBG("Contact already exists - not doing anything for now\n"); + } else if(pcontact->reg_state == PCONTACT_DEREG_PENDING_PUBLISH) { + LM_DBG("Contact already exists - Updating contact [%.*s]: setting " + "state to PCONTACT_REG_PENDING\n", + pcontact->aor.len, pcontact->aor.s); + + memset(&ci_, 0, sizeof(struct pcontact_info)); + ci_.reg_state = PCONTACT_REG_PENDING; + ci_.num_service_routes = 0; + ul.update_pcontact(_d, &ci_, pcontact); } } ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] ndb_reids module in event_route[tcp:closed] route block error: "no redis context for server" (Issue #3768)
The tcp_read.c code does not cover all cases when the connection can be closed, only when that happens during reading operations. But not on lifetime expiration and some other events -- that was the reason to move the execution of the event route for closed event in the tcp-main, because it is the process that destroys it, even when the close is detected on-read. I don't think the solution is to go back to the older approach, but find a way to share the connection structure, because it is not yet destroyed when event route is executed, just no longer in the hash table. Btw, I pushed some code after my previous comment, trying to make it more flexible to work with both cases: connection found active or connection just available for the event_route before destroying it. Regarding the fact that the main-tcp can be occupied too long, that is a matter of what you do in the event route. If you know that is going to be some lengthly action with network i/o, then delegate it to another worker with mqueue+rtimer or async modules. Similar problems can happen for lengthy actions used in failure-route (blocking timer process) or even for sip worker processes. Anyhow, you are welcome to propose enhancements as PRs, they will be reviewed and merged if they improve things. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3768#issuecomment-1969380889 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:181c6026: core: rthreads - init return variable
Module: kamailio Branch: master Commit: 181c602616e13323786335e8e28f182871aa5e9b URL: https://github.com/kamailio/kamailio/commit/181c602616e13323786335e8e28f182871aa5e9b Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-01T09:37:59+01:00 core: rthreads - init return variable --- Modified: src/core/rthreads.h --- Diff: https://github.com/kamailio/kamailio/commit/181c602616e13323786335e8e28f182871aa5e9b.diff Patch: https://github.com/kamailio/kamailio/commit/181c602616e13323786335e8e28f182871aa5e9b.patch --- diff --git a/src/core/rthreads.h b/src/core/rthreads.h index 0f4f0cf8b8a..1a04f9982c7 100644 --- a/src/core/rthreads.h +++ b/src/core/rthreads.h @@ -38,7 +38,7 @@ static void *run_threadP(_thread_proto fn, void *arg) { #ifdef USE_TLS pthread_t tid; - void *ret; + void *ret = NULL; if(likely(ksr_tls_threads_mode == 0 || (ksr_tls_threads_mode == 1 && process_no > 0))) { @@ -75,7 +75,7 @@ static void *run_threadPI(_thread_protoPI fn, void *arg1, int arg2) { #ifdef USE_TLS pthread_t tid; - void *ret; + void *ret = NULL; if(likely(ksr_tls_threads_mode == 0 || (ksr_tls_threads_mode == 1 && process_no > 0))) { @@ -150,7 +150,7 @@ static int run_thread4PP(_thread_proto4PP fn, void *arg1, void *arg2) { #ifdef USE_TLS pthread_t tid; - int ret; + int ret = 0; if(likely(ksr_tls_threads_mode == 0 || (ksr_tls_threads_mode == 1 && process_no > 0))) { @@ -238,7 +238,7 @@ static int run_thread4P5I2P2(_thread_proto4P5I2P2 fn, void *arg1, void *arg2, { #ifdef USE_TLS pthread_t tid; - int ret; + int ret = 0; if(likely(ksr_tls_threads_mode == 0 || (ksr_tls_threads_mode == 1 && process_no > 0))) { @@ -276,7 +276,7 @@ static int run_thread4L(_thread_proto4L fn, long arg1) { #ifdef USE_TLS pthread_t tid; - int ret; + int ret = 0; if(likely(ksr_tls_threads_mode == 0 || (ksr_tls_threads_mode == 1 && process_no > 0))) { ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:73c66150: influxdbc: copy with buffer size limit
Module: kamailio Branch: master Commit: 73c66150c604326c07d454002c12cb221289936a URL: https://github.com/kamailio/kamailio/commit/73c66150c604326c07d454002c12cb221289936a Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-01T09:55:16+01:00 influxdbc: copy with buffer size limit --- Modified: src/modules/influxdbc/ic.c --- Diff: https://github.com/kamailio/kamailio/commit/73c66150c604326c07d454002c12cb221289936a.diff Patch: https://github.com/kamailio/kamailio/commit/73c66150c604326c07d454002c12cb221289936a.patch --- diff --git a/src/modules/influxdbc/ic.c b/src/modules/influxdbc/ic.c index 09ab462ffcb..dc493619f28 100644 --- a/src/modules/influxdbc/ic.c +++ b/src/modules/influxdbc/ic.c @@ -107,7 +107,7 @@ void ic_influx_database(char *host, long port, he = gethostbyname(host); if(he == NULL) { - sprintf(errorbuf, + snprintf(errorbuf, 1024, "influx host=%s to ip address convertion failed " "gethostbyname(), bailing out\n", host); @@ -115,22 +115,24 @@ void ic_influx_database(char *host, long port, } /* this could return multiple ip addresses but we assume its the first one */ if(he->h_addr_list[0] != NULL) { - strcpy(influx_ip, - inet_ntoa(*(struct in_addr *)(he->h_addr_list[0]))); + strncpy(influx_ip, + inet_ntoa(*(struct in_addr *)(he->h_addr_list[0])), 16); + influx_ip[16] = '\0'; DEBUG fprintf(stderr, "ic_influx_by_hostname hostname=%s converted to ip " "address %s))\n", host, influx_ip); } else { - sprintf(errorbuf, + snprintf(errorbuf, 1024, "influx host=%s to ip address convertion failed (empty " "list), bailing out\n", host); error(errorbuf); } } else { - strcpy(influx_ip, - host); /* perhaps the hostname is actually an ip address */ + strncpy(influx_ip, host, + 16); /* perhaps the hostname is actually an ip address */ + influx_ip[16] = '\0'; } } } @@ -338,7 +340,7 @@ void ic_push() } for(i = 0; i < 1024; i++) /* empty the buffer */ result[i] = 0; - if((ret = read(sockfd, result, sizeof(result))) > 0) { + if((ret = read(sockfd, result, sizeof(result) - 1)) > 0) { result[ret] = 0; DEBUG fprintf( stderr, "received bytes=%d data=<%s>\n", ret, result); ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:19894425: file_out: additional checks for silenting warnings
Module: kamailio Branch: master Commit: 19894425684504e2a19622ae5a9cdfc565f16fd3 URL: https://github.com/kamailio/kamailio/commit/19894425684504e2a19622ae5a9cdfc565f16fd3 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-01T11:42:45+01:00 file_out: additional checks for silenting warnings --- Modified: src/modules/file_out/file_out.c --- Diff: https://github.com/kamailio/kamailio/commit/19894425684504e2a19622ae5a9cdfc565f16fd3.diff Patch: https://github.com/kamailio/kamailio/commit/19894425684504e2a19622ae5a9cdfc565f16fd3.patch --- diff --git a/src/modules/file_out/file_out.c b/src/modules/file_out/file_out.c index ad055f1852c..f3dcfb831d9 100644 --- a/src/modules/file_out/file_out.c +++ b/src/modules/file_out/file_out.c @@ -226,28 +226,31 @@ static void fo_log_writer_process(int rank) LM_ERR("deque error\n"); return; } - FILE *out = fo_get_file_handle(log_message.dest_file); - if(out == NULL) { - LM_ERR("file handle is NULL\n"); - return; - } + if(log_message.message != NULL) { + FILE *out = fo_get_file_handle(log_message.dest_file); + if(out == NULL) { + LM_ERR("file handle is NULL\n"); + return; + } - /* Get prefix for the file */ - if(log_message.prefix != NULL && log_message.prefix->len > 0) { - if(fprintf(out, "%.*s", log_message.prefix->len, - log_message.prefix->s) + /* Get prefix for the file */ + if(log_message.prefix != NULL && log_message.prefix->len > 0) { + if(fprintf(out, "%.*s", log_message.prefix->len, + log_message.prefix->s) + < 0) { + LM_ERR("Failed to write prefix to file with err {%s}\n", + strerror(errno)); + } + } + if(fprintf(out, "%.*s\n", log_message.message->len, + log_message.message->s) < 0) { - LM_ERR("Failed to write prefix to file with err {%s}\n", + LM_ERR("Failed to write to file with err {%s}\n", strerror(errno)); } - } - if(fprintf(out, "%.*s\n", log_message.message->len, - log_message.message->s) - < 0) { - LM_ERR("Failed to write to file with err {%s}\n", strerror(errno)); - } - if(fflush(out) < 0) { - LM_ERR("Failed to flush file with err {%s}\n", strerror(errno)); + if(fflush(out) < 0) { + LM_ERR("Failed to flush file with err {%s}\n", strerror(errno)); + } } if(log_message.prefix != NULL) { @@ -337,7 +340,11 @@ static int fo_fixup_free_int_pvar(void **param, int param_no) static int fo_add_filename(modparam_t type, void *val) { - if(val != NULL && strlen((char *)val) == 0) { + if(val == NULL) { + LM_ERR("modparam value is null\n"); + return -1; + } + if(strlen((char *)val) == 0) { LM_ERR("modparam value is empty\n"); return -1; } ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:daac0bdb: core: ppcfg - jump to end when defexp eval does not get a str val
Module: kamailio Branch: master Commit: daac0bdb88f6f732bda7c683af45b90f87fdb7c9 URL: https://github.com/kamailio/kamailio/commit/daac0bdb88f6f732bda7c683af45b90f87fdb7c9 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-01T12:41:13+01:00 core: ppcfg - jump to end when defexp eval does not get a str val --- Modified: src/core/ppcfg.c --- Diff: https://github.com/kamailio/kamailio/commit/daac0bdb88f6f732bda7c683af45b90f87fdb7c9.diff Patch: https://github.com/kamailio/kamailio/commit/daac0bdb88f6f732bda7c683af45b90f87fdb7c9.patch --- diff --git a/src/core/ppcfg.c b/src/core/ppcfg.c index 262a7931cd2..d77a237882b 100644 --- a/src/core/ppcfg.c +++ b/src/core/ppcfg.c @@ -510,6 +510,8 @@ char *pp_defexp_eval(char *exval, int exlen, int qmode) LM_DBG("expression string result: [%s]\n", result->param.stz.sval); sval.s = result->param.stz.sval; sval.len = strlen(result->param.stz.sval); + } else { + goto done; } if(qmode == 1) { ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:d8e0942c: core: select - handle ws and wss inside select_ip_port()
Module: kamailio Branch: master Commit: d8e0942c9e83c8cad7c182bf41c156ba35bf24d2 URL: https://github.com/kamailio/kamailio/commit/d8e0942c9e83c8cad7c182bf41c156ba35bf24d2 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-01T12:46:17+01:00 core: select - handle ws and wss inside select_ip_port() --- Modified: src/core/select_core.c --- Diff: https://github.com/kamailio/kamailio/commit/d8e0942c9e83c8cad7c182bf41c156ba35bf24d2.diff Patch: https://github.com/kamailio/kamailio/commit/d8e0942c9e83c8cad7c182bf41c156ba35bf24d2.patch --- diff --git a/src/core/select_core.c b/src/core/select_core.c index 12b884ead04..57dad2f78e5 100644 --- a/src/core/select_core.c +++ b/src/core/select_core.c @@ -1387,7 +1387,7 @@ int select_ip_port(str *res, select_t *s, struct sip_msg *msg) if(param & SEL_PROTO) { switch(msg->rcv.proto) { case PROTO_NONE: - proto_str.s = 0; + proto_str.s = ""; proto_str.len = 0; break; @@ -1411,6 +1411,16 @@ int select_ip_port(str *res, select_t *s, struct sip_msg *msg) proto_str.len = 4; break; + case PROTO_WS: + proto_str.s = "ws"; + proto_str.len = 2; + break; + + case PROTO_WSS: + proto_str.s = "wss"; + proto_str.len = 3; + break; + default: LM_ERR("Unknown transport protocol\n"); return -1; ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:d443a1e3: tlsa: removed the map files used in the past for tls engine
Module: kamailio Branch: master Commit: d443a1e37d85e0eec6f6c9875bb8e821b34c8d6b URL: https://github.com/kamailio/kamailio/commit/d443a1e37d85e0eec6f6c9875bb8e821b34c8d6b Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-02T08:13:40+01:00 tlsa: removed the map files used in the past for tls engine - sync with code of tls module --- Removed: src/modules/tlsa/tls_map.c Removed: src/modules/tlsa/tls_map.h --- Diff: https://github.com/kamailio/kamailio/commit/d443a1e37d85e0eec6f6c9875bb8e821b34c8d6b.diff Patch: https://github.com/kamailio/kamailio/commit/d443a1e37d85e0eec6f6c9875bb8e821b34c8d6b.patch --- diff --git a/src/modules/tlsa/tls_map.c b/src/modules/tlsa/tls_map.c deleted file mode 100644 index ad799b5cdff..000 --- a/src/modules/tlsa/tls_map.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (C) 2021 Daniel-Constantin Mierla (asipto.com) - * - * This file is part of Kamailio, a free SIP server. - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version - * - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/** - * THIS FILE IS GENERATED - DO NOT MODIFY IT - */ - -#include "../tls/tls_map.c" diff --git a/src/modules/tlsa/tls_map.h b/src/modules/tlsa/tls_map.h deleted file mode 100644 index 96705a7f7fa..000 --- a/src/modules/tlsa/tls_map.h +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (C) 2021 Daniel-Constantin Mierla (asipto.com) - * - * This file is part of Kamailio, a free SIP server. - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version - * - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/** - * THIS FILE IS GENERATED - DO NOT MODIFY IT - */ - -#include "../tls/tls_map.h" ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:5.8:8e81774d: tlsa: removed the map files used in the past for tls engine
Module: kamailio Branch: 5.8 Commit: 8e81774d5a71c06906df84fb4809bcfb73bd532e URL: https://github.com/kamailio/kamailio/commit/8e81774d5a71c06906df84fb4809bcfb73bd532e Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-02T08:18:15+01:00 tlsa: removed the map files used in the past for tls engine - sync with code of tls module (cherry picked from commit d443a1e37d85e0eec6f6c9875bb8e821b34c8d6b) --- Removed: src/modules/tlsa/tls_map.c Removed: src/modules/tlsa/tls_map.h --- Diff: https://github.com/kamailio/kamailio/commit/8e81774d5a71c06906df84fb4809bcfb73bd532e.diff Patch: https://github.com/kamailio/kamailio/commit/8e81774d5a71c06906df84fb4809bcfb73bd532e.patch --- diff --git a/src/modules/tlsa/tls_map.c b/src/modules/tlsa/tls_map.c deleted file mode 100644 index ad799b5cdff..000 --- a/src/modules/tlsa/tls_map.c +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (C) 2021 Daniel-Constantin Mierla (asipto.com) - * - * This file is part of Kamailio, a free SIP server. - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version - * - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/** - * THIS FILE IS GENERATED - DO NOT MODIFY IT - */ - -#include "../tls/tls_map.c" diff --git a/src/modules/tlsa/tls_map.h b/src/modules/tlsa/tls_map.h deleted file mode 100644 index 96705a7f7fa..000 --- a/src/modules/tlsa/tls_map.h +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (C) 2021 Daniel-Constantin Mierla (asipto.com) - * - * This file is part of Kamailio, a free SIP server. - * - * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version - * - * - * This file is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/** - * THIS FILE IS GENERATED - DO NOT MODIFY IT - */ - -#include "../tls/tls_map.h" ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:6ee26a3a: core: parser rr - check for rr value before serializing
Module: kamailio Branch: master Commit: 6ee26a3ae3293aaeb4507d5d0b16ad31173cc39a URL: https://github.com/kamailio/kamailio/commit/6ee26a3ae3293aaeb4507d5d0b16ad31173cc39a Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-04T08:57:47+01:00 core: parser rr - check for rr value before serializing --- Modified: src/core/parser/parse_rr.c --- Diff: https://github.com/kamailio/kamailio/commit/6ee26a3ae3293aaeb4507d5d0b16ad31173cc39a.diff Patch: https://github.com/kamailio/kamailio/commit/6ee26a3ae3293aaeb4507d5d0b16ad31173cc39a.patch --- diff --git a/src/core/parser/parse_rr.c b/src/core/parser/parse_rr.c index f6fce793faf..362f30b15ed 100644 --- a/src/core/parser/parse_rr.c +++ b/src/core/parser/parse_rr.c @@ -444,20 +444,28 @@ int print_rr_body( i = (nb_recs == NULL) ? 0 : *nb_recs; while(i < n) { - memcpy(cp, route[i].s, route[i].len); - cp += route[i].len; - if(++i < n) - *(cp++) = ','; + if(route[i].s != NULL) { + memcpy(cp, route[i].s, route[i].len); + cp += route[i].len; + if(++i < n) + *(cp++) = ','; + } else { + i++; + } } } else { i = (nb_recs == NULL) ? n - 1 : (n - *nb_recs - 1); while(i >= 0) { - memcpy(cp, route[i].s, route[i].len); - cp += route[i].len; - if(i-- > 0) - *(cp++) = ','; + if(route[i].s != NULL) { + memcpy(cp, route[i].s, route[i].len); + cp += route[i].len; + if(i-- > 0) + *(cp++) = ','; + } else { + i--; + } } } oroute->len = cp - start; ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:0fc0cdd7: acc: cdr - do not free static empty string in case of error
Module: kamailio Branch: master Commit: 0fc0cdd791ce5157232dd2139238708403cdde1d URL: https://github.com/kamailio/kamailio/commit/0fc0cdd791ce5157232dd2139238708403cdde1d Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-04T09:07:22+01:00 acc: cdr - do not free static empty string in case of error --- Modified: src/modules/acc/acc_cdr.c --- Diff: https://github.com/kamailio/kamailio/commit/0fc0cdd791ce5157232dd2139238708403cdde1d.diff Patch: https://github.com/kamailio/kamailio/commit/0fc0cdd791ce5157232dd2139238708403cdde1d.patch --- diff --git a/src/modules/acc/acc_cdr.c b/src/modules/acc/acc_cdr.c index 4ec019f1f8d..4c003e0ecab 100644 --- a/src/modules/acc/acc_cdr.c +++ b/src/modules/acc/acc_cdr.c @@ -113,10 +113,10 @@ int cdr_core2strar(struct dlg_cell *dlg, str *values, int *unused, char *types) /* cleanup already allocated memory and * return that we didn't do anything */ for(i = i - 1; i >= 0; i--) { - if(NULL != values[i].s) { + if(NULL != values[i].s && types[i] != TYPE_NULL) { pkg_free(values[i].s); - values[i].s = NULL; } + values[i].s = NULL; } return 0; } ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:5b8b2717: ctl: reset log prefix on reading ctl traffic
Module: kamailio Branch: master Commit: 5b8b2717ee2f57da932132683b27eb33cea3fd59 URL: https://github.com/kamailio/kamailio/commit/5b8b2717ee2f57da932132683b27eb33cea3fd59 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-04T13:58:35+01:00 ctl: reset log prefix on reading ctl traffic - it may be previously set in process by some event route --- Modified: src/modules/ctl/fifo_server.c Modified: src/modules/ctl/io_listener.c --- Diff: https://github.com/kamailio/kamailio/commit/5b8b2717ee2f57da932132683b27eb33cea3fd59.diff Patch: https://github.com/kamailio/kamailio/commit/5b8b2717ee2f57da932132683b27eb33cea3fd59.patch --- diff --git a/src/modules/ctl/fifo_server.c b/src/modules/ctl/fifo_server.c index 772441d31e4..94a700cf50e 100644 --- a/src/modules/ctl/fifo_server.c +++ b/src/modules/ctl/fifo_server.c @@ -736,6 +736,7 @@ int fifo_process(char *msg_buf, int size, int *bytes_needed, void *sh, static rpc_ctx_t context; unsigned int rdata; + log_prefix_set(NULL); DBG("process_fifo: called with %d bytes, offset %d: %.*s\n", size, (int)(long)*saved_state, size, msg_buf); /* search for the end of the request (\n\r) */ diff --git a/src/modules/ctl/io_listener.c b/src/modules/ctl/io_listener.c index ed584e4c7f9..3634b63acff 100644 --- a/src/modules/ctl/io_listener.c +++ b/src/modules/ctl/io_listener.c @@ -26,6 +26,7 @@ #include "../../core/mem/mem.h" #include "../../core/rpc.h" /* who & ls rpcs */ #include "../../core/ut.h" +#include "../../core/action.h" #include "../../core/cfg/cfg_struct.h" #include "ctrl_socks.h" @@ -346,6 +347,7 @@ static int handle_ctrl_dgram(struct ctrl_socket *cs) struct send_handle sh; void *saved_state; + log_prefix_set(NULL); saved_state = 0; /* we get always a new datagram */ sh.fd = cs->fd; sh.type = S_DISCONNECTED; @@ -486,6 +488,7 @@ static int handle_stream_read(struct stream_connection *s_c, int idx) sh.from_len = 0; r = &s_c->req; bytes_free = STREAM_BUF_SIZE - (int)(r->end - r->buf); + log_prefix_set(NULL); if(bytes_free == 0) { LOG(L_ERR, "ERROR: handle_stream_read: buffer overrun\n"); goto close_connection; ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:8a2894cd: core: main - init local variables used for cli param parsing
Module: kamailio Branch: master Commit: 8a2894cd6180f904dd37acb4985db4e4935aa434 URL: https://github.com/kamailio/kamailio/commit/8a2894cd6180f904dd37acb4985db4e4935aa434 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-04T15:31:47+01:00 core: main - init local variables used for cli param parsing --- Modified: src/main.c --- Diff: https://github.com/kamailio/kamailio/commit/8a2894cd6180f904dd37acb4985db4e4935aa434.diff Patch: https://github.com/kamailio/kamailio/commit/8a2894cd6180f904dd37acb4985db4e4935aa434.patch --- diff --git a/src/main.c b/src/main.c index 1856bf7bc03..c7e98e1b433 100644 --- a/src/main.c +++ b/src/main.c @@ -2083,9 +2083,9 @@ int main(int argc, char **argv) int c, r; char *tmp; int tmp_len; - int port; - int proto; - int aproto; + int port = 5060; + int proto = PROTO_NONE; + int aproto = PROTO_NONE; char *ahost = NULL; int aport = 0; char *options; ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:ed32512f: presence: docs - remove extra section end tag
Module: kamailio Branch: master Commit: ed32512f4594cc0ddc3437e274bcba5acfc16410 URL: https://github.com/kamailio/kamailio/commit/ed32512f4594cc0ddc3437e274bcba5acfc16410 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-05T20:54:09+01:00 presence: docs - remove extra section end tag --- Modified: src/modules/presence/doc/presence_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/ed32512f4594cc0ddc3437e274bcba5acfc16410.diff Patch: https://github.com/kamailio/kamailio/commit/ed32512f4594cc0ddc3437e274bcba5acfc16410.patch --- diff --git a/src/modules/presence/doc/presence_admin.xml b/src/modules/presence/doc/presence_admin.xml index f3d1127f7ac..503fd615918 100644 --- a/src/modules/presence/doc/presence_admin.xml +++ b/src/modules/presence/doc/presence_admin.xml @@ -1285,7 +1285,6 @@ pres_update_watchers("sip:t...@kamailio.org", "presence"); - presence.publish_cache_sync ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: Roadmap to next major Kamailio release series v5.8.x
Hello, with still some docs to be updated for v5.8.0, the plan is to get the new version out tomorrow, March 7, 2024. Cheers, Daniel On 27.02.24 16:49, Daniel-Constantin Mierla wrote: > Hello, > > I propose to aim to get out 5.8.0 next week on Wednesday or Thursday > (March 6 or 7, 2024). I haven't seen much activity around issues in the > new features/modules. If time allows to build the pages for what-is-new > and how-to-upgrade (which I think it should be rather minimal), then I > think it should be no other major task. Overall it will be almost two > weeks since the 5.8 branch was created. > > Cheers, > Daniel > > On 23.02.24 12:11, Daniel-Constantin Mierla wrote: >> Hello, >> >> quick note that later today I will create the branch 5.8, notification >> emails will be sent once done. >> >> Cheers, >> Daniel >> >> On 16.02.24 08:01, Daniel-Constantin Mierla wrote: >>> Hello, >>> >>> hopefully the devel version is now more stabilized after the freezing, >>> the new components being adjusted enough not to need many more changes. >>> Therefore I consider to branch 5.8 out of devel version next week on >>> Friday, February 23, 2024, sometime around noon UTC. >>> >>> After that the master branch becomes open for new features, and branch >>> 5.8 has to be hammered further to build the 5.8.x series. >>> >>> Cheers, >>> Daniel >>> >>> On 10.01.24 10:11, Daniel-Constantin Mierla wrote: Hello, discussed a bit during the online Kamailio devel meeting, it is time to set the milestones towards the next major Kamailio release series v5.8.x. If no other suggestions that suit more developers, I would propose to freeze by end of this month or early February, then test for about 4 weeks as usual and release by end of February or during March. If anyone wants to add new features/modules, they have to be published till freezing date, either pushed in the git repository or proposed as pull request. Cheers, Daniel >>> -- >>> Daniel-Constantin Mierla (@ asipto.com) >>> twitter.com/miconda -- linkedin.com/in/miconda >>> Kamailio Consultancy, Training and Development Services -- asipto.com >>> Kamailio Advanced Training, February 20-22, 2024 -- asipto.com >>> Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com >>> >> -- >> Daniel-Constantin Mierla (@ asipto.com) >> twitter.com/miconda -- linkedin.com/in/miconda >> Kamailio Consultancy, Training and Development Services -- asipto.com >> Kamailio Advanced Training, February 20-22, 2024 -- asipto.com >> Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com >> > -- > Daniel-Constantin Mierla (@ asipto.com) > twitter.com/miconda -- linkedin.com/in/miconda > Kamailio Consultancy, Training and Development Services -- asipto.com > Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com > -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git: new commits in branch 5.8
- URL: https://github.com/kamailio/kamailio/commit/15ffdf7c0721fb5d05772d96e133ac74412c0068 Author: Daniel-Constantin Mierla Date: 2024-03-06T17:44:00+01:00 ndb_redis: reformat exported structures (cherry picked from commit fb21f89dc544551b1bb65805303131fa990d2f44) - URL: https://github.com/kamailio/kamailio/commit/3415be29303bbacaf25b646d6c86027e93cf7c7e Author: Daniel-Constantin Mierla Date: 2024-03-06T17:44:16+01:00 evrexec: reformat exported structures (cherry picked from commit 65eef5c5446c1f6870eecf8bbc84d68d12271bc7) - URL: https://github.com/kamailio/kamailio/commit/2d2006701f491f732ea07b36a48016f7fbe436bf Author: Daniel-Constantin Mierla Date: 2024-03-06T17:44:23+01:00 microhttpd: docs - note about variables available in the event route (cherry picked from commit 993583015b127b0a83603acd352925c8d6e6db70) - URL: https://github.com/kamailio/kamailio/commit/50c759030f024dd080c08a3d94127f1d1af544e2 Author: Daniel-Constantin Mierla Date: 2024-03-06T17:44:32+01:00 ndb_redis: init enabled for tcp-main and postchildinit callbacks - GH #3768 (cherry picked from commit 19e5bf3d4cfc2b7d47623e307fff7e60e73e8a18) - URL: https://github.com/kamailio/kamailio/commit/c2ac3ffc907ded71bcde59c3c5c0d6b69e997696 Author: Daniel-Constantin Mierla Date: 2024-03-06T17:44:41+01:00 tcpops: variables to get active connection attributes (cherry picked from commit 59230a07b8c6a79c4a574890bae775c3d166c471) - URL: https://github.com/kamailio/kamailio/commit/8835f04334981b81df7eed6c03e581fcc4070da8 Author: Daniel-Constantin Mierla Date: 2024-03-06T17:44:47+01:00 tcpops: if connection not found, return attributes from sip msg rcv (cherry picked from commit c3d753885b3cd1bc0cb9f46986e5798dfb5f6552) - URL: https://github.com/kamailio/kamailio/commit/ab981daa54c1afc1017af16afbb67ef55567e6fa Author: herlesupreeth Date: 2024-03-06T17:45:09+01:00 ims_usrloc: make matching of username in contact conditional (cherry picked from commit 17bdbd34b1038de936f14c1a41ce55f571e6402a) - URL: https://github.com/kamailio/kamailio/commit/c06ea12d0fff50569803ea0fef9486726ab428ce Author: herlesupreeth Date: 2024-03-06T17:45:14+01:00 ims_registrar_pcscf: update registered state to pending registration if contact exists (cherry picked from commit 4fb8accc6747ad56fec3dc84d70cb2b8bbd7316e) - URL: https://github.com/kamailio/kamailio/commit/0747c18d5c4db2e7e8408ad2c7efa120ec76523e Author: Daniel-Constantin Mierla Date: 2024-03-06T17:45:27+01:00 core: rthreads - init return variable (cherry picked from commit 181c602616e13323786335e8e28f182871aa5e9b) - URL: https://github.com/kamailio/kamailio/commit/219c21fe62638e7191dd1b5ad32ba098273e2009 Author: Daniel-Constantin Mierla Date: 2024-03-06T17:45:35+01:00 influxdbc: copy with buffer size limit (cherry picked from commit 73c66150c604326c07d454002c12cb221289936a) - URL: https://github.com/kamailio/kamailio/commit/4c78a564c5ad8662014cf686428a37238a6d8476 Author: Daniel-Constantin Mierla Date: 2024-03-06T17:45:44+01:00 core: ppcfg - jump to end when defexp eval does not get a str val (cherry picked from commit daac0bdb88f6f732bda7c683af45b90f87fdb7c9) - URL: https://github.com/kamailio/kamailio/commit/089bf63178039b13cde0beccfacab1536af76179 Author: Daniel-Constantin Mierla Date: 2024-03-06T17:45:54+01:00 core: select - handle ws and wss inside select_ip_port() (cherry picked from commit d8e0942c9e83c8cad7c182bf41c156ba35bf24d2) - URL: https://github.com/kamailio/kamailio/commit/4626cb7f0e0b273153ce0004900a92553783a893 Author: Daniel-Constantin Mierla Date: 2024-03-06T17:46:07+01:00 core: parser rr - check for rr value before serializing (cherry picked from commit 6ee26a3ae3293aaeb4507d5d0b16ad31173cc39a) - URL: https://github.com/kamailio/kamailio/commit/42282a2c78fc24ff2b3856983a6dbb188a2912e3 Author: Daniel-Constantin Mierla Date: 2024-03-06T17:46:15+01:00 acc: cdr - do not free static empty string in case of error (cherry picked from commit 0fc0cdd791ce5157232dd2139238708403cdde1d) - URL: https://github.com/kamailio/kamailio/commit/d45c78eeeaea6a9fc9dcb927436f834392d9d7c9 Author: Daniel-Constantin Mierla Date: 2024-03-06T17:46:22+01:00 ctl: reset log prefix on reading ctl traffic - it may be previously set in process by some event route (cherry picked from commit 5b8b2717ee2f57da932132683b27eb33cea3fd59) - URL: https://github.com/kamailio/kamailio/commit/500e5fabf9da31b5fa2949cac90956da99751223 Author: Daniel-Constantin Mierla Date: 2024-03-06T17:46:33+01:00 core: main - init local variables used for cli param parsing (cherry picked from commit 8a2894cd6180f904dd37acb4985db4e4935aa434) - URL: https://github.com/kamailio/kamailio/commit/a814df7e828db7be0b34738c2eb78b133c22ddef Author: Daniel-Constantin Mierla Date: 2024-03-06T17:46:45+01:00 presence: docs - remove extra section end tag (cherry picked from commit ed32512f4594cc0ddc3437e274bcba5acfc16410)
[sr-dev] git:master:4c9cfa7a: tls/docs: Update tls.reload docs
Module: kamailio Branch: master Commit: 4c9cfa7a6a770a693ecb3b840ad042fb201db675 URL: https://github.com/kamailio/kamailio/commit/4c9cfa7a6a770a693ecb3b840ad042fb201db675 Author: Xenofon Karamanos <22965395+xkara...@users.noreply.github.com> Committer: Daniel-Constantin Mierla Date: 2024-03-06T19:40:26+01:00 tls/docs: Update tls.reload docs --- Modified: src/modules/tls/doc/rpc.xml Modified: src/modules/tls/doc/tls.xml --- Diff: https://github.com/kamailio/kamailio/commit/4c9cfa7a6a770a693ecb3b840ad042fb201db675.diff Patch: https://github.com/kamailio/kamailio/commit/4c9cfa7a6a770a693ecb3b840ad042fb201db675.patch --- diff --git a/src/modules/tls/doc/rpc.xml b/src/modules/tls/doc/rpc.xml index 495fc7b31c2..d9e75b014b2 100644 --- a/src/modules/tls/doc/rpc.xml +++ b/src/modules/tls/doc/rpc.xml @@ -70,6 +70,10 @@ terminated and they continue to use the old certificates. The new configuration will be used for new connections. + + Reload is generally safe and usable in production environments. If possible should + be done in a time where the service has lower usage/connections. + This RPC command is exported with "RPC_EXEC_DELTA" flag, therefore its execution rate can be restricted to specific time intervals by setting diff --git a/src/modules/tls/doc/tls.xml b/src/modules/tls/doc/tls.xml index 9460d73c89f..9b3f4eaacb3 100644 --- a/src/modules/tls/doc/tls.xml +++ b/src/modules/tls/doc/tls.xml @@ -284,10 +284,6 @@ make -C modules/tls extra_defs="-DTLS_WR_DEBUG -DTLS_RD_DEBUG" but also not exactly standard conforming (the verification should happen during TLS connection establishment and not after). - - TLS specific config reloading is not safe, so for now better don't use it, - especially under heavy traffic. - This documentation is incomplete. The provided selects are not documented in this file. A list with all the @@ -364,4 +360,3 @@ event_route[tls:connection-out] { - ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Update TLS docs (PR #3776)
Merged #3776 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3776#event-12032000651 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] Update TLS docs (PR #3776)
Thanks! Merging to backport for newer release. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3776#issuecomment-1981548565 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:67785fea: tls/docs: Update certificate generation docs
Module: kamailio Branch: master Commit: 67785fea8f906236e4a30bc09bb11b3292c46572 URL: https://github.com/kamailio/kamailio/commit/67785fea8f906236e4a30bc09bb11b3292c46572 Author: Xenofon Karamanos <22965395+xkara...@users.noreply.github.com> Committer: Daniel-Constantin Mierla Date: 2024-03-06T19:40:26+01:00 tls/docs: Update certificate generation docs --- Modified: src/modules/tls/doc/tls.xml --- Diff: https://github.com/kamailio/kamailio/commit/67785fea8f906236e4a30bc09bb11b3292c46572.diff Patch: https://github.com/kamailio/kamailio/commit/67785fea8f906236e4a30bc09bb11b3292c46572.patch --- diff --git a/src/modules/tls/doc/tls.xml b/src/modules/tls/doc/tls.xml index 9b3f4eaacb3..5697792655a 100644 --- a/src/modules/tls/doc/tls.xml +++ b/src/modules/tls/doc/tls.xml @@ -93,7 +93,10 @@ When installing tls module of kamailio, a sample 'tls.cfg' file is deployed in the same - folder with 'kamailio.cfg', along with freshly generated self signed certificates. + folder with 'kamailio.cfg'. For freshly generated self signed certificates make must be called from tls folder + +make install-tls-cert + HINT: be sure you have enable_tls=yes to your kamailio.cfg. ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: Roadmap to next major Kamailio release series v5.8.x
Hello, short notification that v5.8.0 is going to be released today, therefore any commits to branch 5.8 have to be announced to sr-dev and wait for the ack before pushing to git repository in order to avoid conflicts with the release building process. Once the announcement is out, commits can be pushed to branch 5.8 as usual. Cheers, Daniel On 06.03.24 07:56, Daniel-Constantin Mierla wrote: > Hello, > > with still some docs to be updated for v5.8.0, the plan is to get the > new version out tomorrow, March 7, 2024. > > Cheers, > Daniel > > On 27.02.24 16:49, Daniel-Constantin Mierla wrote: >> Hello, >> >> I propose to aim to get out 5.8.0 next week on Wednesday or Thursday >> (March 6 or 7, 2024). I haven't seen much activity around issues in the >> new features/modules. If time allows to build the pages for what-is-new >> and how-to-upgrade (which I think it should be rather minimal), then I >> think it should be no other major task. Overall it will be almost two >> weeks since the 5.8 branch was created. >> >> Cheers, >> Daniel >> >> On 23.02.24 12:11, Daniel-Constantin Mierla wrote: >>> Hello, >>> >>> quick note that later today I will create the branch 5.8, notification >>> emails will be sent once done. >>> >>> Cheers, >>> Daniel >>> >>> On 16.02.24 08:01, Daniel-Constantin Mierla wrote: Hello, hopefully the devel version is now more stabilized after the freezing, the new components being adjusted enough not to need many more changes. Therefore I consider to branch 5.8 out of devel version next week on Friday, February 23, 2024, sometime around noon UTC. After that the master branch becomes open for new features, and branch 5.8 has to be hammered further to build the 5.8.x series. Cheers, Daniel On 10.01.24 10:11, Daniel-Constantin Mierla wrote: > Hello, > > discussed a bit during the online Kamailio devel meeting, it is time to > set the milestones towards the next major Kamailio release series v5.8.x. > > If no other suggestions that suit more developers, I would propose to > freeze by end of this month or early February, then test for about 4 > weeks as usual and release by end of February or during March. > > If anyone wants to add new features/modules, they have to be published > till freezing date, either pushed in the git repository or proposed as > pull request. > > Cheers, > Daniel -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio Advanced Training, February 20-22, 2024 -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com >>> -- >>> Daniel-Constantin Mierla (@ asipto.com) >>> twitter.com/miconda -- linkedin.com/in/miconda >>> Kamailio Consultancy, Training and Development Services -- asipto.com >>> Kamailio Advanced Training, February 20-22, 2024 -- asipto.com >>> Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com >>> >> -- >> Daniel-Constantin Mierla (@ asipto.com) >> twitter.com/miconda -- linkedin.com/in/miconda >> Kamailio Consultancy, Training and Development Services -- asipto.com >> Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com >> > -- > Daniel-Constantin Mierla (@ asipto.com) > twitter.com/miconda -- linkedin.com/in/miconda > Kamailio Consultancy, Training and Development Services -- asipto.com > Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com > -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:5.8:22f27451: tls/docs: Update certificate generation docs
Module: kamailio Branch: 5.8 Commit: 22f274513a98cc081d44a6694e35c3e96844dae3 URL: https://github.com/kamailio/kamailio/commit/22f274513a98cc081d44a6694e35c3e96844dae3 Author: Xenofon Karamanos <22965395+xkara...@users.noreply.github.com> Committer: Daniel-Constantin Mierla Date: 2024-03-07T10:07:03+01:00 tls/docs: Update certificate generation docs (cherry picked from commit 67785fea8f906236e4a30bc09bb11b3292c46572) --- Modified: src/modules/tls/doc/tls.xml --- Diff: https://github.com/kamailio/kamailio/commit/22f274513a98cc081d44a6694e35c3e96844dae3.diff Patch: https://github.com/kamailio/kamailio/commit/22f274513a98cc081d44a6694e35c3e96844dae3.patch --- diff --git a/src/modules/tls/doc/tls.xml b/src/modules/tls/doc/tls.xml index 9b3f4eaacb3..5697792655a 100644 --- a/src/modules/tls/doc/tls.xml +++ b/src/modules/tls/doc/tls.xml @@ -93,7 +93,10 @@ When installing tls module of kamailio, a sample 'tls.cfg' file is deployed in the same - folder with 'kamailio.cfg', along with freshly generated self signed certificates. + folder with 'kamailio.cfg'. For freshly generated self signed certificates make must be called from tls folder + +make install-tls-cert + HINT: be sure you have enable_tls=yes to your kamailio.cfg. ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:5.8:6533c42f: tls/docs: Update tls.reload docs
Module: kamailio Branch: 5.8 Commit: 6533c42fc0bba6408376a8f8b41b02b97b04ca1b URL: https://github.com/kamailio/kamailio/commit/6533c42fc0bba6408376a8f8b41b02b97b04ca1b Author: Xenofon Karamanos <22965395+xkara...@users.noreply.github.com> Committer: Daniel-Constantin Mierla Date: 2024-03-07T10:06:56+01:00 tls/docs: Update tls.reload docs (cherry picked from commit 4c9cfa7a6a770a693ecb3b840ad042fb201db675) --- Modified: src/modules/tls/doc/rpc.xml Modified: src/modules/tls/doc/tls.xml --- Diff: https://github.com/kamailio/kamailio/commit/6533c42fc0bba6408376a8f8b41b02b97b04ca1b.diff Patch: https://github.com/kamailio/kamailio/commit/6533c42fc0bba6408376a8f8b41b02b97b04ca1b.patch --- diff --git a/src/modules/tls/doc/rpc.xml b/src/modules/tls/doc/rpc.xml index 495fc7b31c2..d9e75b014b2 100644 --- a/src/modules/tls/doc/rpc.xml +++ b/src/modules/tls/doc/rpc.xml @@ -70,6 +70,10 @@ terminated and they continue to use the old certificates. The new configuration will be used for new connections. + + Reload is generally safe and usable in production environments. If possible should + be done in a time where the service has lower usage/connections. + This RPC command is exported with "RPC_EXEC_DELTA" flag, therefore its execution rate can be restricted to specific time intervals by setting diff --git a/src/modules/tls/doc/tls.xml b/src/modules/tls/doc/tls.xml index 9460d73c89f..9b3f4eaacb3 100644 --- a/src/modules/tls/doc/tls.xml +++ b/src/modules/tls/doc/tls.xml @@ -284,10 +284,6 @@ make -C modules/tls extra_defs="-DTLS_WR_DEBUG -DTLS_RD_DEBUG" but also not exactly standard conforming (the verification should happen during TLS connection establishment and not after). - - TLS specific config reloading is not safe, so for now better don't use it, - especially under heavy traffic. - This documentation is incomplete. The provided selects are not documented in this file. A list with all the @@ -364,4 +360,3 @@ event_route[tls:connection-out] { - ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:5.8:dc289e49: ChangeLog: added content from 5.8.0 developent
Module: kamailio Branch: 5.8 Commit: dc289e492fab13e717c26495cfa2a3d0103658d3 URL: https://github.com/kamailio/kamailio/commit/dc289e492fab13e717c26495cfa2a3d0103658d3 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-07T10:36:38+01:00 ChangeLog: added content from 5.8.0 developent --- Modified: ChangeLog --- Diff: https://github.com/kamailio/kamailio/commit/dc289e492fab13e717c26495cfa2a3d0103658d3.diff Patch: https://github.com/kamailio/kamailio/commit/dc289e492fab13e717c26495cfa2a3d0103658d3.patch ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:5.8:e6b67b13: pkg/kamailio: version set 5.8.0 for rpms and alpine
Module: kamailio Branch: 5.8 Commit: e6b67b13a75a49d9269c53443de7233888c0df00 URL: https://github.com/kamailio/kamailio/commit/e6b67b13a75a49d9269c53443de7233888c0df00 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-07T12:23:09+01:00 pkg/kamailio: version set 5.8.0 for rpms and alpine --- Modified: pkg/kamailio/alpine/APKBUILD Modified: pkg/kamailio/obs/kamailio.spec --- Diff: https://github.com/kamailio/kamailio/commit/e6b67b13a75a49d9269c53443de7233888c0df00.diff Patch: https://github.com/kamailio/kamailio/commit/e6b67b13a75a49d9269c53443de7233888c0df00.patch --- diff --git a/pkg/kamailio/alpine/APKBUILD b/pkg/kamailio/alpine/APKBUILD index 0696216564a..eaa70ccd5ff 100644 --- a/pkg/kamailio/alpine/APKBUILD +++ b/pkg/kamailio/alpine/APKBUILD @@ -4,7 +4,7 @@ # Maintainer: Nathan Angelacos pkgname=kamailio -pkgver=5.1.0 +pkgver=5.8.0 pkgrel=0 # If building from a git snapshot, specify the gitcommit diff --git a/pkg/kamailio/obs/kamailio.spec b/pkg/kamailio/obs/kamailio.spec index 13d6fb20ffd..74df5cb4066 100644 --- a/pkg/kamailio/obs/kamailio.spec +++ b/pkg/kamailio/obs/kamailio.spec @@ -1,5 +1,5 @@ %define namekamailio -%define ver 5.4.0 +%define ver 5.8.0 %define rel dev1.0%{dist} %if 0%{?fedora} ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:5.8:1fa3ba8e: Makefile.defs: version set to 5.8.0
Module: kamailio Branch: 5.8 Commit: 1fa3ba8ee48b6a68f2133544da56e0d68eae8609 URL: https://github.com/kamailio/kamailio/commit/1fa3ba8ee48b6a68f2133544da56e0d68eae8609 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-07T12:29:02+01:00 Makefile.defs: version set to 5.8.0 - first in the new 5.8.x series --- Modified: src/Makefile.defs --- Diff: https://github.com/kamailio/kamailio/commit/1fa3ba8ee48b6a68f2133544da56e0d68eae8609.diff Patch: https://github.com/kamailio/kamailio/commit/1fa3ba8ee48b6a68f2133544da56e0d68eae8609.patch --- diff --git a/src/Makefile.defs b/src/Makefile.defs index 62f1dd78273..f5e8b0da653 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -107,7 +107,7 @@ INSTALL_FLAVOUR=$(FLAVOUR) VERSION = 5 PATCHLEVEL = 8 SUBLEVEL = 0 -EXTRAVERSION = -rc0 +EXTRAVERSION = # memory manager switcher # 0 - f_malloc (fast malloc) ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:5.8:2e2217b1: ChangeLog: content set for v5.8.0
Module: kamailio Branch: 5.8 Commit: 2e2217b153b5acf05a7cb37c70760194802312bb URL: https://github.com/kamailio/kamailio/commit/2e2217b153b5acf05a7cb37c70760194802312bb Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-07T12:30:56+01:00 ChangeLog: content set for v5.8.0 --- Modified: ChangeLog --- Diff: https://github.com/kamailio/kamailio/commit/2e2217b153b5acf05a7cb37c70760194802312bb.diff Patch: https://github.com/kamailio/kamailio/commit/2e2217b153b5acf05a7cb37c70760194802312bb.patch --- diff --git a/ChangeLog b/ChangeLog index a6fe8c22523..1e38365cf3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,25 @@ = Changes Since Version 5.7.0 === +commit 1fa3ba8ee48b6a68f2133544da56e0d68eae8609 +Author: Daniel-Constantin Mierla +Date: Thu Mar 7 12:29:02 2024 +0100 + +Makefile.defs: version set to 5.8.0 + +- first in the new 5.8.x series + +commit e6b67b13a75a49d9269c53443de7233888c0df00 +Author: Daniel-Constantin Mierla +Date: Thu Mar 7 12:23:09 2024 +0100 + +pkg/kamailio: version set 5.8.0 for rpms and alpine + +commit 50a0f82eab0a1f9dc5738f022231eba349a46a3a +Author: Victor Seva +Date: Thu Mar 7 11:41:19 2024 +0100 + +pkg/kamailio/deb: version set 5.8.0 [skip ci] commit ed99a5e2648c39e29fbbc7842c86425147c607c6 Author: Kamailio Dev ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Kamailio v5.8.0 Released - new major version is out
Kamailio v5.8.0 is out – it comes with 4 new modules and a large set of improvements touching again more than 50 existing modules. You can read a bit more detailed release notes at: * https://www.kamailio.org/w/kamailio-v5-8-0-release-notes/ Many thanks to all developers and community members that made possible this release. v5.8.0 brings more flexibility and optimizations across many existing components and modules, new parameters, functions, variables and transformations. Enjoy Kamailio v5.8.0! Thank you for flying Kamailio! Daniel -- Daniel-Constantin Mierla (@ asipto.com) twitter.com/miconda -- linkedin.com/in/miconda Kamailio Consultancy, Training and Development Services -- asipto.com Kamailio World Conference, April 18-19, 2024, Berlin -- kamailioworld.com ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:24e410f9: topos: properly handle cases of no user in contact for mode 1
Module: kamailio Branch: master Commit: 24e410f9a20d004f55bcc79cd10fb35cb26e4570 URL: https://github.com/kamailio/kamailio/commit/24e410f9a20d004f55bcc79cd10fb35cb26e4570 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-10T08:11:09+01:00 topos: properly handle cases of no user in contact for mode 1 - contact mode 1 accepted cases with no-user in contact uri but not in r-uri, however, requests within dialog can have one's contact in r-uri and then processing failed --- Modified: src/modules/topos/tps_storage.c --- Diff: https://github.com/kamailio/kamailio/commit/24e410f9a20d004f55bcc79cd10fb35cb26e4570.diff Patch: https://github.com/kamailio/kamailio/commit/24e410f9a20d004f55bcc79cd10fb35cb26e4570.patch --- diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c index bb153bb780a..946092c04f9 100644 --- a/src/modules/topos/tps_storage.c +++ b/src/modules/topos/tps_storage.c @@ -223,6 +223,7 @@ int tps_storage_fill_contact( int i; int contact_len; int cparam_len; + int cuser_len = 0; sr_xavp_t *vavu = NULL; if(dir == TPS_DIR_DOWNSTREAM) { @@ -317,21 +318,27 @@ int tps_storage_fill_contact( LM_ERR("failed to parse the contact uri\n"); return -1; } - memcpy(td->cp, curi.user.s, curi.user.len); - td->cp += curi.user.len; + if(curi.user.len > 0) { + memcpy(td->cp, curi.user.s, curi.user.len); + td->cp += curi.user.len; + cuser_len = curi.user.len; + } else { + LM_DBG("no contact user - skipping it\n"); + } } else { /* extract the ruri */ if(parse_sip_msg_uri(msg) < 0) { LM_ERR("failed to parse r-uri\n"); return -1; } - if(msg->parsed_uri.user.len == 0) { - LM_ERR("no r-uri user\n"); - return -1; + if(msg->parsed_uri.user.len > 0) { + memcpy(td->cp, msg->parsed_uri.user.s, + msg->parsed_uri.user.len); + td->cp += msg->parsed_uri.user.len; + cuser_len = msg->parsed_uri.user.len; + } else { + LM_DBG("no r-uri user - skipping it\n"); } - memcpy(td->cp, msg->parsed_uri.user.s, - msg->parsed_uri.user.len); - td->cp += msg->parsed_uri.user.len; } } else if(ctmode == TPS_CONTACT_MODE_XAVPUSER) { if(dir == TPS_DIR_DOWNSTREAM) { @@ -344,6 +351,7 @@ int tps_storage_fill_contact( } memcpy(td->cp, vavu->val.v.s.s, vavu->val.v.s.len); td->cp += vavu->val.v.s.len; + cuser_len = vavu->val.v.s.len; } else { /* extract the b contact */ vavu = xavu_get_child_with_sval( @@ -354,11 +362,11 @@ int tps_storage_fill_contact( } memcpy(td->cp, vavu->val.v.s.s, vavu->val.v.s.len); td->cp += vavu->val.v.s.len; + cuser_len = vavu->val.v.s.len; } } - if(!((ctmode == TPS_CONTACT_MODE_RURIUSER) - && (dir == TPS_DIR_DOWNSTREAM) && (curi.user.len <= 0))) { + if(cuser_len > 0) { *td->cp = '@'; td->cp++; } ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:b6fccea2: topos: small rearangement by removing else after return in the true block
Module: kamailio Branch: master Commit: b6fccea258e56b7d3195659245713a6d44acb013 URL: https://github.com/kamailio/kamailio/commit/b6fccea258e56b7d3195659245713a6d44acb013 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-10T07:43:51+01:00 topos: small rearangement by removing else after return in the true block - reduce level of indentation - a few wraps in curly braces for clearer view of the if block --- Modified: src/modules/topos/tps_storage.c --- Diff: https://github.com/kamailio/kamailio/commit/b6fccea258e56b7d3195659245713a6d44acb013.diff Patch: https://github.com/kamailio/kamailio/commit/b6fccea258e56b7d3195659245713a6d44acb013.patch --- diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c index fc0c2835a33..bb153bb780a 100644 --- a/src/modules/topos/tps_storage.c +++ b/src/modules/topos/tps_storage.c @@ -241,8 +241,9 @@ int tps_storage_fill_contact( } contact_len = sv.len; - if(_tps_contact_host.len) + if(_tps_contact_host.len) { contact_len = sv.len - puri.host.len + _tps_contact_host.len; + } if(ctmode == TPS_CONTACT_MODE_RURIUSER || ctmode == TPS_CONTACT_MODE_XAVPUSER) { @@ -283,8 +284,9 @@ int tps_storage_fill_contact( for(i = 0; i < sv.len; i++) { *td->cp = sv.s[i]; td->cp++; - if(sv.s[i] == ':') + if(sv.s[i] == ':') { break; + } } if(ctmode == TPS_CONTACT_MODE_RURIUSER || ctmode == TPS_CONTACT_MODE_XAVPUSER) { @@ -296,27 +298,24 @@ int tps_storage_fill_contact( || msg->contact == NULL) { LM_WARN("bad sip message or missing Contact hdr\n"); return -1; - } else { - if(parse_contact(msg->contact) < 0 - || ((contact_body_t *)msg->contact->parsed) - ->contacts - == NULL - || ((contact_body_t *)msg->contact->parsed) - ->contacts->next - != NULL) { - LM_ERR("bad Contact header\n"); - return -1; - } else { - if(parse_uri(((contact_body_t *)msg->contact->parsed) - ->contacts->uri.s, - ((contact_body_t *)msg->contact->parsed) - ->contacts->uri.len, - &curi) - < 0) { - LM_ERR("failed to parse the contact uri\n"); - return -1; - } - } + } + if(parse_contact(msg->contact) < 0 + || ((contact_body_t *)msg->contact->parsed)->contacts + == NULL + || ((contact_body_t *)msg->contact->parsed) + ->contacts->next + != NULL) { + LM_ERR("bad Contact header\n"); + return -1; + } + if(parse_uri(((contact_body_t *)msg->contact->parsed) + ->contacts->uri.s, + ((contact_body_t *)msg->contact->parsed) + ->contacts->uri.len, + &curi) + < 0) { + LM_ERR("failed to parse the contact uri\n"); + return -1; }
[sr-dev] Re: [kamailio/kamailio] secsipid method to only validate signature without checking the rest of the header (Issue #3784)
Not sure I got exactly the kind of function you look for. One that still takes the Identity header value and verifies only the signature, with the key provided as parameter? Or the key has to be takes from the Identity header parameter? Maybe you can give the function prototype (or the list of parameters you want to provide to the function). On the hand hand, can you look at the jwt module and see if it can already help with what you need? - https://www.kamailio.org/docs/modules/stable/modules/jwt.html -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3784#issuecomment-1988746255 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] Re: [kamailio/kamailio] topos: add enable_register_publish (PR #3766)
>From description I understand that only Via is removed for REGISTER (and >PUBLISH). The Contact stays the same, in that case Path still has to be used >in order to get the traffic back to topos-instance. Also, the incoming Path >headers are kept. Is it right? -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3766#issuecomment-1988770264 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:4dc37aee: core: set null-terminated char for modparam
Module: kamailio Branch: master Commit: 4dc37aee853bbcf9d7fdb96245b76aaa8dfa2930 URL: https://github.com/kamailio/kamailio/commit/4dc37aee853bbcf9d7fdb96245b76aaa8dfa2930 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2024-03-11T20:56:37+01:00 core: set null-terminated char for modparam --- Modified: src/core/modparam.c --- Diff: https://github.com/kamailio/kamailio/commit/4dc37aee853bbcf9d7fdb96245b76aaa8dfa2930.diff Patch: https://github.com/kamailio/kamailio/commit/4dc37aee853bbcf9d7fdb96245b76aaa8dfa2930.patch --- diff --git a/src/core/modparam.c b/src/core/modparam.c index 46ea0169e53..b48d9e82442 100644 --- a/src/core/modparam.c +++ b/src/core/modparam.c @@ -152,6 +152,7 @@ int set_mod_param_regex(char *regex, char *name, modparam_t type, void *val) return -1; } strncpy(*((char **)ptr), (char *)val2, len_param); + (*((char **)ptr))[len_param] = '\0'; break; case PARAM_STR: ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] git:master:761e963c: dispatcher: refine documentation
Module: kamailio Branch: master Commit: 761e963c0f7d9bf1b66c1ef18a409756b919ae2c URL: https://github.com/kamailio/kamailio/commit/761e963c0f7d9bf1b66c1ef18a409756b919ae2c Author: Dennis Yurasov Committer: Daniel-Constantin Mierla Date: 2024-03-13T10:08:05+01:00 dispatcher: refine documentation - more clear documentation for the new ds_is_from_list flags --- Modified: src/modules/dispatcher/doc/dispatcher_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/761e963c0f7d9bf1b66c1ef18a409756b919ae2c.diff Patch: https://github.com/kamailio/kamailio/commit/761e963c0f7d9bf1b66c1ef18a409756b919ae2c.patch --- diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml index 4708ca06c92..83ef06285a0 100644 --- a/src/modules/dispatcher/doc/dispatcher_admin.xml +++ b/src/modules/dispatcher/doc/dispatcher_admin.xml @@ -1805,9 +1805,12 @@ if(ds_list_exists("10")) { If bit two is set, then protocol is ignored. If bit three is set, then state must be active. If bit four is set, then socket/sockname be matched. - If bit five is set, then try to find the most complete - "address/protocol/port/local socket" combination for all dispatcher targets.The parameter - can be an integer or a variable holding an integer value. + If bit five is set, then try to find the most closest target from all + dispatcher targets with the mandatory ip and combination of local socket, protocol, port, + the weighted search result is combined from bit flags of matched components: + ip - 1, port - 2, protocol - 4, local socket - 8, + the target with the maximum value of flags combination will be selected. + The parameter can be an integer or a variable holding an integer value. It must be provided if the uri parameter is provided. ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org