[sr-dev] Re: [kamailio/kamailio] file_out: Add prefix support with PVs and refactor properties in structure. (PR #3763)
Merged #3763 into master. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3763#event-11895326877 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] [kamailio/kamailio] file_out: Add prefix support with PVs and refactor properties in structure. (PR #3763)
Pre-Submission Checklist - [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) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: - [ ] PR should be backported to stable branches - [x] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description This PR adds the support of using PVs in the `prefix` parameter. Also refactors the properties into a structure for each file. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/3763 -- Commit Summary -- * file_out: Prefix can use PVs * file_out: Refactor -- File Changes -- M src/modules/file_out/file_out.c (140) M src/modules/file_out/types.c (38) M src/modules/file_out/types.h (17) -- Patch Links -- https://github.com/kamailio/kamailio/pull/3763.patch https://github.com/kamailio/kamailio/pull/3763.diff -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3763 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] User-params parsing fails in multiple ways (Issue #3762)
Debug log with EXTRA_DEBUG enabled for call scenario 100: ``` 1(2262224) DEBUG: [core/udp_server.c:494]: udp_rcv_loop(): received on udp socket: (106/100/493) [[INVITE sip:100@172.16.1.19:7060;user=phone SIP/2.0 0D 0A Via: SIP/2.0/UDP 172.16.1.19:7001;branch=z9hG4bK]] 1(2262224) DEBUG: [core/parser/parse_fline.c:249]: parse_first_line(): first line type 1 (request) flags 1 1(2262224) DEBUG: [core/parser/msg_parser.c:677]: parse_msg(): SIP Request: 1(2262224) DEBUG: [core/parser/msg_parser.c:678]: parse_msg(): method: 1(2262224) DEBUG: [core/parser/msg_parser.c:680]: parse_msg(): uri: 1(2262224) DEBUG: [core/parser/msg_parser.c:682]: parse_msg(): version: 1(2262224) DEBUG: [core/parser/msg_parser.c:324]: parse_headers(): flags=2 1(2262224) DEBUG: [core/parser/parse_hname2.c:301]: parse_sip_header_name(): parsed header name [Via] type 1 1(2262224) DEBUG: [core/parser/parse_via.c:1300]: parse_via_param(): Found param type 232, = ; state=16 1(2262224) DEBUG: [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5 1(2262224) DEBUG: [core/parser/msg_parser.c:555]: parse_headers(): Via found, flags=2 1(2262224) DEBUG: [core/parser/msg_parser.c:557]: parse_headers(): this is the first via 1(2262224) DEBUG: [core/parser/msg_parser.c:618]: parse_headers(): header field type 1, name=, body= 1(2262224) DEBUG: [core/parser/msg_parser.c:709]: parse_msg(): first via: <172.16.1.19:7001(7001)> 1(2262224) DEBUG: [core/parser/msg_parser.c:717]: parse_msg(): ;<> 1(2262224) DEBUG: [core/parser/msg_parser.c:720]: parse_msg(): 1(2262224) DEBUG: [core/parser/msg_parser.c:740]: parse_msg(): exiting parse_msg 1(2262224) DEBUG: [core/parser/msg_parser.c:324]: parse_headers(): flags=78 1(2262224) DEBUG: [core/parser/parse_hname2.c:301]: parse_sip_header_name(): parsed header name [From] type 4 1(2262224) DEBUG: [core/parser/msg_parser.c:618]: parse_headers(): header field type 4, name=, body=<"test" ;tag=1> 1(2262224) DEBUG: [core/parser/parse_hname2.c:301]: parse_sip_header_name(): parsed header name [To] type 3 1(2262224) DEBUG: [core/parser/parse_addr_spec.c:884]: parse_addr_spec(): end of header reached, state=10 1(2262224) DEBUG: [core/parser/msg_parser.c:172]: get_hdr_field(): [39]; uri=[sip:100@172.16.1.19:7060;user=phone] 1(2262224) DEBUG: [core/parser/msg_parser.c:174]: get_hdr_field(): to body (39)[ ], to tag (0)[] 1(2262224) DEBUG: [core/parser/msg_parser.c:618]: parse_headers(): header field type 3, name=, body=<> 1(2262224) DEBUG: [core/parser/parse_hname2.c:301]: parse_sip_header_name(): parsed header name [Call-ID] type 6 1(2262224) DEBUG: [core/parser/msg_parser.c:618]: parse_headers(): header field type 6, name=, body=<1-2262234@172.16.1.19> 1(2262224) DEBUG: [core/parser/parse_hname2.c:301]: parse_sip_header_name(): parsed header name [CSeq] type 5 1(2262224) DEBUG: [core/parser/msg_parser.c:152]: get_hdr_field(): cseq : <1> 1(2262224) DEBUG: [core/parser/msg_parser.c:618]: parse_headers(): header field type 5, name=, body=<1 INVITE> 1(2262224) DEBUG: [core/receive.c:389]: receive_msg(): --- received sip message - request - call-id: [1-2262234@172.16.1.19] - cseq: [1 INVITE] 1(2262224) DEBUG: [core/receive.c:261]: ksr_evrt_pre_routing(): event route core:pre-routing not defined 1(2262224) DEBUG: [core/receive.c:471]: receive_msg(): preparing to run routing scripts... 1(2262224) DEBUG: [core/parser/parse_uri.c:1252]: parse_uri(): state=11 1(2262224) DEBUG: [core/parser/parse_uri.c:1253]: parse_uri(): parsed uri: type=3 user=<100>(3) passwd=<>(0) host=<172.16.1.19>(11) port=<7060>(4): 7060 params=<>(0) headers=<>(0) 1(2262224) DEBUG: [core/parser/parse_uri.c:1264]: parse_uri(): uri flags : 1(2262224) DEBUG: [core/parser/parse_uri.c:1266]: parse_uri(): sip_user_phone 1(2262224) DEBUG: [core/parser/parse_uri.c:1267]: parse_uri():value=2 1(2262224) DEBUG: [core/parser/parse_uri.c:1268]: parse_uri(): uri params: transport=<>, val=<>, proto=0 1(2262224) DEBUG: [core/parser/parse_uri.c:1271]: parse_uri(): user-param=, val= 1(2262224) DEBUG: [core/parser/parse_uri.c:1274]: parse_uri(): method=<>, val=<> 1(2262224) DEBUG: [core/parser/parse_uri.c:1277]: parse_uri(): ttl=<>, val=<> 1(2262224) DEBUG: [core/parser/parse_uri.c:1280]: parse_uri(): maddr=<>, val=<> 1(2262224) DEBUG: [core/parser/parse_uri.c:1283]: parse_uri():lr=<> 1(2262224) DEBUG: [core/parser/parse_uri.c:1284]: parse_uri():r2=<> 1(2262224) DEBUG: [core/pvapi.c:1509]: pv_printf_mode(): final buffer length 23 1(2262224) NOTICE: Incoming INVITE to 100 1(2262224) DEBUG: [core/pvapi.c:1509]: pv_printf_mode(): final buffer length 42 1(2262224) INFO: $ru = sip:100@172.16.1.19:7060;user=phone 1(2262224) DEBUG: [core/pvapi.c:1509]: pv_printf_mode(): final buffer length 27 1(2262224) NOTICE: Set $rU = "1234;first=yes" 1(2262224) DEBUG: [core/parser/parse_uri
[sr-dev] [kamailio/kamailio] User-params parsing fails in multiple ways (Issue #3762)
### Description The uri parser seems to fail in multiple ways on username-parameters. The ways it fails depends on the presence of user-params in the incoming request and on adjustments to $ru, $rd and $rU in the script. My expectation is that the whole username, including user-params is *always* visible in $rU. In reality, the user-params are absent or present depending on manipulations to the uri in the script. When setting $rU to a value with a user-param, that user-param is represented when reading $ru, but not in $rU. ### Troubleshooting Reproduction I used below config script to test various scenario's. ``` debug=2 memlog=4 #fork=no# This option should not be present to enable forking but disable daemonize, also -D commandline parameter is needed log_stderror=yes log_name="kamailio-test" log_facility=LOG_LOCAL5 sip_warning=no children=2 shm_mem_size=128 check_via=no# (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) dns_use_search_list=no use_dns_failover=yes dns_srv_lb=yes disable_tcp=yes auto_aliases=no listen=172.16.1.19:7060 loadmodule "sl.so" loadmodule "pv.so" loadmodule "xlog.so" modparam("xlog", "prefix", "") route { xnotice("Incoming $rm to $rU\n"); xinfo("$$ru = $ru\n"); switch ($rU) { case "100": xnotice("Set $$rU = \"1234;first=yes\"\n"); $rU = "1234;first=yes"; xinfo("$$ru: $ru\n"); xinfo("$$rU: $rU\n"); if ($rU != "1234;first=yes") { xerr("Fail!\n"); } else { xinfo("Success!\n"); } break; case "200": xnotice("Set $$rd = \"example.com;transport=udp\"\n"); $rd = "example.com;transport=udp"; xinfo("$$ru: $ru\n"); xinfo("$$rU: $rU\n"); xnotice("Set $$rU = \"1234;first=yes\"\n"); $rU = "1234;first=yes"; xinfo("$$ru: $ru\n"); xinfo("$$rU: $rU\n"); if ($rU != "1234;first=yes") { xerr("Fail!\n"); } else { xinfo("Success!\n"); } break; case "300": xnotice("Set $$ru = \"sip:1...@example.com;transport=udp\"\n"); $ru = "sip:1...@example.com;transport=udp"; xinfo("$$ru: $ru\n"); xinfo("$$rU: $rU\n"); xnotice("Set $$rU = \"1234;first=yes\"\n"); $rU = "1234;first=yes"; xinfo("$$ru: $ru\n"); xinfo("$$rU: $rU\n"); if ($rU != "1234;first=yes") { xerr("Fail!\n"); } else { xinfo("Success!\n"); } break; case "400": xnotice("Set $$ru = \"sip:1234;first=y...@example.com;transport=udp\"\n"); $ru = "sip:1234;first=y...@example.com;transport=udp"; xinfo("$$ru: $ru\n"); xinfo("$$rU: $rU\n"); if ($rU != "1234;first=yes") { xerr("Fail!\n"); } else { xinfo("Success!\n"); } xnotice("Set $$rU = \"1234;second=yes\"\n"); $rU = "1234;second=yes"; xinfo("$$ru: $ru\n"); xinfo("$$rU: $rU\n"); if ($rU != "1234;second=yes") { xerr("Fail!\n"); } else { xinfo("Success!\n"); } break; } sl_send_reply(500, "Done"); exit; } ``` Outputs: --- ``` 1(2206122) NOTICE: Incoming INVITE to 100 1(2206122) INFO: $ru = sip:100@172.16.1.19:7060;user=phone 1(2206122) NOTICE: Set $rU = "1234;first=yes" 1(2206122) INFO: $ru: sip:1234;first=yes@172.16.1.19:7060;user=phone 1(2206122) INFO: $rU: 1234 1(2206122) ERROR: Fail! ``` Setting $rU with a user-param sets it correctly in $ru, but reading $rU back fails. --- ``` 1(2206122) NOTICE: Incoming INVITE to 200 1(2206122) INFO: $ru = sip:200@172.16.1.19:7060;user=phone 1(2206122) NOTICE: Set $rd = "example.com;transport=udp" 1(2206122) INFO: $ru: sip:2...@example.com;transport=udp:7060;user=phone 1(2206122) INFO: $rU: 200 1(2206122
[sr-dev] Re: [kamailio/kamailio] Segfault in pua_dialoginfo.c when starting up with a dialog in the database (Issue #3743)
Thanks for the feedback and sorry for the delay. I reproduced the crash today by importing the dump of the db I made when the crash originally occurred. I got 3 core dumps. Two have the backtrace as above, with `free_str_list_all` at the top of the call stack, thus neither of those is (if I understand correctly) the process from which the problem originated. The third coredump has the following backtrace: ``` (gdb) bt full #0 0x7ffa4c365840 in dialog_publish_multi (state=state@entry=0x7ffa4c36c267 "terminated", ruris=0x2e656c706d617865, entity=entity@entry=0x7ffd855c6440, peer=peer@entry=0x7ffd855c6450, callid=callid@entry=0x7ffa5077cdf0, initiator=initiator@entry=1, lifetime=10, localtag=0x0, remotetag=0x0, localtarget=0x7ffa5077ce20, remotetarget=0x7ffd855c6430, do_pubruri_localcheck=0, uuid=0x7ffa5077ce50) at /usr/local/src/pkg/src/modules/pua_dialoginfo/dialog_publish.c:410 __llevel = 3 __func__ = "dialog_publish_multi" #1 0x7ffa4c366f70 in __dialog_sendpublish (dlg=, type=, _params=) at /usr/local/src/pkg/src/modules/pua_dialoginfo/pua_dialoginfo.c:402 tag = {s = 0x0, len = 0} uri = { s = 0x7ffa5077ce7c "sip:*9001*0039123456@example.voismart.commsowdcchfzrlapg@localhostmsfvzsip:*9001*0039123456@example.voismart.comsip:101_example_voismart_com@172.23.42.1:5065;alias=192.168.1.201~32878~1padi-1-65d7243e"..., len = 41} identity_local = { s = 0x7ffa5077ce60 "sip:101@example.voismart.comsip:*9001*0039123456@example.voismart.commsowdcchfzrlapg@localhostmsfvzsip:*9001*0039123456@example.voismart.comsip:101_example_voismart_com@172.23.42.1:5065;alias=192.168."..., len = 28} target = {s = 0x0, len = 0} dlginfo = 0x7ffa5077cdc8 request = 0x0 __func__ = "__dialog_sendpublish" #2 0x7ffa4f0b5867 in run_dlg_callbacks (type=64, dlg=0x7ffa500318a0, req=, rpl=, dir=, dlg_data=) at /usr/local/src/pkg/src/modules/dialog/dlg_cb.c:269 cb = 0x7ffa5077d050 __func__ = "run_dlg_callbacks" #3 0x7ffa4f115df7 in dlg_bye_all (dlg=0x7ffa500318a0, hdrs=0x0) at /usr/local/src/pkg/src/modules/dialog/dlg_req_within.c:858 all_hdrs = {s = 0x0, len = 0} ret = __func__ = "dlg_bye_all" #4 0x7ffa4f0e6669 in dlg_ontimeout (tl=0x7ffa50031900) at /usr/local/src/pkg/src/modules/dialog/dlg_handlers.c:1670 dlg = 0x7ffa500318a0 new_state = 22098 old_state = 72604856 unref = 22098 fmsg = timeout_cb = 0x0 keng = evname = {s = 0x4b , len = 72378941} __func__ = "dlg_ontimeout" #5 0x7ffa4f109460 in dlg_timer_routine (ticks=, attr=) at /usr/local/src/pkg/src/modules/dialog/dlg_timer.c:281 tl = 0x0 ctl = 0x7ffa50031900 __func__ = "dlg_timer_routine" #6 0x56520433e01b in compat_old_handler (ti=, tl=, data=) at core/timer.c:980 t = #7 0x565204353c29 in slow_timer_main () at core/timer.c:1103 n = ret = tl = 0x7ffa4ff1f428 i = __func__ = "slow_timer_main" #8 0x5652040c2fec in main_loop () at /usr/local/src/pkg/src/main.c:1490 i = pid = --Type for more, q to quit, c to continue without paging-- si = si_desc = "udp receiver child=31 sock=172.23.42.2:\000RV\000\000\000 \034X\372\177\000\000\003\000\000\000\377\377\377\377\004`P\004RV\000\000\004\000\000\000\372\177\000\000\003\000\000\000\000\000\000\000\t\000\000\000\000\000\000\000Thu Feb \000qv1\335c\376\356:54 2024\005\000\000\000\000\000\000" nrprocs = woneinit = 1 error = __func__ = "main_loop" #9 0x5652040b6ffc in main (argc=, argv=) at /usr/local/src/pkg/src/main.c:3212 cfg_stream = c = r = tmp = 0x7ffd855c8db4 "" tmp_len = 0 port = 32765 proto = -2057539472 ahost = 0x0 aport = 0 options = 0x565204509300 ":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 = 1294483928 rfd = debug_save = debug_flag = dont_fork_cnt = n_lst = p = st = {st_dev = 198, st_ino = 827616256, st_nlink = 1, st_mode = 16872, st_uid = 101, st_gid = 101, __pad0 = 0, st_rdev = 0, st_size = 6, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1708594589, tv_nsec = 533404421}, st_mtim = {tv_sec = 1708598142, tv_nsec = 117863927}, st_ctim = {tv_sec = 1708598142, tv_nsec = 117863927}, __glibc_reserved = {0, 0, 0}} tbuf = '\000' , '/' , "\230\r", '\000' , "`", '\000' , "\001", '\000' ... option_index = 12 __func__ = "main" long_options = {{name = 0x565204508fe2 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x565204510dc8 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x565204520731 "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0
[sr-dev] Re: [kamailio/kamailio] microhttpd: fixed typo in the documentation (PR #3761)
merged manually with small change in commit message. Thanks! -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3761#issuecomment-1959039317 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] microhttpd: fixed typo in the documentation (PR #3761)
Closed #3761. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3761#event-11888359436 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:ff8229b5: microhttpd: fixed typo in the documentation [skip ci]
Module: kamailio Branch: master Commit: ff8229b58d6f91bae527bc2f5912c7d291c55268 URL: https://github.com/kamailio/kamailio/commit/ff8229b58d6f91bae527bc2f5912c7d291c55268 Author: falshunov <37283637+falshu...@users.noreply.github.com> Committer: Victor Seva Date: 2024-02-22T10:28:11+01:00 microhttpd: fixed typo in the documentation [skip ci] --- Modified: src/modules/microhttpd/doc/microhttpd_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/ff8229b58d6f91bae527bc2f5912c7d291c55268.diff Patch: https://github.com/kamailio/kamailio/commit/ff8229b58d6f91bae527bc2f5912c7d291c55268.patch --- diff --git a/src/modules/microhttpd/doc/microhttpd_admin.xml b/src/modules/microhttpd/doc/microhttpd_admin.xml index a50edb79818..1967c845b82 100644 --- a/src/modules/microhttpd/doc/microhttpd_admin.xml +++ b/src/modules/microhttpd/doc/microhttpd_admin.xml @@ -43,7 +43,7 @@ - libmicrohhtpd - libmicrohttpd library + libmicrohttpd - libmicrohttpd library ___ Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
[sr-dev] [kamailio/kamailio] microhttpd: fixed typo in the documentation (PR #3761)
Pre-Submission Checklist - [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) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: - [ ] PR should be backported to stable branches - [ ] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/3761 -- Commit Summary -- * microhttpd: fixed typo in the documentation -- File Changes -- M src/modules/microhttpd/doc/microhttpd_admin.xml (2) -- Patch Links -- https://github.com/kamailio/kamailio/pull/3761.patch https://github.com/kamailio/kamailio/pull/3761.diff -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3761 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