Re: [sr-dev] [kamailio/kamailio] Retaining Contact Header for 301, 302 requests when using Topoh module (Issue #3256)
Thank you, I will check it and get back to you if there is any issue. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3256#issuecomment-1278478818 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] kamailio KEMI sipt module (Issue #3264)
Hi, maybe im wrong, but it seems the sipt module is not implemented in KEMI Framework. Is it planned? :) -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3264 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [SR-Users] Testing dialog module (and acc with dialog cdrs)
On Mon, Oct 3, 2022 at 11:41 AM mayamatakeshi wrote: > > > On Mon, Sep 26, 2022 at 8:32 PM Daniel-Constantin Mierla < > mico...@gmail.com> wrote: > >> Hello, >> >> as I am not a user of dialog variables, I am turning to community to ask >> for help testing the current master branch with configurations that make >> use of dialog variables and acc dialog-based cdr generation. >> >> With a few reports of issues related to dialog modules and unexpected >> crashes, I looked over the code and noticed that the access of the value >> for dialog variables was not protected, making them vulnerable of >> invalid memory access in case of the variable was updated by another >> process or dialog was terminated. >> >> I introduced a couple of new functions to try to cover different use >> cases of getting the dlg variable values, dialog management code was not >> affected, but given that these commits need to be backported to stable >> branch (5.6), I want to get proper feedback from community that things >> work fine. >> >> A previous attempt of a simpler fix was not enough, having side effects >> to acc module for dialog-based cdr generation, because it was keeping >> referenced to many dlg variables at the same time. >> >> In short, it would be appreciated any feedback on testing dialog and acc >> with dialog-based cdr generation using git master branch. >> >> > I have started 4 load test environments today with latest > commit 6f400a8074fe60916867596431ca26dff00435d1. > I usually leave a commit load test running for 2 months before consider it > ready for production release. > I will report any crash/problem. > After a few hours of load test, all 4 load test environments start to log memory allocation problems: [root@lab002107-flip-server ~]$ grep memory /var/log/kamailio/kamailio.log |head 2022-10-13T01:36:10.429809+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3286370]: ERROR: rtpengine [rtpengine.c:2721]: rtpp_function_call(): out of memory - bencode failed 2022-10-13T01:36:12.923609+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3286370]: ERROR: rtpengine [rtpengine.c:2721]: rtpp_function_call(): out of memory - bencode failed 2022-10-13T01:36:12.961677+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3286370]: ERROR: acc [acc_extra.c:234]: extra2strar(): could not allocate private memory from pkg pool 2022-10-13T01:36:14.983281+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3286370]: ERROR: rtpengine [rtpengine.c:2721]: rtpp_function_call(): out of memory - bencode failed 2022-10-13T01:36:14.983537+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3286370]: ERROR: acc [acc_extra.c:234]: extra2strar(): could not allocate private memory from pkg pool 2022-10-13T01:36:14.983665+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3286370]: ERROR: acc [acc_extra.c:234]: extra2strar(): could not allocate private memory from pkg pool 2022-10-13T01:36:20.861558+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3286370]: ERROR: rtpengine [rtpengine.c:2721]: rtpp_function_call(): out of memory - bencode failed 2022-10-13T01:36:20.864388+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3286370]: ERROR: acc [acc_extra.c:234]: extra2strar(): could not allocate private memory from pkg pool 2022-10-13T01:36:20.878469+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3286370]: ERROR: acc [acc_extra.c:234]: extra2strar(): could not allocate private memory from pkg pool 2022-10-13T01:36:23.174159+09:00 lab002107-flip-server /usr/local/src/git/kamailio-master/src/kamailio[3286370]: ERROR: rtpengine [rtpengine.c:2721]: rtpp_function_call(): out of memory - bencode failed I reverted 2 of the load test envs to previous kamailio 5.6 commit 61e86a1f502388ffd4dce6e52811ba640337c813 and restarted the load tests, then again, kamailio master commit 6f400a8074fe60916867596431ca26dff00435d1 started to write the above logs but this doesn't happen with 5.6. ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] NATS Module not working (Issue #3253)
Below you can find the core dump from the last commit in the master branch: ``` (gdb) bt #0 0x7f4ac66041cc in uv.io_stop () from /lib64/libuv.so.1 #1 0x7f4ac660a71a in uv.poll_stop.lto_priv () from /lib64/libuv.so.1 #2 0x7f4ac660a763 in uv_poll_stop () from /lib64/libuv.so.1 #3 0x7f4ac66b4d3d in nats_destroy_workers () at nats_mod.c:591 #4 0x7f4ac66b4dd3 in mod_destroy () at nats_mod.c:606 #5 0x00641fb5 in destroy_modules () at core/sr_module.c:861 #6 0x0041f089 in cleanup (show_status=0) at main.c:563 #7 0x00420af1 in shutdown_children (sig=15, show_status=0) at main.c:706 #8 0x00439a8e in main (argc=13, argv=0x7fff8f4a7cc8) at main.c:3100 (gdb) bt full #0 0x7f4ac66041cc in uv.io_stop () from /lib64/libuv.so.1 No symbol table info available. #1 0x7f4ac660a71a in uv.poll_stop.lto_priv () from /lib64/libuv.so.1 No symbol table info available. #2 0x7f4ac660a763 in uv_poll_stop () from /lib64/libuv.so.1 No symbol table info available. #3 0x7f4ac66b4d3d in nats_destroy_workers () at nats_mod.c:591 i = 0 worker = 0x7f4ac67c4c68 pub_worker = 0x7f4ac67c4d08 __func__ = "nats_destroy_workers" #4 0x7f4ac66b4dd3 in mod_destroy () at nats_mod.c:606 __func__ = "mod_destroy" #5 0x00641fb5 in destroy_modules () at core/sr_module.c:861 t = 0x7f4bc77ca570 foo = 0x7f4bc77ca098 __func__ = "destroy_modules" #6 0x0041f089 in cleanup (show_status=0) at main.c:563 memlog = -1077952723 __func__ = "cleanup" #7 0x00420af1 in shutdown_children (sig=15, show_status=0) at main.c:706 __func__ = "shutdown_children" #8 0x00439a8e in main (argc=13, argv=0x7fff8f4a7cc8) at main.c:3100 cfg_stream = 0x13f1380 c = -1 r = 0 tmp = 0x7fff8f4a8eaf "" tmp_len = 0 port = 0 proto = 0 ahost = 0x0 aport = 0 options = 0x823308 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:" ret = -1 seed = 1254916872 rfd = 4 debug_save = 0 debug_flag = 0 dont_fork_cnt = 0 n_lst = 0x3 p = 0x40 st = {st_dev = 25, st_ino = 1308, st_nlink = 2, st_mode = 16832, st_uid = 1001, st_gid = 1002, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1664442191, tv_nsec = 175708131}, st_mtim = {tv_sec = 1665675696, tv_nsec = 415332480}, st_ctim = {tv_sec = 1665675696, tv_nsec = 415332480}, __glibc_reserved = {0, 0, 0}} tbuf = "\342lf\310K\177\000\000\070+c\310K\177\000\000@yJ\217\377\177\000\000\a\000\000\000\000\000\000\000\330\030c\310K\177\000\000\a\000\000\000#\000\000\000\060zf\310K\177\000\000\225Fd\310K\177\000\000\000\000\000\000\000\000\000\000\200Yd\310K\177\000\000\070\240\063\310K\177\000\000\320\375b\310K\177\000\000\000\000\000\000\000\000\000\000\020yJ\217\377\177\000\000\360nf\310K\177\000\000\330*c\310K\177\000\000\330*c\310K\177\000\000\000\000\000\000\000\000\000\000\250\fc\310K\177\000\000\020yJ\217\377\177\000\000\220\205f\310K\177\000\000\000\020c\310K\177\000\000\022\034c\310K\177\000\000\066\021d\310K\177\000\000\344\303\062\310K\177\000\000"... option_index = 0 long_options = {{name = 0x8259a6 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x820521 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x8259ab "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x8259b1 "subst", has_arg = 1, flag = 0x0, val = 1025}, { name = 0x8259b7 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x8259c0 "substdefs", has_arg = 1, flag = 0x0, val = 1027}, {name = 0x8259ca "server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x8259d4 "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, { name = 0x8259df "modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x8259e8 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x8259f3 "debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x8259f9 "cfg-print", has_arg = 0, flag = 0x0, val = 1033}, { name = 0x825a03 "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x825a0a "all-errors", has_arg = 0, flag = 0x0, val = 1035}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}} __func__ = "main" (gdb) ``` -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3253#issuecomment-1277833386 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:88667f7c: modules: readme files regenerated - mqtt ... [skip ci]
Module: kamailio Branch: master Commit: 88667f7cbf8a41dd3951cdca74d203936ecb164a URL: https://github.com/kamailio/kamailio/commit/88667f7cbf8a41dd3951cdca74d203936ecb164a Author: Kamailio Dev Committer: Kamailio Dev Date: 2022-10-13T17:46:30+02:00 modules: readme files regenerated - mqtt ... [skip ci] --- Modified: src/modules/mqtt/README --- Diff: https://github.com/kamailio/kamailio/commit/88667f7cbf8a41dd3951cdca74d203936ecb164a.diff Patch: https://github.com/kamailio/kamailio/commit/88667f7cbf8a41dd3951cdca74d203936ecb164a.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
Merged #3261 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#event-7582729588 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] secfilter crash when using kamcmd secfilter.reload (Issue #3263)
I check it. Thank you for reporting -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3263#issuecomment-1277722952 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:ea7201d9: modules: readme files regenerated - tsilo ... [skip ci]
Module: kamailio Branch: master Commit: ea7201d9c3b086fb79c093b4f127516befb08e25 URL: https://github.com/kamailio/kamailio/commit/ea7201d9c3b086fb79c093b4f127516befb08e25 Author: Kamailio Dev Committer: Kamailio Dev Date: 2022-10-13T15:46:31+02:00 modules: readme files regenerated - tsilo ... [skip ci] --- Modified: src/modules/tsilo/README --- Diff: https://github.com/kamailio/kamailio/commit/ea7201d9c3b086fb79c093b4f127516befb08e25.diff Patch: https://github.com/kamailio/kamailio/commit/ea7201d9c3b086fb79c093b4f127516befb08e25.patch --- diff --git a/src/modules/tsilo/README b/src/modules/tsilo/README index c93fa0ebef..06029a2bac 100644 --- a/src/modules/tsilo/README +++ b/src/modules/tsilo/README @@ -180,7 +180,7 @@ modparam("tsilo", "use_domain", 1) if (is_method("INVITE")) { if (t_newtran()) { ts_store(); -# t_store("sip:alice@$td"); +# ts_store("sip:alice@$td"); } } ... @@ -199,6 +199,11 @@ if (is_method("INVITE")) { and add them new branches. Can be a static string value or a dynamic string with pseudo-variables. + Return codes: + * 1 - branches added. + -1 - an internal error has produced (parsing error, memory error). + -2 - no records found for the r-uri. + This function can be used from REQUEST_ROUTE, FAILURE_ROUTE. Example 1.4. ts_append usage @@ -231,6 +236,11 @@ if (is_method("REGISTER")) { location lookup based on this Contact URI fails (no location record found), then the branch append will not happen. + Return codes: + * 1 - branches added. + -1 - an internal error has produced (parsing error, memory error). + -2 - no records found for the r-uri. + This function can be used from REQUEST_ROUTE, FAILURE_ROUTE. Example 1.5. ts_append_by_contact usage ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:ef2ea73f: tsilo: add new return code to ts_append and document it
Module: kamailio Branch: master Commit: ef2ea73f044a1421b25734d4773bd2dacaab1165 URL: https://github.com/kamailio/kamailio/commit/ef2ea73f044a1421b25734d4773bd2dacaab1165 Author: Federico Cabiddu Committer: Federico Cabiddu Date: 2022-10-13T15:42:56+02:00 tsilo: add new return code to ts_append and document it --- Modified: src/modules/tsilo/doc/tsilo_admin.xml Modified: src/modules/tsilo/ts_append.c --- Diff: https://github.com/kamailio/kamailio/commit/ef2ea73f044a1421b25734d4773bd2dacaab1165.diff Patch: https://github.com/kamailio/kamailio/commit/ef2ea73f044a1421b25734d4773bd2dacaab1165.patch --- diff --git a/src/modules/tsilo/doc/tsilo_admin.xml b/src/modules/tsilo/doc/tsilo_admin.xml index 965c339156f..2a258ba15cb 100644 --- a/src/modules/tsilo/doc/tsilo_admin.xml +++ b/src/modules/tsilo/doc/tsilo_admin.xml @@ -139,7 +139,7 @@ modparam("tsilo", "use_domain", 1) if (is_method("INVITE")) { if (t_newtran()) { ts_store(); -# t_store("sip:alice@$td"); +# ts_store("sip:alice@$td"); } } ... @@ -170,6 +170,20 @@ if (is_method("INVITE")) { + Return codes: + + + + 1 - branches added. + + + -1 - an internal error has produced (parsing error, memory error). + + + -2 - no records found for the r-uri. + + + This function can be used from REQUEST_ROUTE, FAILURE_ROUTE. @@ -223,6 +237,20 @@ if (is_method("REGISTER")) { + Return codes: + + + + 1 - branches added. + + + -1 - an internal error has produced (parsing error, memory error). + + + -2 - no records found for the r-uri. + + + This function can be used from REQUEST_ROUTE, FAILURE_ROUTE. diff --git a/src/modules/tsilo/ts_append.c b/src/modules/tsilo/ts_append.c index fece9b40970..dd01b0a7d3a 100644 --- a/src/modules/tsilo/ts_append.c +++ b/src/modules/tsilo/ts_append.c @@ -61,7 +61,7 @@ int ts_append(struct sip_msg* msg, str *ruri, str *contact, char *table) { /* parse contact if given */ if(contact->s != NULL && contact->len != 0) { if (parse_uri(contact->s, contact->len, _uri) < 0) { - LM_ERR("failed to parse contact %.*s\n", ruri->len, ruri->s); + LM_ERR("failed to parse contact %.*s\n", contact->len, contact->s); return -1; } } @@ -72,9 +72,9 @@ int ts_append(struct sip_msg* msg, str *ruri, str *contact, char *table) { res = get_ts_urecord(t_uri, &_r); if (res != 0) { - LM_ERR("failed to retrieve record for %.*s\n", t_uri->len, t_uri->s); + LM_DBG("no record for %.*s\n", t_uri->len, t_uri->s); unlock_entry_by_ruri(t_uri); - return -1; + return -2; } /* cycle through existing transactions */ ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] secfilter crash when using kamcmd secfilter.reload (Issue #3263)
### Description Hello! I'm running a sip service and have several crash per day. The crash is happening in secfilter module, method "w_check_ip" line 651 https://github.com/kamailio/kamailio/blob/master/src/modules/secfilter/secfilter.c#L651 Reproduction I noticed that every core is generated when I insert a new IP and most probably, when I call kamcmd secfilter.reload NOTE: I'm calling the above command line from the kamailio script Debugging Data ``` (gdb) bt #0 __strncasecmp_l_avx () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:271 #1 0x564a161b6413 in cmpi_str (s1=0x7f0bdcbc1b28, s2=0x7ffd88e2c580) at core/strutils.c:443 #2 0x7f0bd069c983 in w_check_ip (msg=0x7f0be1619620) at secfilter.c:651 #3 0x564a15f8cafc in do_action (h=0x7ffd88e2d640, a=0x7f0be142f118, msg=0x7f0be1619620) at core/action.c:1079 #4 0x564a15f9bb26 in run_actions (h=0x7ffd88e2d640, a=0x7f0be14296e8, msg=0x7f0be1619620) at core/action.c:1584 #5 0x564a15f889d9 in do_action (h=0x7ffd88e2d640, a=0x7f0be15996f0, msg=0x7f0be1619620) at core/action.c:703 #6 0x564a15f9bb26 in run_actions (h=0x7ffd88e2d640, a=0x7f0be1598c70, msg=0x7f0be1619620) at core/action.c:1584 #7 0x564a15f9c3a0 in run_top_route (a=0x7f0be1598c70, msg=0x7f0be1619620, c=0x0) at core/action.c:1669 #8 0x564a160f2e96 in receive_msg ( buf=0x564a16549ea0 "REGISTER sip:sip.antisip.com SIP/2.0\r\nVia: SIP/2.0/UDP 10.1.1.78:5060;branch=z9hG4bKVsAO82I6G4Oe4Okgc;rport\r\nFrom: \"504f9410db5c\" ;tag=D2yOicg8WAMe4Sii\r\nTo: \""..., len=429, rcv_info=0x7ffd88e2daf0) at core/receive.c:501 #9 0x564a16251d97 in udp_rcv_loop () at core/udp_server.c:543 #10 0x564a15f75ce9 in main_loop () at main.c:1730 #11 0x564a15f829a1 in main (argc=10, argv=0x7ffd88e2e508) at main.c:3061 ``` Log Messages Oct 12 00:28:08 sip kamailio[19274]: ALERT: [main.c:788]: handle_sigs(): child process 19474 exited by a signal 11 Oct 12 00:28:08 sip kamailio[19274]: ALERT: [main.c:791]: handle_sigs(): core was generated Oct 12 00:28:08 sip kamailio[19274]: INFO: [main.c:813]: handle_sigs(): terminating due to SIGCHLD SIP Traffic not applicable ### Possible Solutions I guess the secfilter reload is happening at the same time w_check_ip loops over the data. Some mutex should probably be missing. ### Additional Information Debian GNU/Linux 11 (bullseye) kamailio 5.5.5 (x86_64/linux) installed from http://deb.kamailio.org/ secfilter module hasn't changed much since 5.5.5, so I it looks like master branch is still affected. Thanks a lot. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3263 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] kamailio sip out of order when sip transfer too fast (Issue #3262)
Closed #3262 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3262#event-7580038664 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] kamailio sip out of order when sip transfer too fast (Issue #3262)
For questions about using Kamailio and routing SIP messages, use sr-us...@lists.kamailio.org mailing list. The tracker is for reporting issues in the c code. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3262#issuecomment-1277417444 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] kamailio sip out of order when sip transfer too fast (Issue #3262)
I found a problem when I tested again. When the interval between the transmission of two info messages is too short, the forwarding of kamailio will be confused. Can this be solved please? https://user-images.githubusercontent.com/16113837/195576921-dafc0511-5b8e-45a8-879c-a28c194fa857.png;> ![image](https://user-images.githubusercontent.com/16113837/195575863-b245c8f0-94ad-440c-9fe7-0301d037739c.png) -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3262 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tm: proper fill of From/To URI/tag values using parsed structure in rpc_t_uac() (PR #3251)
Merged #3251 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3251#event-7579754259 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tm: proper fill of From/To URI/tag values using parsed structure in rpc_t_uac() (PR #3251)
Merged #3251 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3251#event-7579753544 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tm: proper fill of From/To URI/tag values using parsed structure in rpc_t_uac() (PR #3251)
Merged #3251 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3251#event-7579753149 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tm: proper fill of From/To URI/tag values using parsed structure in rpc_t_uac() (PR #3251)
Thanks! -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3251#issuecomment-1277377227 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:aec01a7e: tm: proper fill of From/To URI/tag values using parsed structure in rpc_t_uac()
Module: kamailio Branch: master Commit: aec01a7e10be54d2e2d9a91e54157a5bdda21e83 URL: https://github.com/kamailio/kamailio/commit/aec01a7e10be54d2e2d9a91e54157a5bdda21e83 Author: Maksim Nesterov Committer: Daniel-Constantin Mierla Date: 2022-10-13T12:18:01+02:00 tm: proper fill of From/To URI/tag values using parsed structure in rpc_t_uac() --- Modified: src/modules/tm/rpc_uac.c --- Diff: https://github.com/kamailio/kamailio/commit/aec01a7e10be54d2e2d9a91e54157a5bdda21e83.diff Patch: https://github.com/kamailio/kamailio/commit/aec01a7e10be54d2e2d9a91e54157a5bdda21e83.patch --- diff --git a/src/modules/tm/rpc_uac.c b/src/modules/tm/rpc_uac.c index 4ca2274c9d7..5c2fc7be56a 100644 --- a/src/modules/tm/rpc_uac.c +++ b/src/modules/tm/rpc_uac.c @@ -240,7 +240,7 @@ void tm_rpc_response_list_clean(unsigned int ticks, void *param) static int rpc_uac_check_msg(rpc_t *rpc, void* c, struct sip_msg* msg, str* method, str* body, - int* fromtag, int *cseq_is, int* cseq, + str* fromtag, int *cseq_is, int* cseq, str* callid) { struct to_body* parsed_from; @@ -275,7 +275,13 @@ static int rpc_uac_check_msg(rpc_t *rpc, void* c, } parsed_from = (struct to_body*)msg->from->parsed; - *fromtag = parsed_from->tag_value.s && parsed_from->tag_value.len; + if(parsed_from->tag_value.s && parsed_from->tag_value.len) { + fromtag->s = parsed_from->tag_value.s; + fromtag->len = parsed_from->tag_value.len; + } else { + fromtag->s = NULL; + fromtag->len = 0; + } *cseq = 0; if (msg->cseq && (parsed_cseq = get_cseq(msg))) { @@ -634,7 +640,8 @@ static void rpc_t_uac(rpc_t* rpc, void* c, int reply_wait) struct socket_info* ssock; str saddr; int sport, sproto; - int ret, sip_error, err_ret, fromtag, cseq_is, cseq; + int ret, sip_error, err_ret, cseq_is, cseq; + str fromtag; char err_buf[MAX_REASON_LEN]; dlg_t dlg; uac_req_t uac_req; @@ -728,7 +735,9 @@ static void rpc_t_uac(rpc_t* rpc, void* c, int reply_wait) */ /* Generate fromtag if not present */ - if (!fromtag) { + if (fromtag.s && fromtag.len) { + dlg.id.loc_tag = fromtag; + } else { generate_fromtag(_tag, _id, ); } @@ -737,8 +746,11 @@ static void rpc_t_uac(rpc_t* rpc, void* c, int reply_wait) else dlg.loc_seq.value = DEFAULT_CSEQ; dlg.loc_seq.is_set = 1; - dlg.loc_uri = faked_msg.from->body; - dlg.rem_uri = faked_msg.to->body; + dlg.loc_uri = get_from(_msg)->uri; + dlg.rem_uri = get_to(_msg)->uri; + if(get_to(_msg)->tag_value.len > 0) { + dlg.id.rem_tag = get_to(_msg)->tag_value; + } dlg.rem_target = ruri; dlg.dst_uri = nexthop; dlg.send_sock=ssock; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:c8bd10f7: kex: added fixup free functions to module exports
Module: kamailio Branch: master Commit: c8bd10f791ef7aa48a16104472b039a8ca1a53c5 URL: https://github.com/kamailio/kamailio/commit/c8bd10f791ef7aa48a16104472b039a8ca1a53c5 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2022-10-13T11:59:53+02:00 kex: added fixup free functions to module exports --- Modified: src/modules/kex/kex_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/c8bd10f791ef7aa48a16104472b039a8ca1a53c5.diff Patch: https://github.com/kamailio/kamailio/commit/c8bd10f791ef7aa48a16104472b039a8ca1a53c5.patch --- diff --git a/src/modules/kex/kex_mod.c b/src/modules/kex/kex_mod.c index 21c4161ac9c..e46e85b5cf4 100644 --- a/src/modules/kex/kex_mod.c +++ b/src/modules/kex/kex_mod.c @@ -71,23 +71,23 @@ static pv_export_t mod_pvs[] = { static cmd_export_t cmds[]={ {"setsflag", (cmd_function)w_setsflag, 1,fixup_igp_null, - 0, ANY_ROUTE }, + fixup_free_igp_null, ANY_ROUTE }, {"resetsflag", (cmd_function)w_resetsflag, 1,fixup_igp_null, - 0, ANY_ROUTE }, + fixup_free_igp_null, ANY_ROUTE }, {"issflagset", (cmd_function)w_issflagset, 1,fixup_igp_null, - 0, ANY_ROUTE }, + fixup_free_igp_null, ANY_ROUTE }, {"setbflag", (cmd_function)w_setbflag, 1,fixup_igp_null, - 0, ANY_ROUTE }, + fixup_free_igp_null, ANY_ROUTE }, {"setbflag", (cmd_function)w_setbflag, 2,fixup_igp_igp, - 0, ANY_ROUTE }, + fixup_free_igp_igp, ANY_ROUTE }, {"resetbflag", (cmd_function)w_resetbflag, 1,fixup_igp_null, - 0, ANY_ROUTE }, + fixup_free_igp_null, ANY_ROUTE }, {"resetbflag", (cmd_function)w_resetbflag, 2,fixup_igp_igp, - 0, ANY_ROUTE }, + fixup_free_igp_igp, ANY_ROUTE }, {"isbflagset", (cmd_function)w_isbflagset, 1,fixup_igp_null, - 0, ANY_ROUTE }, + fixup_free_igp_null, ANY_ROUTE }, {"isbflagset", (cmd_function)w_isbflagset, 2,fixup_igp_igp, - 0, ANY_ROUTE }, + fixup_free_igp_igp, ANY_ROUTE }, {"setdsturi", (cmd_function)w_setdsturi, 1, fixup_spve_null, fixup_free_spve_null, ANY_ROUTE }, {"resetdsturi", (cmd_function)w_resetdsturi, 0, 0, @@ -99,9 +99,9 @@ static cmd_export_t cmds[]={ {"avp_printf", (cmd_function)w_pv_printf, 2, pv_printf_fixup, 0, ANY_ROUTE }, {"is_myself", (cmd_function)w_is_myself,1, fixup_spve_null, - 0, ANY_ROUTE }, + fixup_free_spve_null, ANY_ROUTE }, {"setdebug", (cmd_function)w_setdebug, 1, fixup_igp_null, - 0, ANY_ROUTE }, + fixup_free_igp_null, ANY_ROUTE }, {"resetdebug", (cmd_function)w_resetdebug, 0, 0, 0, ANY_ROUTE }, ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@oej commented on this pull request. > @@ -324,6 +324,27 @@ modparam("mqtt", "ca_path", "/etc/ssl/certs") ... modparam("mqtt", "tls_method", "tlsv1.3") +... + + + + + tls_alpn (str) + +Used to set the TLS ALPN option for cases where one TLS port is used to share multiple services. Prominent +example is AWS IoT, where you have to set the tls_alpn to "mqtt" to be able to connect +via MQTT. + + + + Default value is NULL, where no ALPN is set on the TLS connection. Thank you for doing that. Agreed! -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#discussion_r994291673 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@agranig commented on this pull request. > @@ -324,6 +324,27 @@ modparam("mqtt", "ca_path", "/etc/ssl/certs") ... modparam("mqtt", "tls_method", "tlsv1.3") +... + + + + + tls_alpn (str) + +Used to set the TLS ALPN option for cases where one TLS port is used to share multiple services. Prominent +example is AWS IoT, where you have to set the tls_alpn to "mqtt" to be able to connect +via MQTT. + + + + Default value is NULL, where no ALPN is set on the TLS connection. Alright. So, I will keep the docs for this commit as-is with the NULL, so it's consistent with the documentation of the other params in this module. In parallel, I've prepared another PR on top of this one, which changes the docs of all module parameters at once, changing the wording from NULL to `Default value is that option is not set ([description of implication this has, e.g. random id or no auth or whatever])`. Agreed? -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#discussion_r994281090 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] NATS Module not working (Issue #3253)
The last backtraces are from crashes at shut down, probably because kamailio was not able to start and the nats structures were not initialized. I pushed the commit bc97b7adf77406dfc08b57b4a7df912a76d324e5 with a safety check for this case. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3253#issuecomment-1277172440 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:bc97b7ad: nats: safety check on nats_workers inside mod destroy
Module: kamailio Branch: master Commit: bc97b7adf77406dfc08b57b4a7df912a76d324e5 URL: https://github.com/kamailio/kamailio/commit/bc97b7adf77406dfc08b57b4a7df912a76d324e5 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2022-10-13T09:40:44+02:00 nats: safety check on nats_workers inside mod destroy --- Modified: src/modules/nats/nats_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/bc97b7adf77406dfc08b57b4a7df912a76d324e5.diff Patch: https://github.com/kamailio/kamailio/commit/bc97b7adf77406dfc08b57b4a7df912a76d324e5.patch --- diff --git a/src/modules/nats/nats_mod.c b/src/modules/nats/nats_mod.c index 852d0fbbab2..b89bab5bd12 100644 --- a/src/modules/nats/nats_mod.c +++ b/src/modules/nats/nats_mod.c @@ -600,6 +600,9 @@ int nats_destroy_workers() */ static void mod_destroy(void) { + if(nats_workers==NULL) { + return; + } if(nats_destroy_workers() < 0) { LM_ERR("could not cleanup workers\n"); } ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] BUG: freeing already freed pointer (0x7f19a3edec68), called from tls: tls_init.c with random core dumps (Issue #3205)
Closed #3205 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3205#event-7578317792 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@oej commented on this pull request. > @@ -324,6 +324,27 @@ modparam("mqtt", "ca_path", "/etc/ssl/certs") ... modparam("mqtt", "tls_method", "tlsv1.3") +... + + + + + tls_alpn (str) + +Used to set the TLS ALPN option for cases where one TLS port is used to share multiple services. Prominent +example is AWS IoT, where you have to set the tls_alpn to "mqtt" to be able to connect +via MQTT. + + + + Default value is NULL, where no ALPN is set on the TLS connection. That's a bad one with "NULL" in quotes like it's a settable value. Let's focus now on make this new option better, and then we'll work on improving the existing docs to something non-developers may understand :-) -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#discussion_r994252349 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@agranig commented on this pull request. > @@ -324,6 +324,27 @@ modparam("mqtt", "ca_path", "/etc/ssl/certs") ... modparam("mqtt", "tls_method", "tlsv1.3") +... + + + + + tls_alpn (str) + +Used to set the TLS ALPN option for cases where one TLS port is used to share multiple services. Prominent +example is AWS IoT, where you have to set the tls_alpn to "mqtt" to be able to connect +via MQTT. + + + + Default value is NULL, where no ALPN is set on the TLS connection. It's a bit of a rabbit hole. https://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.p.db_url is one of the most famous ones I guess. Any good example how to properly document a non-set behavior, so it's consistent? -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#discussion_r994249789 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@agranig commented on this pull request. > @@ -324,6 +324,27 @@ modparam("mqtt", "ca_path", "/etc/ssl/certs") ... modparam("mqtt", "tls_method", "tlsv1.3") +... + + + + + tls_alpn (str) + +Used to set the TLS ALPN option for cases where one TLS port is used to share multiple services. Prominent +example is AWS IoT, where you have to set the tls_alpn to "mqtt" to be able to connect +via MQTT. + + + + Default value is NULL, where no ALPN is set on the TLS connection. Is there actually good practice on how to document a param which has no default value (aka is NULL)? I'm finding quite some old modules having it documented like this, see https://www.kamailio.org/docs/modules/devel/modules/auth_db.html#auth_db.p.load_credentials for example. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#discussion_r994245839 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@oej commented on this pull request. > @@ -324,6 +324,27 @@ modparam("mqtt", "ca_path", "/etc/ssl/certs") ... modparam("mqtt", "tls_method", "tlsv1.3") +... + + + + + tls_alpn (str) + +Used to set the TLS ALPN option for cases where one TLS port is used to share multiple services. Prominent +example is AWS IoT, where you have to set the tls_alpn to "mqtt" to be able to connect +via MQTT. + + + + Default value is NULL, where no ALPN is set on the TLS connection. Fully agree, my intention was to change the others separately. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#discussion_r994245271 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@henningw commented on this pull request. > @@ -324,6 +324,27 @@ modparam("mqtt", "ca_path", "/etc/ssl/certs") ... modparam("mqtt", "tls_method", "tlsv1.3") +... + + + + + tls_alpn (str) + +Used to set the TLS ALPN option for cases where one TLS port is used to share multiple services. Prominent +example is AWS IoT, where you have to set the tls_alpn to "mqtt" to be able to connect +via MQTT. + + + + Default value is NULL, where no ALPN is set on the TLS connection. Yes, lets not mix this PR with other enhancements. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#discussion_r994242490 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@agranig commented on this pull request. > @@ -324,6 +324,27 @@ modparam("mqtt", "ca_path", "/etc/ssl/certs") ... modparam("mqtt", "tls_method", "tlsv1.3") +... + + + + + tls_alpn (str) + +Used to set the TLS ALPN option for cases where one TLS port is used to share multiple services. Prominent +example is AWS IoT, where you have to set the tls_alpn to "mqtt" to be able to connect +via MQTT. + + + + Default value is NULL, where no ALPN is set on the TLS connection. I'd propose to do this in a second step to not mix commits. So I'm going to amend the current one, and in a second pull request change the wording of all mod params regarding NULL -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#discussion_r994237590 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@agranig pushed 1 commit. bf5cf64f1daf8f0c8062e32d116c5da357fe516d mqtt: Add tls_alpn module option -- View it on GitHub: https://github.com/kamailio/kamailio/pull/3261/files/43981e28e4fa48f6f6f69af1594f671742d1e4cf..bf5cf64f1daf8f0c8062e32d116c5da357fe516d You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@oej commented on this pull request. > @@ -324,6 +324,27 @@ modparam("mqtt", "ca_path", "/etc/ssl/certs") ... modparam("mqtt", "tls_method", "tlsv1.3") +... + + + + + tls_alpn (str) + +Used to set the TLS ALPN option for cases where one TLS port is used to share multiple services. Prominent +example is AWS IoT, where you have to set the tls_alpn to "mqtt" to be able to connect +via MQTT. + + + + Default value is NULL, where no ALPN is set on the TLS connection. Yes, I think we have to change the others. NULL is in the code, not in the configuration. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#discussion_r994233694 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@agranig commented on this pull request. > @@ -324,6 +324,27 @@ modparam("mqtt", "ca_path", "/etc/ssl/certs") ... modparam("mqtt", "tls_method", "tlsv1.3") +... + + + + + tls_alpn (str) + +Used to set the TLS ALPN option for cases where one TLS port is used to share multiple services. Prominent +example is AWS IoT, where you have to set the tls_alpn to "mqtt" to be able to connect +via MQTT. + + + + Default value is NULL, where no ALPN is set on the TLS connection. Ok. The wording is taken from other params in this module (see https://www.kamailio.org/docs/modules/devel/modules/mqtt.html#mqtt.p.id). So we could say "The default is that his modparam is not set, which means that no TLS ALPN is used"? -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#discussion_r994231540 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@oej commented on this pull request. > @@ -324,6 +324,27 @@ modparam("mqtt", "ca_path", "/etc/ssl/certs") ... modparam("mqtt", "tls_method", "tlsv1.3") +... + + + + + tls_alpn (str) + +Used to set the TLS ALPN option for cases where one TLS port is used to share multiple services. Prominent +example is AWS IoT, where you have to set the tls_alpn to "mqtt" to be able to connect +via MQTT. + + + + Default value is NULL, where no ALPN is set on the TLS connection. You can't set NULL in a mod-param. I would say that "Default value is empty string, which means that no TLS ALPN is used. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#pullrequestreview-1140170312 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@oej commented on this pull request. > @@ -224,6 +224,17 @@ int mqtt_run_dispatcher(mqtt_dispatcher_cfg_t* cfg) LM_ERR("mosquitto_tls_set() failed: %d %s\n",errno, strerror(errno)); return -1; } +if (cfg->tls_alpn != NULL) { +#if LIBMOSQUITTO_VERSION_NUMBER >= 1006000 +res = mosquitto_string_option(_mosquitto, MOSQ_OPT_TLS_ALPN, cfg->tls_alpn); +if (res != MOSQ_ERR_SUCCESS) { +LM_ERR("mosquitto_string_option() failedi setting tls alpn: %d %s\n",errno, strerror(errno)); TLS upper case -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#discussion_r994226551 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
@oej commented on this pull request. > @@ -224,6 +224,17 @@ int mqtt_run_dispatcher(mqtt_dispatcher_cfg_t* cfg) LM_ERR("mosquitto_tls_set() failed: %d %s\n",errno, strerror(errno)); return -1; } +if (cfg->tls_alpn != NULL) { +#if LIBMOSQUITTO_VERSION_NUMBER >= 1006000 +res = mosquitto_string_option(_mosquitto, MOSQ_OPT_TLS_ALPN, cfg->tls_alpn); +if (res != MOSQ_ERR_SUCCESS) { +LM_ERR("mosquitto_string_option() failedi setting tls alpn: %d %s\n",errno, strerror(errno)); "failedi" ? -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261#pullrequestreview-1140169130 You are receiving this because you are subscribed to this thread. Message ID: ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] mqtt: Add tls_alpn module option (PR #3261)
This is used when a service (like AWS IoT Core) uses one TLS port for multiple services (like https and mqtt), so you have to set the ALPN to mqtt to be able to connect kamailio. !-- Kamailio Pull Request Template -- !-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with git cherry-pick -x ... - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -- Pre-Submission Checklist !-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -- !-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-- !-- If youre unsure about any of these, dont hesitate to ask on sr-dev mailing list -- - [x] Commit message has the format required by CONTRIBUTING guide - [x] Commits are split per component (core, individual modules, libs, utils, ...) - [x] Each component has a single commit (if not, squash them into one commit) - [x] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [ ] PR should be backported to stable branches - [x] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description !-- Describe your changes in detail -- Some services use ALPN to have one single TLS port serving multiple protocols, in order to avoid additional round-trips for negotiating TLS connections. https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation has the details. One of those services using ALPN is AWS IoT Core, which allows components to send messages both via HTTP and MQTT to AWS for further processing (e.g. logging, analysis, storage to db etc). This patch enables kamailio to communicate with this service by allowing the kamailio admin to set the mqtt.so module mod-param *tls_alpn* to *mqtt*. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/3261 -- Commit Summary -- * mqtt: Add tls_alpn module option -- File Changes -- M src/modules/mqtt/doc/mqtt_admin.xml (21) M src/modules/mqtt/mqtt_dispatch.c (13) M src/modules/mqtt/mqtt_dispatch.h (3) M src/modules/mqtt/mqtt_mod.c (5) -- Patch Links -- https://github.com/kamailio/kamailio/pull/3261.patch https://github.com/kamailio/kamailio/pull/3261.diff -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3261 You are receiving this because you are subscribed to this thread. Message ID: kamailio/kamailio/pull/3...@github.com ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev