[sr-dev] Re: [kamailio/kamailio] group include ktls no longer works after 7f07a6ef9ae90baee4281394d0dcf505b30c8fcb (Issue #3660)
Thanks @linuxmaniac would this be ok to backport to 5.7? -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3660#issuecomment-1832271880 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] group include ktls no longer works after 7f07a6ef9ae90baee4281394d0dcf505b30c8fcb (Issue #3660)
After 7f07a6ef9ae90baee4281394d0dcf505b30c8fcb, building the ktls group doesn't work as it's not included in the #else statement. I don't have a need for ktlsa at this point. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3660 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
Re: [sr-dev] [SR-Users] Testing dialog module (and acc with dialog cdrs)
Hi Daniel. Thank you for back porting the acc and dialog changes to 5.6 -- I continue to test, but can report that the updates on the 5.6 branch through bfc5c2aacb272e91da80096ef27fbe6fcfe9a746 are working properly for acc/dialog- based CDR generation. -A On Monday, September 26, 2022 6:30:04 AM CDT Daniel-Constantin Mierla 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. > > Cheers, > Daniel ___ 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] 5.6 @ ebda78c92c inserts wrong timestamps in acc_cdrs table (Issue #3243)
Closed #3243 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3243#event-7473416095 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] 5.6 @ ebda78c92c inserts wrong timestamps in acc_cdrs table (Issue #3243)
@miconda and @henningw, with 5.6 branch updates through bfc5c2aa, all is well again. I'll continue to watch and will create new issues if any arise. Otherwise, since the "issue" in this report is now resolved in the 5.6 branch, I will close. Thank you for the backport. ``` kamailio[214299]: INFO: acc [acc_cdr.c:392]: log_write_cdr(): start_time=1664327780.622; end_time=1664327803.902; duration=23.280; callid=0_1343402902@fd00:a::215:65ff:fe9e:e168 ``` ``` kamailio=# SELECT id, start_time, end_time, duration, callid FROM acc_cdrs ORDER BY id DESC LIMIT 1; id | start_time | end_time | duration | callid ---+-+-+--+- 24881 | 2022-09-27 20:16:20 | 2022-09-27 20:16:43 |23.28 | 0_1343402902@fd00:a::215:65ff:fe9e:e168 ``` -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3243#issuecomment-1260272242 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] 5.6 @ ebda78c92c inserts wrong timestamps in acc_cdrs table (Issue #3243)
@miconda, thank you for the detailed follow up. I am looking at what it would take on my end to package up an install based on master to provide better feedback on this. In the meantime, I do think it's interesting that the acc_cdrs (on the 5.6 branch with tip ebda78c92c) contains the correct call duration, and that the duration is duplicated into the start_time and end_time -- wondering if it's related to 60a62d6f7df233d61d4ccecc39504e77e25421b8. The following are the only changes to the acc or dialog modules between the 5.6.1 release (which works) and ebda78c92c (which doesn't). `$ git log --oneline 5.6.1..ebda78c92c -- src/modules/{acc,dialog}/` ad753f4657 modules: readme files regenerated - modules ... [skip ci] 644938a6be dialog: remove strlen() checks when setting a variable 2427f1951a dialog: wrapper function to set a dlg var with unsigned integer parameter 38cbf04afa dialog: fetch directly the int value for dlg variable used in dlg_cseq_update() 363a6267c4 dialog: safer version for getting dlg variable value 948f066718 dialog: updated to get the int value for cseq update operations 60a62d6f7d acc: duplicate dlg var values used in extra2strar_dlg_only() 5bcb685d19 dialog: dont reset dlg_db_mode in POSTCHILDINIT for DB_MODE_SHUTDOWN e8d797cb26 acc: add some explanation that dialogs need to be tracked for CDR accounting I'm thinking I can try to revert these one-at-a-time and see what happens (probably starting with 60a62d6f7d). If there isn't a 5.7 version planned for some time, perhaps a 5.6 revert and/or other fix is necessary (assuming the master changes are too invasive to backport directly). -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3243#issuecomment-1258790027 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] 5.6 @ ebda78c92c inserts wrong timestamps in acc_cdrs table (Issue #3243)
> Can you try with master branch? I pushed a group of commits, if works fine, > then I will backport. I was hoping not to have to pull down master on my (one and only) Kamailio production server, though I see the dialog changes in master are quite invasive -- difficult to backport. How soon will master turn into a new release? -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3243#issuecomment-1257027855 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] 5.6 @ ebda78c92c inserts wrong timestamps in acc_cdrs table (Issue #3243)
Unfortunately I see the same issue with those two commits backported to 5.6: ``` kamailio[352625]: INFO: acc [acc_cdr.c:392]: log_write_cdr(): start_time=14.234; end_time=14.234; duration=14.234; callid=201768_rel174ZTA3ODQyZWYyOTBmYWY4NTg3M2ZlZjI5M2I1MmM4NWU; ``` ``` kamailio=# SELECT id, start_time, end_time, duration, callid FROM acc_cdrs ORDER BY id DESC LIMIT 1; id | start_time | end_time | duration | callid ---+-+-+--+-- 24869 | 1969-12-31 18:00:14 | 1969-12-31 18:00:14 | 14.234 | 201768_rel174ZTA3ODQyZWYyOTBmYWY4NTg3M2ZlZjI5M2I1MmM4NWU (1 row) ``` -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3243#issuecomment-1251016349 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] 5.6 @ ebda78c92c inserts wrong timestamps in acc_cdrs table (Issue #3243)
### Description After upgrading from the 5.6.1 release by applying 5.6 branch changes through ebda78c92c, the `acc_cdr` entries for `start_time` and `end_time` in my PostgreSQL database are incorrect; the syslog output is also incorrect. The entries in the `acc` table contain the correct timestamps. In PostgreSQL, each of these timestamp columns are `timestamp without time zone`. ``` kamailio=# SELECT id, start_time, end_time, duration, callid FROM acc_cdrs ORDER BY id DESC LIMIT 1; id | start_time | end_time | duration | callid ---+-+-+--+- 24867 | 1969-12-31 18:00:25 | 1969-12-31 18:00:25 |25.41 | 0_1083748456@fd00:a::215:65ff:fe9e:e168 (1 row) kamailio=# SELECT id, method, time, callid FROM acc ORDER BY id DESC LIMIT 2; id | method |time | callid ++-+- 108653 | BYE| 2022-09-17 20:54:43 | 0_1083748456@fd00:a::215:65ff:fe9e:e168 108652 | INVITE | 2022-09-17 20:54:18 | 0_1083748456@fd00:a::215:65ff:fe9e:e168 ``` Log Messages It appears that `duration` is being copied into `start_time` and `end_time`. ``` INFO: acc [acc_cdr.c:367]: log_write_cdr(): start_time=25.410; end_time=25.410; duration=25.410; callid=0_1083748456@fd00:a::215:65ff:fe9e:e168; from_tag=1137456145; to_tag=645d9eee-9c3a-420a-ac37-8d3c741a5ce9; ``` ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` version: kamailio 5.6.1-2.20220917gitebda78c9.fc36 (x86_64/linux) b36a13 flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: b36a13 compiled on 00:00:00 Sep 18 2022 with gcc 12.2.1 ``` * **Operating System**: ``` Fedora 36 Linux 5.19.9-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 15 09:49:52 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux ``` -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/3243 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] kemi python3: exception occur when import logging module (#2885)
@hnimminh unfortunately I am not using app_python3 any longer but it looks like @miconda may be pointing in the right direction. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2885#issuecomment-946252813___ 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] [minor] sip_trace table column type and size issues (#2831)
In the case of sip_trace, I don't think Kamailio is a consumer of the data it places there, so a simple change to the column type works on my end--that allows other programs to use `convert_from(msg, 'UTF-8')` properly in selecting the output. It also keep PostgreSQL from using escape encoding on the text field (which is just inefficient). As I stated, I'll do more digging to see if anything else (other than updating the column type) would need updating in Kamailio (but it doesn't look like it so far). -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2831#issuecomment-904584911___ 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] [minor] sip_trace table column type and size issues (#2831)
Thank you @miconda. I'll take a deeper look into the PostgreSQL TEXT type for the `msg` field and create a pull request if necessary. I was looking through other scripts that use `bytea` for message body-type fields, such as msilo, presence, and rls. They all seem to insert the [bytea Hex format](https://www.postgresql.org/docs/current/datatype-binary.html#id-1.5.7.12.9) rather than text, but I'll have to investigate more. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2831#issuecomment-904203135___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] [minor] sip_trace table column type and size issues (#2831)
In advance of the 5.5.2 release, note that for full IPv6 addresses with proto, brackets, and a full 5-digit port, the `varchar(50)` is too small to hold the information in `fromip` and `toip`. Also, it appears (at least for PostgreSQL) that Kamailio stores to the `message` column as `bytea`, rather than text, so perhaps that should be reflected in the table setup scripts. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2831___ 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] Core dumps possibly related to #2616 or http_async_query (#2632)
I switched to using http_client module and have not had any crashes since February, so it that module is affected, it's in a different way. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2632#issuecomment-804438635___ 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] Core dumps possibly related to #2616 or http_async_query (#2632)
Thank you @bjokax, you are correct -- I was not aware of the implementation detail related to http2, though it's promising that your `curl_easy_setopt(cell->easy, CURLOPT_SSL_ENABLE_ALPN, 0L);` may resolve the issue. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2632#issuecomment-803143438___ 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] topos module may not be able to transparently transmit the update message (#2659)
I found something I think that is similar with UPDATEs and was able to handle in-dialog UPDATEs with TOPOS by adding `UPDATE` to the list of methods that get `record_route()` in `route[WITHINDLG]`, along with `NOTIFY` and `REFER`: ``` ... # sequential request withing a dialog should # take the path determined by record-routing if(loose_route()) { route(DLGURI); if(is_method("BYE")) { setflag(FLT_ACC); # do accounting ... setflag(FLT_ACCFAILED); # ... even if the transaction fails } else if(is_method("ACK")) { # ACK is forwarded statelessy route(NATMANAGE); route(RTPENGINE_MANAGE); } else if(is_method("NOTIFY|REFER|UPDATE")) { # Add Record-Route for in-dialog NOTIFY as per RFC 6665. record_route(); } route(RELAY); exit; } ... ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2659#issuecomment-791974626___ 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] Core dumps possibly related to #2616 or http_async_query (#2632)
Another using http_async_client -- seems like much of this is related to libevent [gdb.203123.txt](https://github.com/kamailio/kamailio/files/5983969/gdb.203123.txt) I've switched over to http_client for now. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2632#issuecomment-779435087___ 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] Small patch to handle PyEval_InitThreads() unnecessary in Python >=3.7 and deprecated in Python >= 3.9 (#2626)
Please consider for inclusion in 5.4.4 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2626#issuecomment-776358599___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] Core dumps possibly related to #2616 or http_async_query (#2632)
### Description When working atop the 5.4 branch patched with `--no-atexit` option from https://github.com/kamailio/kamailio/issues/2616#issuecomment-771811762 applied, I've been testing the use of http_async_query to pass out MESSAGE requests to selected destinations to an API via HTTPS. I experienced the following core dumps during the time where a higher number (may 10 or so) of these async queries may have been happening around the same time. I am not sure however how to interpret these and they may have had nothing to do with #2616. Of note for process `23694`, the logs spewed `INFO: http_async_client [http_multi.c:87]: event_cb(): Cell for handler 0x7f834b7eda08 not found in table` thousands of times, spiking CPU until Kamailio finally quit with sig 11. Debugging Data For core dump of process `2193`: ``` #0 0x7f367f64ea23 in free_cell_helper (dead_cell=0x7f3683d34b48, silent=0, fname=0x7f367f770902 "timer.c", fline=643) at h_table.c:186 b = 0x7f367f64c26d "\211E\374\203}\374\002\017\224\300\017\266\300H\205\300t6H\213E\350H\203\354\bj" i = 1 rpl = 0x7ffd51f7fd40 tt = 0x7ffd51f7fd60 foo = 0x0 cbs = 0x0 cbs_tmp = 0x7f3680154a20 __func__ = "free_cell_helper" #1 0x7f367f71b738 in wait_handler (ti=2051374262, wait_tl=0x7f3683d34bd0, data=0x7f3683d34b48) at timer.c:643 p_cell = 0x7f3683d34b48 ret = 2143519712 unlinked = 0 rcount = 1 __func__ = "wait_handler" #2 0x006ae985 in timer_list_expire (t=2051374262, h=0x7f367fc7c4c0, slow_l=0x7f367fc7e398, slow_mark=16842) at core/timer.c:857 tl = 0x7f3683d34bd0 ret = 32566 #3 0x006aee48 in timer_handler () at core/timer.c:922 saved_ticks = 2051374262 run_slow_timer = 0 i = 458 __func__ = "timer_handler" #4 0x006af30a in timer_main () at core/timer.c:961 No locals. #5 0x0042c59c in main_loop () at main.c:1769 i = 2 pid = 0 si = 0x0 si_desc = "udp receiver child=1 sock=[2603:300a:134:50e0::3]:5060\000\000\300\261ʈ6\177\000\000\360\005G\210\066\177\000\000Z\262ʈ6\177\000\000\060\000\000\000\060\000\000\000\b\001\370Q\375\177\000\000 \000\370Q\375\177\000\000\000\035\064\371\364\245\242.\350\301\201\000\000\000\000\000\270\251\206\210\066\177\000" nrprocs = 2 woneinit = 1 __func__ = "main_loop" #6 0x00435d22 in main (argc=8, argv=0x7ffd51f80648) at main.c:2876 cfg_stream = 0x19e5120 c = -1 r = 0 tmp = 0x7ffd51f81ee5 "" tmp_len = 896 port = 896 proto = 896 ahost = 0x0 aport = 0 options = 0x7f3de8 ":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 = 504719050 rfd = 4 debug_save = 0 debug_flag = 0 dont_fork_cnt = 2 n_lst = 0x0 p = 0xc2 st = {st_dev = 26, st_ino = 1205, st_nlink = 2, st_mode = 16872, st_uid = 985, st_gid = 983, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1612794079, tv_nsec = 14695130}, st_mtim = {tv_sec = 1612794079, tv_nsec = 14695130}, st_ctim = {tv_sec = 1612794079, tv_nsec = 14695130}, __glibc_reserved = {0, 0, 0}} tbuf = "@\002\370Q\375\177\000\000\000\000\000\000\000\000\000\000@\002\370Q\375\177", '\000' , "\260\067\361\210\066\177\000\000\350\357\363\210\066\177\000\000\b\005\364\210\066\177\000\000\340\071\361\210\066\177\000\000\025\257\362\210\066\177\000\000$V\273\210\066\177\000\000\354k\363\210\066\177\000\000\336k\363\210\066\177\000\000\205\317c\t\000\000\000\000\300C\360\210\066\177\000\000߯\362\210\066\177\000\000\000\000\000\000\254\202\226\006\334@\273\210\066\177\000\000\000\000\000\000\000\000\000\000\300C\360\210\066\177\000\000\001\000\000\000\000\000\000\000\005\215.\201\267e\325\000\240\001\364\210\066\177\000\000\370\377\377\377\377\377\377\377\240\001\364\210\066\177\000\000R"... option_index = 11 long_options = {{name = 0x7f62a6 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x7f1523 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x7f62ab "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x7f62b1 "subst", has_arg = 1, flag = 0x0, val = 1025}, {name = 0x7f62b7 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x7f62c0 "substdefs", has_arg = 1, flag = 0x0, val = 1027}, { name = 0x7f62ca "server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x7f62d4 "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x7f62df "modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x7f62e8 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x7f62f3 "debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x7f62f9 "no-atexit", has_arg = 0, flag = 0x0, val = 1033}, { name = 0x0, has_arg = 0, flag = 0x0, val = 0}} __fun
[sr-dev] [kamailio/kamailio] Small patch to handle PyEval_InitThreads() unnecessary in Python >=3.7 and deprecated in Python >= 3.9 (#2626)
Small patch to handle deprecated PyEval_InitThreads(). See https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads ``` src/modules/app_python3/app_python3_mod.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/app_python3/app_python3_mod.c b/src/modules/app_python3/app_python3_mod.c index 502a6d540b..0ce93b71cd 100644 --- a/src/modules/app_python3/app_python3_mod.c +++ b/src/modules/app_python3/app_python3_mod.c @@ -346,7 +346,9 @@ int apy_load_script(void) } Py_Initialize(); +#if PY_VERSION_HEX < 0x0307 PyEval_InitThreads(); +#endif myThreadState = PyThreadState_Get(); PY_GIL_ENSURE; ``` Build Log Messages ``` make[2]: Entering directory '/builddir/build/BUILD/kamailio-5.4.3/src/modules/app_python3' gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall-DNAME='"kamailio"' -DVERSION='"5.4.3-6.gitdbe358d2d0.fc33"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 10.2.1"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=5004003 -DCFG_DIR='"/etc/kamailio/"' -DSHARE_DIR='"/usr/share/kamailio/"' -DRUN_DIR='"/run/kamailio/"' -DPKG_MALLOC -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DWITH_XAVP -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT -I/usr/include/python3.9 -I/usr/include/python3.9 -DMOD_NAME='"app_python3"' -c app_python3_mod.c -o app_python3_mod.o -MMD -MP app_python3_mod.c: In function 'apy_load_script': app_python3_mod.c:349:2: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations] 349 | PyEval_InitThreads(); | ^~ In file included from /usr/include/python3.9/Python.h:145, from app_python3_mod.c:22: /usr/include/python3.9/ceval.h:130:37: note: declared here 130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void); ``` ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` version: kamailio 5.4.3-6.gitdbe358d2d0.fc33.1 (x86_64/linux) e19ae3 flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: e19ae3 compiled on 00:00:00 Feb 5 2021 with gcc 10.2.1 ``` * **Operating System**: ``` Fedora 33 Linux 5.10.12-200.fc33.x86_64 #1 SMP Mon Feb 1 02:40:52 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2626___ 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] db_postgres: added connection parameters (#2622)
@korayvt, thank you for that detail. I look forward to this pull request. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/2622#issuecomment-774045551___ 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] db_postgres: added connection parameters (#2622)
Purely as an observer and a db_postgres user, wouldn't it be easier just to pass entire connection strings or connection URIs? That way, Kamailio doesn't need to worry about parsing the params, just to rebuild them for input to libpq https://www.postgresql.org/docs/12/libpq-connect.html#LIBPQ-CONNSTRING -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/2622#issuecomment-773763273___ 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] Main process exited, code=dumped, status=11/SEGV with http_async (#2616)
@miconda, thank you for the explanation. I was thinking this issue was related directly to the http_async_client module, so the fix would be there. While I'm using your initial patch with small modification to apply on the 5.4 branch, this solution looks like a new feature, rather than a fix. For the bug fix part, can a simple version be backported to 5.4? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2616#issuecomment-772532625___ 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] Main process exited, code=dumped, status=11/SEGV with http_async (#2616)
> Can you try with the master branch and use kamailio with `--no-atexit` > command line parameter (which I just added)? @miconda I can confirm the patch does work and Kamailio doesn't crash on exit when using `-no-atexit`. If that's the case, would it always be the preference to have this enabled (no command line switch). What are the downsides? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2616#issuecomment-771811762___ 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] Main process exited, code=dumped, status=11/SEGV with http_async (#2616)
I also saw in other tickets, sometimes module loading order is an issue. In my case: ``` # cat /lib/systemd/system/kamailio.service [Unit] Description=Kamailio SIP Server Documentation=man:kamailio(8) https://www.kamailio.org/ After=network.target postgresql.service [Service] Type=notify User=kamailio Environment=SHM_SIZE=128 PKG_SIZE=8 ExecStartPre=/usr/sbin/kamailio -c ExecStart=/usr/sbin/kamailio -DD --loadmodule=systemdops.so -m $SHM_SIZE -M $PKG_SIZE ProtectHome=true Restart=on-failure RestartSec=30 [Install] WantedBy=multi-user.target ``` ``` # grep ^loadmodule /etc/kamailio/kamailio.cfg loadmodule "log_systemd.so" loadmodule "db_postgres.so" loadmodule "xhttp.so" loadmodule "jsonrpcs.so" loadmodule "kex.so" loadmodule "corex.so" loadmodule "tm.so" loadmodule "tmx.so" loadmodule "sl.so" loadmodule "stun.so" loadmodule "outbound.so" loadmodule "rr.so" loadmodule "path.so" loadmodule "pv.so" loadmodule "maxfwd.so" loadmodule "usrloc.so" loadmodule "registrar.so" loadmodule "textops.so" loadmodule "siputils.so" loadmodule "sanity.so" loadmodule "ctl.so" loadmodule "cfg_rpc.so" loadmodule "acc.so" loadmodule "counters.so" loadmodule "auth.so" loadmodule "auth_db.so" loadmodule "permissions.so" loadmodule "alias_db.so" loadmodule "speeddial.so" loadmodule "domain.so" loadmodule "presence.so" loadmodule "presence_xml.so" loadmodule "nathelper.so" loadmodule "rtpengine.so" loadmodule "rtpproxy.so" loadmodule "tls.so" loadmodule "htable.so" loadmodule "pike.so" loadmodule "debugger.so" loadmodule "topos.so" loadmodule "jansson.so" loadmodule "dialog.so" loadmodule "group.so" loadmodule "imc.so" loadmodule "lcr.so" loadmodule "app_python3.so" loadmodule "textopsx.so" loadmodule "msilo.so" loadmodule "presence_dialoginfo.so" loadmodule "presence_mwi.so" loadmodule "pua.so" loadmodule "pua_dialoginfo.so" loadmodule "ipops.so" loadmodule "sdpops.so" loadmodule "sipdump.so" loadmodule "sqlops.so" loadmodule "http_async_client.so" loadmodule "uac.so" loadmodule "diversion.so" loadmodule "tmrec.so" loadmodule "websocket.so" loadmodule "auth_ephemeral.so" ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2616#issuecomment-771115566___ 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] Main process exited, code=dumped, status=11/SEGV with http_async (#2616)
> I forgot to write the important question I had: what is the libssl version? openssl-1.1.1i-1.fc33.x86_64 >From Kamailio start: INFO: tls [tls_mod.c:388]: mod_init(): use OpenSSL >version: 1010109f -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2616#issuecomment-771103450___ 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] Main process exited, code=dumped, status=11/SEGV with http_async (#2616)
This is Fedora 33. So far, the http_async_query works well during runtime and the server starts fine. This error seems to get triggered when Kamailio is shutting down. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2616#issuecomment-771101499___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] Main process exited, code=dumped, status=11/SEGV with http_async (#2616)
### Description I would like to use `http_async_query` and after enabling the module, I notice Kamailio's main process crashes on exit or restart. I have searched and find a number of tickets regarding http_async and crashes, but none related to exit/restart. ### Troubleshooting ``` # coredumpctl info 410246 PID: 410246 (kamailio) UID: 985 (kamailio) GID: 983 (kamailio) Signal: 11 (SEGV) Timestamp: Mon 2021-02-01 00:28:29 CST (11h ago) Command Line: /usr/sbin/kamailio -DD --loadmodule=systemdops.so -m 128 -M 8 Executable: /usr/sbin/kamailio Control Group: /system.slice/kamailio.service Unit: kamailio.service Slice: system.slice Boot ID: 88a3838cfde647a29b3bd62f1e294ce2 Machine ID: e71248e5a94b42069b4603dde95c99b4 Storage: /var/lib/systemd/coredump/core.kamailio.985.88a3838cfde647a29b3bd62f1e294ce2.410246.161216090900.zst Message: Process 410246 (kamailio) of user 985 dumped core. Stack trace of thread 410246: #0 0x7fd57d84383a BN_clear_free (libcrypto.so.1.1 + 0xb183a) #1 0x7fd573f9d275 ssh_dh_finalize.part.0 (libssh.so.4 + 0x1e275) #2 0x7fd573f8ec40 libssh_destructor (libssh.so.4 + 0xfc40) #3 0x7fd57ead8cd3 _dl_fini (ld-linux-x86-64.so.2 + 0x10cd3) #4 0x7fd57e7a4237 __run_exit_handlers (libc.so.6 + 0x40237) #5 0x7fd57e7a43e0 exit (libc.so.6 + 0x403e0) #6 0x0041f61a handle_sigs (kamailio + 0x1f61a) #7 0x0042c61c main_loop (kamailio + 0x2c61c) #8 0x00434cbd main (kamailio + 0x34cbd) #9 0x7fd57e78c1e2 __libc_start_main (libc.so.6 + 0x281e2) #10 0x0041bbde _start (kamailio + 0x1bbde) ``` Reproduction This happens at every kamailio shutdown. Debugging Data [gdb.txt](https://github.com/kamailio/kamailio/files/5905920/gdb.txt) ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` version: kamailio 5.4.3-5.git06bd17a838.fc33.2 (x86_64/linux) e19ae3 flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: e19ae3 compiled on 00:00:00 Jan 24 2021 with gcc 10.2.1 ``` * **Operating System**: ``` Linux 5.10.10-200.fc33.x86_64 #1 SMP Sun Jan 24 19:58:54 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2616___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:93934221: acc: docs - database column constraint alteration for acc_extra_nullable and cdr_extra_nullable [skip ci]
Module: kamailio Branch: master Commit: 93934221231897106a1933d37ffd3c046fed47a9 URL: https://github.com/kamailio/kamailio/commit/93934221231897106a1933d37ffd3c046fed47a9 Author: Anthony Messina Committer: Anthony Messina Date: 2020-11-14T11:17:29-06:00 acc: docs - database column constraint alteration for acc_extra_nullable and cdr_extra_nullable [skip ci] --- Modified: src/modules/acc/doc/acc_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/93934221231897106a1933d37ffd3c046fed47a9.diff Patch: https://github.com/kamailio/kamailio/commit/93934221231897106a1933d37ffd3c046fed47a9.patch --- diff --git a/src/modules/acc/doc/acc_admin.xml b/src/modules/acc/doc/acc_admin.xml index d1c007312e..f88d403d2b 100644 --- a/src/modules/acc/doc/acc_admin.xml +++ b/src/modules/acc/doc/acc_admin.xml @@ -634,6 +634,10 @@ modparam("acc", "acc_prepare_always", 1) set to 0, the value is saved as empty string (the existing behavior). + Database columns may need to be altered to DROP NOT NULL constraints + and DROP DEFAULT values in order to accept NULL values. + + Default value is 0. @@ -1157,6 +1161,10 @@ modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)" If set to 1, custom CDR fields not defined in config operation (or set to $null) will be saved as NULL. + Database columns may need to be altered to DROP NOT NULL constraints + and DROP DEFAULT values in order to accept NULL values. + + Default value is 0. ___ 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] [RFE]: Allow NULL for acc db_extra and multi_leg_info (#2531)
I have more testing to do, apparently -- there are times where `multi_leg_info` variables are all set to `NULL` in the DB (without error), although they are defined and printed properly in the syslog. I've tried moving the modparam `multi_leg_info` above and below modparam `acc_extra_nullable`, but the results seem random. I'll see what else I can find and report back, but so far this only seems to affect the `multi_leg_info` variables -- the `db_extra` ones are always inserted properly. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2531#issuecomment-727646287___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] acc: docs - database column constraint alteration for acc_extra_nulla… (#2550)
acc: docs - database column constraint alteration for acc_extra_nullable and cdr_extra_nullable [skip ci] 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 - [X] Related to issue #2531 (replace with an open issue number) Description Documentation update related to https://github.com/kamailio/kamailio/issues/2531#issuecomment-724762135 You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/2550 -- Commit Summary -- * acc: docs - database column constraint alteration for acc_extra_nullable and cdr_extra_nullable [skip ci] -- File Changes -- M src/modules/acc/doc/acc_admin.xml (8) -- Patch Links -- https://github.com/kamailio/kamailio/pull/2550.patch https://github.com/kamailio/kamailio/pull/2550.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/2550 ___ 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] [RFE]: Allow NULL for acc db_extra and multi_leg_info (#2531)
@henningw ok. I am working through F32 -> F33 upgrades now, but will then turn my attention to creating a documentation pull request. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2531#issuecomment-725780694___ 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] [RFE]: Allow NULL for acc db_extra and multi_leg_info (#2531)
@miconda, I can confirm your fix works. Thank you. It might be best to update the schema creation scripts for acc, acc_cdrs, and missed_calls to remove the `NOT NULL` and `''::VARCHAR` declarations, since enabling the associated modparams without changing the schema will result in insertion errors. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2531#issuecomment-722020148___ 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] rms_bridge() doesn't send out B-leg: run_onsend(): required parameters are not available - ignoring (#2524)
@jchavanton -- thank you. I have dug more into my trouble -- partly my issue was the firewall not having port 5090 open between testing machines and the timeout of the `rms_bridge()` when it couldn't reach the destination `$var(target)`. I look forward to testing this module, particularly the B2BUA functionality and the ability to handle REFER in the future. I can now confirm that I can get `rms_bridge()` to work in its most basic form. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2524#issuecomment-716435559___ 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] rms_bridge() doesn't send out B-leg: run_onsend(): required parameters are not available - ignoring (#2524)
``` debug=3 log_stderror=yes memdbg=5 memlog=5 # number of SIP routing processes children=5 loadmodule "ctl" loadmodule "tm" loadmodule "tmx" loadmodule "sl" loadmodule "rr" loadmodule "pv" loadmodule "textops" loadmodule "siputils" loadmodule "xlog" loadmodule "nathelper" #loadmodule "usrloc" #loadmodule "registrar" loadmodule "rtp_media_server" modparam("rtp_media_server", "log_file_name", "/tmp/rms_transfer.log") modparam("tm", "wt_timer", 1000) listen=udp:10.77.79.148:5090 listen=udp:127.0.0.1:5090 event_route[rms:start] { xnotice("[rms:start] play ...\n"); #rms_play("/opt/voice_files/OSR_us_000_0010_8k.wav", "rms:after_play"); }; event_route[rms:bridge] { #$var(target) = "sip:456@localhost:5069;"; $var(target)="sip:888@127.0.0.1:5090;"; if (!rms_bridge("$var(target)", "rms:bridged")) { send_reply("604", "server error"); xerr("rtp_media_server bridge error!\n"); exit; } }; event_route[rms:play_bridge] { xnotice("[rms:play_bridge] play ...\n"); rms_play("/etc/kamailio/zombies.wav", "rms:bridge"); }; event_route[rms:after_play] { xnotice("[rms:after_play] play done...\n"); rms_hangup(); }; event_route[rms:bridged] { xnotice("[rms:bridged] ...\n"); } event_route[rms:answered] { xnotice("[rms:answered] ...\n"); #rms_play("/opt/voice_files/OSR_us_000_0010_8k.wav", "rms:after_play"); } route { if (t_precheck_trans()) { t_check_trans(); exit; } t_check_trans(); # if (is_method("REGISTER")) { # save("location"); # exit; # } xnotice("[$rm][$ci]\n"); if (is_method("INVITE") && !has_totag()) { fix_nated_contact(); if ($rU == "456") { rms_answer("rms:play_bridge"); exit; } else if ($rU == "888") { $var(target)="sip:conference@10.77.79.3:5080;"; if (!rms_bridge("$var(target)", "rms:bridged")) { send_reply("503", "server error"); xerr("rtp_media_server bridge error!\n"); } exit; } if (!rms_answer("rms:answered")) { t_reply("503", "server error"); xerr("rtp_media_server error!\n"); exit; } } if(rms_dialog_check()) rms_sip_request(); exit; } ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2524#issuecomment-716100246___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] [RFE]: Allow NULL for acc db_extra and multi_leg_info (#2531)
### Description Just as in #1378, allowing nullable entries for SQL would be appreciated in acc `db_extra` and acc `multi_leg_info`. ### Expected behavior Empty/NULL values should be inserted with `NULL`. For example, I can't create a `timestamp without time zone` to be used with multi-leg-accounting as follows. ``` modparam("acc", "multi_leg_info", "leg_dst_user=$avp(leg_dst_user);" "leg_dst_domain=$avp(leg_dst_domain);" "leg_sip_code=$avp(leg_sip_code);" "leg_time=$avp(leg_time);" "leg_to_tag=$avp(leg_to_tag)") $avp(leg_time)=$timef(%F %T) ``` Actual observed behavior Emplty/NULL values are inserted with `''` which fails as `''` is invalid input for a `timestamp without time zone` column. Log Messages ``` db_postgres [km_dbase.c:266]: db_postgres_submit_query(): 0x7f26f7fb6cc8 PQsendQuery Error: ERROR: invalid input syntax for type timestamp: "" ``` SIP Traffic ``` (paste your sip traffic here) ``` ### Possible Solutions ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` ersion: kamailio 5.4.1-8.gitd43872c11e.fc32.2 (x86_64/linux) 09fd6a flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: 09fd6a compiled on 00:00:00 Oct 22 2020 with gcc 10.2.1 ``` * **Operating System**: ``` Linux host 5.8.15-201.fc32.x86_64 #1 SMP Thu Oct 15 15:56:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2531___ 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] rms_bridge() doesn't send out B-leg: run_onsend(): required parameters are not available - ignoring (#2524)
The error I see is related to https://github.com/kamailio/kamailio/blob/76bb9bb7cbdcd900339afa7192eaefd71fc75790/src/core/onsend.c#L49 -- some params are missing? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2524#issuecomment-715576816___ 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] rms_bridge() doesn't send out B-leg: run_onsend(): required parameters are not available - ignoring (#2524)
I have switched to just using IP addresses for simplicity, but I can confirm that `$var(target)` has the `;` at the end -- I originally thought that was a typo in the example config, but realized without it that the last char was stripped. Not sure what the reason for the extra `;` is though: Current config: ``` ... } else if ($rU == "888") { $var(target)="sip:conference@10.77.79.3:5080;"; if (!rms_bridge("$var(target)", "rms:bridged")) { send_reply("503", "server error"); xerr("rtp_media_server bridge error!\n"); } exit; } ... ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2524#issuecomment-715538515___ 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] rms_bridge() doesn't send out B-leg: run_onsend(): required parameters are not available - ignoring (#2524)
Is there a reason for the requirement of the `;` suffix to appear in the config file? It seems like that is something that could be handled in the module itself (if there is no `;` in the first parameter, then add `;`, since as you said it's necessary for other internal processing) -- seems like lots of adopters will see this as an issue. Also FYI, before I apply your patch, this is what I have... ``` INFO: rtp_media_server [rtp_media_server.c:583]: rms_bridging_call(): parsed[sip:conference@10.77.79.3:5080;][0] INFO: rtp_media_server [rtp_media_server.c:599]: rms_bridging_call(): si[0x7f791c637a18]call-id[0_448469831@2001:db8::99]cseq[0]ruri[31|sip:conference@10.77.79.3:5080;]remote_uri[]local_uri[] DEBUG: tm [uac.c:450]: t_uac_prepare(): next_hop= DEBUG: tm [uac.c:158]: dlg2hash(): hashid 29747 DEBUG: tm [uac.c:678]: send_prepared_request_impl(): uac: 0x7f791c639b40 branch: 0 to 10.77.79.3:5080 DEBUG: [core/onsend.c:50]: run_onsend(): required parameters are not available - ignoring ERROR: rtp_media_server [rtp_media_server.c:622]: rms_bridging_call(): tmb.t_request_within ok ``` I rebuilt Kamailio and all the Belledonne Communications deps last night. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2524#issuecomment-715562433___ 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] rtp_media_server: declare extern dialog_list_mutex and tmb in header file (#2522)
Thank you @miconda. The build is now possible for Fedora 32/33 x86_64. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2522#issuecomment-713712564___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] rms_bridge() doesn't send out B-leg: run_onsend(): required parameters are not available - ignoring (#2524)
### Description Testing out rtp_media_server module's `rms_bridge()` function with the intention of bridging A-leg to B-leg (an Asterisk conference server). The B-leg never gets sent out and after the call times out, this testing instance crashes. Config slightly modified from https://github.com/kamailio/kamailio/blob/master/src/modules/rtp_media_server/config_example/kamailio.cfg ``` ... loadmodule "uac.so" event_route[rms:bridged] { xnotice("[rms:bridged] ...\n"); } route { if (t_precheck_trans()) { t_check_trans(); exit; } t_check_trans(); if (is_method("REGISTER")) { save("location"); exit; } xnotice("[$rm][$ci]\n"); if (is_method("INVITE") && !has_totag()) { fix_nated_contact(); if ($rU == "888") { $var(target) = "sip:confere...@example.com:5080;"; if (!rms_bridge("$var(target)", "rms:bridged")) { send_reply("503", "server error"); xerr("rtp_media_server bridge error!\n"); } exit; } if (!rms_answer("rms:answered")) { t_reply("503", "server error"); xerr("rtp_media_server error!\n"); exit; } } if(rms_dialog_check()) rms_sip_request(); exit; } ``` ### Troubleshooting I added `loadmodule "uac.so"`, though I'm not sure it's required. Reproduction Debugging Data I can only do a stack trace at the moment running this test in a systemd-nspawn container ``` Stack trace of thread 589: #0 0x7fb449848518 n/a (/usr/lib64/kamailio/modules/rtp_media_server.so + 0x2f518) #1 0x7fb44982682b n/a (/usr/lib64/kamailio/modules/rtp_media_server.so + 0xd82b) #2 0x005cca6b n/a (/usr/sbin/kamailio + 0x1cca6b) #3 0x0041cf90 n/a (/usr/sbin/kamailio + 0x1cf90) #4 0x0041e9ea n/a (/usr/sbin/kamailio + 0x1e9ea) #5 0x00421c65 n/a (/usr/sbin/kamailio + 0x21c65) #6 0x0042c61c n/a (/usr/sbin/kamailio + 0x2c61c) #7 0x00434cbd n/a (/usr/sbin/kamailio + 0x34cbd) #8 0x7fb44a8b0042 __libc_start_main (libc.so.6 + 0x27042) #9 0x0041bbde n/a (/usr/sbin/kamailio + 0x1bbde) ``` Log Messages ``` kamailio[275]: 10(275) INFO: rtp_media_server [rtp_media_server.c:254]: rms_dialog_action_check(): dialog action RMS_BRIDGING [0_3746724993@2001:db8::99] kamailio[275]: 10(275) INFO: rtp_media_server [rtp_media_server.c:583]: rms_bridging_call(): parsed[sip:confere...@example.com:5080][0] kamailio[275]: 10(275) INFO: rtp_media_server [rtp_media_server.c:599]: rms_bridging_call(): si[0x7f83fddb78e0]call-id[0_3746724993@2001:db8::99]cseq[0]ruri[32|sip:confere...@example.com:5080]remote_uri[]local_uri[] kamailio[275]: 10(275) DEBUG: tm [uac.c:450]: t_uac_prepare(): next_hop= kamailio[275]: 10(275) DEBUG: [core/dns_cache.c:527]: _dns_hash_find(): (example.com(12), 1), h=205 kamailio[275]: 10(275) DEBUG: [core/resolve.c:985]: get_record(): skipping 2 NS (p=0x9a0e6e, end=0x9a0ef2) kamailio[275]: 10(275) DEBUG: [core/resolve.c:998]: get_record(): parsing 4 ARs (p=0x9a0e9a, end=0x9a0ef2) kamailio[275]: 10(275) DEBUG: [core/dns_cache.c:1633]: dns_get_related(): (0x7f83fddbb878 (example.com, 1), 1, *0x7f8406d319f0) (0) kamailio[275]: 10(275) DEBUG: [core/dns_cache.c:739]: dns_cache_add_unsafe(): adding example.com(12) 1 (flags=0) at 205 kamailio[275]: 10(275) DEBUG: tm [uac.c:158]: dlg2hash(): hashid 35754 kamailio[275]: 10(275) DEBUG: tm [uac.c:678]: send_prepared_request_impl(): uac: 0x7f83fddb9a10 branch: 0 to 10.77.79.3:508 kamailio[275]: 10(275) DEBUG: [core/onsend.c:50]: run_onsend(): required parameters are not available - ignoring kamailio[275]: 10(275) ERROR: rtp_media_server [rtp_media_server.c:622]: rms_bridging_call(): tmb.t_request_within ok ``` SIP Traffic There is no SIP traffic generated to `` ### Possible Solutions ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` version: kamailio 5.4.1-8.gitd43872c11e.fc32.1 (x86_64/linux) 09fd6a flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id:
Re: [sr-dev] [kamailio/kamailio] rtp_media_server: declare extern dialog_list_mutex and tmb in header file (#2522)
Thank you. @jchavanton, I'm going to open another issue where `rms_bridge()` doesn't seem to work properly. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2522#issuecomment-713798333___ 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] rtp_media_server: declare extern dialog_list_mutex and tmb in header file (#2522)
> Thanks folks, > > Very cool that you are able to build this module given the dependencies > required, I was thinking it was not in the default module group. I started building the Fedora packages here https://messinet.com/rpms/browser (bcunit, bctoolbox, ortp, and mediastreamer2) -- challenging to say the least and I probably need to update the packages to "include" more of the functionality from the underlying deps. Working through testing now and getting segfaults. Probably need to move testing to a separate simpler box. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2522#issuecomment-713718006___ 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] rtp_media_server: declare extern dialog_list_mutex and tmb in header file (#2522)
Closed #2522. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2522#event-3904939838___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] rtp_media_server: declare extern dialog_list_mutex and tmb in header file (#2522)
Similar to #2235 ``` src/modules/rtp_media_server/rtp_media_server.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/rtp_media_server/rtp_media_server.h b/src/modules/rtp_media_server/rtp_media_server.h index bf22660b1b..cd3a0109ce 100644 --- a/src/modules/rtp_media_server/rtp_media_server.h +++ b/src/modules/rtp_media_server/rtp_media_server.h @@ -39,7 +39,7 @@ #include "rms_media.h" #include "rms_dialog_info.h" -ser_lock_t dialog_list_mutex; +extern ser_lock_t dialog_list_mutex; @@ -51,7 +51,7 @@ typedef struct rms char *local_ip; } rms_t; -struct tm_binds tmb; +extern struct tm_binds tmb; #endif ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2522___ 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] ERROR: imc_handle_members(): Buffer too small for member list message (#2481)
I confirm 92cfb5e8d291706889c926892397e663e2d93b05 applied to the latest in the 5.4 branch updates solves the log issue and the `#members` (also the historical `#list`) and `#rooms` all work properly. Thanks @miconda. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2481#issuecomment-697047926___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] ERROR: imc_handle_members(): Buffer too small for member list message (#2481)
### Description When issuing `#members` command via IMC, the following error occurs, though the member list is returned to the client: ``` ERROR: imc [imc_cmd.c:1007]: imc_handle_members(): Message-ID: '185434_mobile-rel120YmVmYzE0ZjMwNzgyYWIxOWVjYWZhNmM1MzY5ZjY1YzU' ERROR: imc [imc_cmd.c:1012]: imc_handle_members(): Buffer too small for member list message ``` When issuing `#rooms` command via IMC, the following error occurs, though the room list is returned to the client: ``` ERROR: imc [imc_cmd.c:1070]: imc_handle_rooms(): Buffer too small for member list message ``` In case it's relevant, the clients are using TLS connections. ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` version: kamailio 5.4.1-2.git99b2a0c066.fc32 (x86_64/linux) 09fd6a flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: 09fd6a compiled on 00:00:00 Sep 12 2020 with gcc 10.2.1 ``` * **Operating System**: ``` Fedora 32 x86_64 Linux 5.8.9-200.fc32.x86_64 #1 SMP Mon Sep 14 18:28:45 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2481___ 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] setting $xavp(reg=>max_contact) will limit new registration and updates, but not deleting existing ones (#2471)
Closed #2471. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2471#event-3768059350___ 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] setting $xavp(reg=>max_contact) will limit new registration and updates, but not deleting existing ones (#2471)
Thank you @miconda. Based on your description, I was misunderstanding the documentation about the usage for this $xavp. I understood the documentation to mean that `$xavp(reg=>max_contacts)=1` would function effectively like `save("location", "0x04")`. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2471#issuecomment-692679492___ 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] setting $xavp(reg=>max_contact) will limit new registration and updates, but not deleting existing ones (#2471)
@henningw sorry I though I hit the feature request button when creating this. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2471#issuecomment-691376893___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] $xavp(reg=>max_contacts)=1 < modparam("registrar", "max_contacts", 10) does not work (#2471)
### Description I'd like to reduce the number of contacts per AOR for certain UAs, while maintaining a default higher limit. ``` modparam("registrar", "max_contacts", 10) modparam("registrar", "xavp_cfg", "reg") route[REGISTRAR] { if($ua=~"^Yealink") { $xavp(reg=>max_contacts)=1; } if(!save("location")) { sl_reply_error(); } exit; } ``` ### Expected behavior https://www.kamailio.org/docs/modules/stable/modules/registrar#registrar.p.xavp_cfg states: * max_contacts - the number of maximum contacts to be stored for the current registration AoR. It **overwrites** the 'max_contacts' module parameter value. I expect that the UA will register with the new contact and have all others removed. Actual observed behavior `$xavp(reg=>max_contacts)` set to a value lower than the `max_contacts` modparam does not achieve the **overwrites** expectation from the documentation. Log Messages ``` INFO: registrar [save.c:619]: test_max_contacts(): too many contacts for AOR ``` ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` version: kamailio 5.4.1-1.gite1d4ddcb6c.fc32 (x86_64/linux) 09fd6a flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: 09fd6a compiled on 00:00:00 Sep 5 2020 with gcc 10.2.1 ``` * **Operating System**: ``` Fedora 32, kernel-5.8.4-200.fc32.x86_64 ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2471___ 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] Reports -DCOMPILER='"gcc 0.2.1"' when compiling with gcc 10.2.1 on Fedora (#2425)
Thank you @sergey-safarov. Yes I see the same version. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2425#issuecomment-668275199___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] Reports -DCOMPILER='"gcc 0.2.1"' when compiling with gcc 10.2.1 on Fedora (#2425)
Likely non-critical, but during the build, reports `-DCOMPILER='"gcc 0.2.1"'` when compiling with gcc 10.2.1 on Fedora 32 x86_64. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2425___ 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] [Feature Request] Python3 compatibility for dbtextdb (#1747)
@linuxmaniac sorry for those mistakes I made in the first patch and thank you for fixing. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1747#issuecomment-623480488___ 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] Fedora 32/Rawhide build error: modules/sms: multiple definition of 'queued_msgs', 'use_contact', 'sms_report_type' (#2236)
Thank you all. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2236#issuecomment-596460801___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] Fedora 32/Rawhide build error: modules/sms: multiple definition of 'queued_msgs', 'use_contact', 'sms_report_type' (#2236)
Similar to #2235. After this one, I can try to collect them up rather than reporting an issue for each module--it's only that the build is killed, so I only see the first one that errors out. I'll see what I can do about that. ``` make[2]: Entering directory '/builddir/build/BUILD/kamailio-5.3.2/src/modules/sms' gcc -shared -Wl,-O2 -Wl,-E -pthread -rdynamic -ldl -Wl,-Bsymbolic-functions libsms_getsms.o libsms_putsms.o libsms_modem.o sms_funcs.o sms.o sms_report.o libsms_charset.o -o sms.so make[2]: Leaving directory '/builddir/build/BUILD/kamailio-5.3.2/src/modules/sms' /usr/bin/ld: sms.o:(.bss+0x40): multiple definition of `queued_msgs'; sms_funcs.o:(.bss+0x11a0): first defined here /usr/bin/ld: sms.o:(.bss+0x48): multiple definition of `use_contact'; sms_funcs.o:(.bss+0x11a8): first defined here /usr/bin/ld: sms.o:(.bss+0x4c): multiple definition of `sms_report_type'; libsms_modem.o:(.bss+0x0): first defined here collect2: error: ld returned 1 exit status make[2]: *** [../../Makefile.rules:191: sms.so] Error 1 make[1]: *** [Makefile:511: modules] Error 1 make: *** [Makefile:34: every-module] Error 2 ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2236___ 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] Fedora 32/Rawhide build error: modules/siputils: multiple definition of `contact_flds_separator' (#2235)
Thanks @miconda -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2235#issuecomment-592650285___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] Fedora 32/Rawhide build error: modules/siputils: multiple definition of `contact_flds_separator' (#2235)
Just FYI/notice when preparing for Fedora 32 builds that for `src/modules/siputils`, `contact_flds_separator` is defined both in `contact_ops.h` and `siputils.c` ``` make[2]: Entering directory '/builddir/build/BUILD/kamailio-5.3.2/src/modules/siputils' gcc -shared -Wl,-O2 -Wl,-E -pthread -rdynamic -ldl -Wl,-Bsymbolic-functions sipops.o config.o siputils.o rpid.o ring.o contact_ops.o chargingvector.o options.o utils.o checks.o-L../../lib/srdb1/ -lsrdb1 -Wl,-rpath,/builddir/build/BUILD/kamailio-5.3.2/src/lib/srdb1 -o siputils.so make[2]: Leaving directory '/builddir/build/BUILD/kamailio-5.3.2/src/modules/siputils' /usr/bin/ld: contact_ops.o:/builddir/build/BUILD/kamailio-5.3.2/src/modules/siputils/contact_ops.h:51: multiple definition of `contact_flds_separator'; siputils.o:/builddir/build/BUILD/kamailio-5.3.2/src/modules/siputils/contact_ops.h:51: first defined here collect2: error: ld returned 1 exit status make[2]: *** [../../Makefile.rules:191: siputils.so] Error 1 make[1]: *** [Makefile:511: modules] Error 1 make: *** [Makefile:34: every-module] Error 2 ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2235___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] support sd_notify() to improve systemd integration (#2139)
@miconda, @sergey-safarov, @linuxmaniac thank you. I confirm this now works atop branch 5.3 with the following in `/lib/systemd/system/kamailio.service` ``` [Unit] Description=Kamailio SIP Server Documentation=man:kamailio(8) https://www.kamailio.org/ After=network.target [Service] Type=notify User=kamailio Environment=SHM_SIZE=128 PKG_SIZE=8 ExecStartPre=/usr/sbin/kamailio -c ExecStart=/usr/sbin/kamailio -DD -m $SHM_SIZE -M $PKG_SIZE ProtectHome=true Restart=on-failure RestartSec=30 [Install] WantedBy=multi-user.target ``` Now, onto #799 ... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2139#issuecomment-557694254___ 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] Unexpected log_systemd behavior when daemon is forked (#799)
> If found if kamailio started from command line like `kamailio -DD -E` and > present `log_engine_type="systemd"`, then i can see messages from > `sd_journal_print` and `xlog` functions. > > When I start kamailio with same config as systemd service then I not see > messages from `sd_journal_print` and `xlog` functions. > > When I disable `log_engine_type="systemd"` then i can see output of > `sd_journal_print` and `xlog` functions again. > Think some issue exist here. That is exactly what I find as well. I'm re-researching this as well as the new `systemdops.so` module to support `sd_notify()` in 0c48e1621c88bf1d390e4cfb82e52b2d6339b837. Both of them seem to suffer from the same issue -- the way Kamailio is forking interferes with the core using certain modules, as they relate to sending messages to systemd. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/799#issuecomment-557405557___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] support sd_notify() to improve systemd integration (#2139)
> I tested a bit more in Fedora 31, but couldn't get this to work as a module. > Similar kamailio/systemd issues like #799, which I'll update there, > subjectively. > > Thanks again for working toward systemd integration. Confirming that @linuxmaniac's initial patch does work with `kamailio -DD`. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2139#issuecomment-557395198___ 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] Unexpected log_systemd behavior when daemon is forked (#799)
> Got a bit of time to test this with latest master and it seems to work with > following basic config: > > ``` > #!KAMAILIO > > ### Global Parameters # > > ### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR > debug=2 > log_stderror=no > > memdbg=5 > memlog=5 > > log_facility=LOG_LOCAL0 > log_prefix="{$mt $hdr(CSeq) $ci} " > > /* number of SIP routing processes */ > children=2 > > log_engine_type="systemd" > > ### Modules Section > > /* set paths to location of modules */ > # mpath="/usr/local/lib/kamailio/modules/" > > loadmodule "log_systemd.so" > loadmodule "jsonrpcs.so" > loadmodule "kex.so" > loadmodule "corex.so" > loadmodule "tm.so" > loadmodule "tmx.so" > loadmodule "sl.so" > loadmodule "rr.so" > loadmodule "pv.so" > loadmodule "maxfwd.so" > loadmodule "textops.so" > loadmodule "siputils.so" > loadmodule "xlog.so" > loadmodule "sanity.so" > loadmodule "ctl.so" > loadmodule "cfg_rpc.so" > loadmodule "counters.so" > > > > ### Routing Logic > > > /* Main SIP request routing logic > * - processing of any incoming SIP request starts with this route > * - note: this is the same as route { ... } */ > request_route { > xlog("= test xlog message - R-URI is $ru\n"); > sd_journal_print("LOG_ERR", "+ test sysd message - R-URI is $ru\n"); > sl_send_reply("200", "ok"); > exit; > } > ``` > > I sent test packets with sipsak, and in journalctl I see: > > ``` > root@portugal ~ # journalctl -f > -- Logs begin at Tue 2018-09-11 19:12:04 CEST. -- > Sep 17 12:14:06 portugal kamailio[4540]: INFO: > [core/udp_server.c:205]: probe_max_receive_buffer(): SO_RCVBUF is finally > 425984 > Sep 17 12:14:06 portugal kamailio[4540]: INFO: > [core/udp_server.c:153]: probe_max_receive_buffer(): SO_RCVBUF is initially > 212992 > Sep 17 12:14:06 portugal kamailio[4540]: INFO: > [core/udp_server.c:205]: probe_max_receive_buffer(): SO_RCVBUF is finally > 425984 > Sep 17 12:14:06 portugal kamailio[4553]: INFO: jsonrpcs > [jsonrpcs_sock.c:443]: jsonrpc_dgram_process(): a new child 0/4553 > Sep 17 12:14:06 portugal kamailio[4554]: INFO: ctl [io_listener.c:214]: > io_listen_loop(): io_listen_loop: using epoll_lt io watch method (config) > Sep 17 12:14:48 portugal kamailio[4541]: ERROR: {1 1 OPTIONS > 1446075015@127.0.1.1}
Re: [sr-dev] [kamailio/kamailio] support sd_notify() to improve systemd integration (#2139)
I tested a bit more in Fedora 31, but couldn't get this to work as a module. Similar kamailio/systemd issues like #799, which I'll update there, subjectively. Thanks again for working toward systemd integration. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2139#issuecomment-557359091___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] support sd_notify() to improve systemd integration (#2139)
> Trying to test @miconda's commits on top of the 5.3 branch--can't get > Kamailio to notify systemd on startup. strace doesn't show anything > attempting to send notification to systemd. I'll keep trying... Looking through `main.c`, I think this is because `sr_corecb_void_exec(app_ready);` is not included in `if (dont_fork)`. The assumption with `Type=notify` is that we'd be using `kamailio -DD` where the main process isn't forked, correct? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2139#issuecomment-557257170___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] support sd_notify() to improve systemd integration (#2139)
Trying to test @miconda's commits on top of the 5.3 branch--can't get Kamailio to notify systemd on startup. strace doesn't show anything attempting to send notification to systemd. I'll keep trying... -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2139#issuecomment-557245042___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:a44ade38: kamctl: Update dbtextdb.py for Python3
Module: kamailio Branch: master Commit: a44ade38dc420d2699896930ededf54645837a22 URL: https://github.com/kamailio/kamailio/commit/a44ade38dc420d2699896930ededf54645837a22 Author: Anthony Messina Committer: Anthony Messina Date: 2019-09-29T11:09:26-05:00 kamctl: Update dbtextdb.py for Python3 - reported by GH #1747 --- Modified: utils/kamctl/dbtextdb/dbtextdb.py --- Diff: https://github.com/kamailio/kamailio/commit/a44ade38dc420d2699896930ededf54645837a22.diff Patch: https://github.com/kamailio/kamailio/commit/a44ade38dc420d2699896930ededf54645837a22.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] kamctl: Update dbtextdb.py for Python3 (#2083)
@miconda I don't know about kamcli integration. I was just trying to bring Kamailio up to Python3 since Python2 is very near it's end with distribution support. This code however hadn't really been touched in years, so a refresh (validating it still works and is important) probably is worth it. I don't use it myself. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/2083#issuecomment-536509481___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] kamctl: Update dbtextdb.py for Python3 (#2083)
- reported by GH #1747 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 - [X] 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: - [X] PR should be backported to stable branches - [X] Tested changes locally - [X] Related to issue #1747 Description Updated kamctl/dbtextdb to complie with either Python2 or Python3. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/2083 -- Commit Summary -- * kamctl: Update dbtextdb.py for Python3 -- File Changes -- M utils/kamctl/dbtextdb/dbtextdb.py (2252) -- Patch Links -- https://github.com/kamailio/kamailio/pull/2083.patch https://github.com/kamailio/kamailio/pull/2083.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/2083 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] dialog database varchar(128) too short for IPv6 (#2053)
Related to #2043. When using the database for dialogs, the `caller_contact` and `callee_contact` columns are too short. The following seems to help. ``` ALTER TABLE kamailio.dialog ALTER COLUMN caller_contact TYPE varchar(255); ALTER TABLE kamailio.dialog ALTER COLUMN callee_contact TYPE varchar(255); ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2053___ 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] t_set_fr only works with UDP (#1966)
Is there a workaround for TCP/TLS contacts and combined parallel/serial forking (https://kamailio.org/docs/modules/stable/modules/tm#tm.serial_forking)? Should `t_set_max_lifetime()` be increased for each loop (in failure_route) of `t_next_contacts()`? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1966#issuecomment-527194540___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] topos_d and topos_t database varchar(128) too short for IPv6 (#2043)
With the default `*_contact ` address columns as `varchar(128)`, TOPOS is unable to handle inserting values into the database when using IPv6, which often has contact information hitting or exceeding 256 chars (tested with PostgreSQL). Perhaps these columns can be switched to the `text` type. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2043___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] [Low Priority] Build warning with gcc-9.1.1 (#1965)
Building on Fedora 30 x86_64, the following warning appears: ` BUILDSTDERR: Makefile.defs:1014: You are using an old and unsupported gcc version (9.1.1), compile at your own risk!` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1965___ 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] [Feature Request] Python3 compatibility for dbtextdb (#1747)
@henningw unfortunately no, I have not had time to move this forward. The errors are those typical to others found when a library was written for Python2 and hasn't been ported to Python3--things like`print variable` changed to `print(var)`, etc. Feel free to close out and I can reopen in the future when I have time. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1747#issuecomment-457865795___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:8bb86689: app_python3: fix Python 3.7 deprecation warnings
Module: kamailio Branch: master Commit: 8bb866895c9260fa91143e892a2a77bb1d3fff4b URL: https://github.com/kamailio/kamailio/commit/8bb866895c9260fa91143e892a2a77bb1d3fff4b Author: Anthony Messina Committer: Anthony Messina Date: 2018-12-14T16:32:04-06:00 app_python3: fix Python 3.7 deprecation warnings - check for PY_VERSION_HEX >= 0x0307 --- Modified: src/modules/app_python3/app_python3_mod.c Modified: src/modules/app_python3/python_support.c Modified: src/modules/app_python3/python_support.h --- Diff: https://github.com/kamailio/kamailio/commit/8bb866895c9260fa91143e892a2a77bb1d3fff4b.diff Patch: https://github.com/kamailio/kamailio/commit/8bb866895c9260fa91143e892a2a77bb1d3fff4b.patch --- diff --git a/src/modules/app_python3/app_python3_mod.c b/src/modules/app_python3/app_python3_mod.c index fcc42fa899..464caadb35 100644 --- a/src/modules/app_python3/app_python3_mod.c +++ b/src/modules/app_python3/app_python3_mod.c @@ -177,7 +177,11 @@ static int child_init(int rank) return 0; } _apy_process_rank = rank; +#if PY_VERSION_HEX >= 0x0307 + PyOS_AfterFork_Child(); +#else PyOS_AfterFork(); +#endif if (cfg_child_init()) { return -1; } @@ -431,7 +435,11 @@ int apy_init_script(int rank) { PyObject *pFunc, *pArgs, *pValue, *pResult; int rval = -1; +#if PY_VERSION_HEX >= 0x0307 + const char *classname; +#else char *classname; +#endif PyGILState_STATE gstate; diff --git a/src/modules/app_python3/python_support.c b/src/modules/app_python3/python_support.c index e7dc47d526..0a8216f133 100644 --- a/src/modules/app_python3/python_support.c +++ b/src/modules/app_python3/python_support.c @@ -234,10 +234,18 @@ static char *make_message(const char *fmt, va_list ap) return NULL;// shall not happened, but who knows ;) } +#if PY_VERSION_HEX >= 0x0307 +const char *get_class_name(PyObject *y) +#else char *get_class_name(PyObject *y) +#endif { PyObject *p; +#if PY_VERSION_HEX >= 0x0307 + const char *name; +#else char *name; +#endif p = PyObject_GetAttrString(y, "__name__"); if (p == NULL || p == Py_None) @@ -253,10 +261,18 @@ char *get_class_name(PyObject *y) } +#if PY_VERSION_HEX >= 0x0307 +const char *get_instance_class_name(PyObject *y) +#else char *get_instance_class_name(PyObject *y) +#endif { PyObject *p, *n; +#if PY_VERSION_HEX >= 0x0307 + const char *name; +#else char *name; +#endif n = PyObject_GetAttrString(y, "__class__"); if (n == NULL || n == Py_None) diff --git a/src/modules/app_python3/python_support.h b/src/modules/app_python3/python_support.h index 4d25564119..97c4e72e3e 100644 --- a/src/modules/app_python3/python_support.h +++ b/src/modules/app_python3/python_support.h @@ -30,7 +30,12 @@ PyObject *format_exc_obj; void python_handle_exception(const char *, ...); PyObject *InitTracebackModule(void); +#if PY_VERSION_HEX >= 0x0307 +const char *get_class_name(PyObject *); +const char *get_instance_class_name(PyObject *); +#else char *get_class_name(PyObject *); char *get_instance_class_name(PyObject *); +#endif #endif ___ 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] app_python3: fix Python 3.7 deprecation warnings (#1767)
Thank you @miconda, I think this can go into 5.2 if that's safe enough. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1767#issuecomment-447819502___ 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] [Feature Request] Fix Python 2 & 3 build warnings (#1748)
Ok @miconda, I think I learned how to do all the Github related stuff and went with the `#if PY_VERSION_HEX >= 0x0307` style of version checking based on https://docs.python.org/3/c-api/apiabiversion.html While this patch "fixes" the Python3.7 deprecation warnings, I don't know how the project overall likes to handle things like this. I'm guessing that true devs would prefer to NOT litter code with `#if #endif` statements, but that's for you guys to decide. Thank you for letting me try to contribute. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1748#issuecomment-447501741___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] app_python3: fix Python 3.7 deprecation warnings (#1767)
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 - [x] Small bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: - [x] PR should be backported to stable branches - [x] Tested changes locally - [x] Related to issue #1748 (replace with an open issue number) Description Add compile-time checks for `PY_VERSION_HEX >= 0x0307` You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1767 -- Commit Summary -- * app_python3: fix Python 3.7 deprecation warnings -- File Changes -- M src/modules/app_python3/app_python3_mod.c (8) M src/modules/app_python3/python_support.c (16) M src/modules/app_python3/python_support.h (5) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1767.patch https://github.com/kamailio/kamailio/pull/1767.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1767 ___ 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] [Feature Request] Fix Python 2 & 3 build warnings (#1748)
@miconda ok, I'll need to figure out how to do that ;) I also need to figure out how to do `if Python >=3.7` since these warnings come from changes with the Python 3.7 release. I'm sure some stable enterprise-type distros might not yet be using 3.7. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1748#issuecomment-443848195___ 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] [Feature Request] Fix Python 2 & 3 build warnings (#1748)
The following patch resolves the app_python3 build errors (Which are changes with Python 3.7). Fedora 29 includes Python 3.7 released on 06/27/2018. ``` diff --git a/src/modules/app_python3/app_python3_mod.c b/src/modules/app_python3/app_python3_mod.c index fcc42fa89..00f7e2ced 100644 --- a/src/modules/app_python3/app_python3_mod.c +++ b/src/modules/app_python3/app_python3_mod.c @@ -177,7 +177,7 @@ static int child_init(int rank) return 0; } _apy_process_rank = rank; - PyOS_AfterFork(); + PyOS_AfterFork_Child(); if (cfg_child_init()) { return -1; } @@ -431,7 +431,7 @@ int apy_init_script(int rank) { PyObject *pFunc, *pArgs, *pValue, *pResult; int rval = -1; - char *classname; + const char *classname; PyGILState_STATE gstate; diff --git a/src/modules/app_python3/python_support.c b/src/modules/app_python3/python_support.c index e7dc47d52..14ba3283f 100644 --- a/src/modules/app_python3/python_support.c +++ b/src/modules/app_python3/python_support.c @@ -234,10 +234,10 @@ static char *make_message(const char *fmt, va_list ap) return NULL;// shall not happened, but who knows ;) } -char *get_class_name(PyObject *y) +const char *get_class_name(PyObject *y) { PyObject *p; - char *name; + const char *name; p = PyObject_GetAttrString(y, "__name__"); if (p == NULL || p == Py_None) @@ -253,10 +253,10 @@ char *get_class_name(PyObject *y) } -char *get_instance_class_name(PyObject *y) +const char *get_instance_class_name(PyObject *y) { PyObject *p, *n; - char *name; + const char *name; n = PyObject_GetAttrString(y, "__class__"); if (n == NULL || n == Py_None) diff --git a/src/modules/app_python3/python_support.h b/src/modules/app_python3/python_support.h index 4d2556411..b3823da76 100644 --- a/src/modules/app_python3/python_support.h +++ b/src/modules/app_python3/python_support.h @@ -30,7 +30,7 @@ PyObject *format_exc_obj; void python_handle_exception(const char *, ...); PyObject *InitTracebackModule(void); -char *get_class_name(PyObject *); -char *get_instance_class_name(PyObject *); +const char *get_class_name(PyObject *); +const char *get_instance_class_name(PyObject *); #endif ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1748#issuecomment-443454407___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] [Feature Request] Fix Python 2 & 3 build warnings (#1748)
### app_python (Python2) ``` make[2]: Entering directory '/builddir/build/BUILD/kamailio-5.2.0/src/modules/app_python' gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -Wall -DNAME='"kamailio"' -DVERSION='"5.2.0"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 8.2.1"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=5002000 -DCFG_DIR='"/etc/kamailio/"' -DSHARE_DIR='"/usr/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DWITH_XAVP -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT -I/usr/include/python2.7 -DMOD_NAME='"app_python"' -c apy_kemi_export.c -o apy_kemi_export.o -MMD -MP make[2]: Leaving directory '/builddir/build/BUILD/kamailio-5.2.0/src/modules/app_python' BUILDSTDERR: In file included from /usr/include/python2.7/pyconfig.h:6, BUILDSTDERR: from /usr/include/python2.7/Python.h:8, BUILDSTDERR: from apy_kemi_export.c:30: BUILDSTDERR: /usr/include/python2.7/pyconfig-64.h:1232: warning: "_POSIX_C_SOURCE" redefined BUILDSTDERR: #define _POSIX_C_SOURCE 200112L BUILDSTDERR: BUILDSTDERR: In file included from /usr/include/bits/libc-header-start.h:33, BUILDSTDERR: from /usr/include/stdio.h:27, BUILDSTDERR: from apy_kemi_export.c:26: BUILDSTDERR: /usr/include/features.h:265: note: this is the location of the previous definition BUILDSTDERR: # define _POSIX_C_SOURCE 200809L ``` ``` make[2]: Entering directory '/builddir/build/BUILD/kamailio-5.2.0/src/modules/app_python' gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -Wall -DNAME='"kamailio"' -DVERSION='"5.2.0"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 8.2.1"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=5002000 -DCFG_DIR='"/etc/kamailio/"' -DSHARE_DIR='"/usr/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DWITH_XAVP -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT -I/usr/include/python2.7 -DMOD_NAME='"app_python"' -c apy_kemi.c -o apy_kemi.o -MMD -MP make[2]: Leaving directory '/builddir/build/BUILD/kamailio-5.2.0/src/modules/app_python' BUILDSTDERR: In file included from /usr/include/python2.7/pyconfig.h:6, BUILDSTDERR: from /usr/include/python2.7/Python.h:8, BUILDSTDERR: from apy_kemi.c:25: BUILDSTDERR: /usr/include/python2.7/pyconfig-64.h:1232: warning: "_POSIX_C_SOURCE" redefined BUILDSTDERR: #define _POSIX_C_SOURCE 200112L BUILDSTDERR: BUILDSTDERR: In file included from /usr/include/bits/libc-header-start.h:33, BUILDSTDERR: from /usr/include/stdio.h:27, BUILDSTDERR: from apy_kemi.c:21: BUILDSTDERR: /usr/include/features.h:265: note: this is the location of the previous definition BUILDSTDERR: # define _POSIX_C_SOURCE 200809L ``` ### app_python3 (Python3) ``` make[2]: Entering directory '/builddir/build/BUILD/kamailio-5.2.0/src/modules/app_python3' gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -Wall -DNAME='"kamailio"' -DVERSION='"5.2.0"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 8.2.1"' -D__CPU_x86_64 -D__OS_linux -DVERSIONVAL=5002000 -DCFG_DIR='"/etc/kamailio/"' -DSHARE_DIR='"/usr/share/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DWITH_XAVP -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_M
[sr-dev] [kamailio/kamailio] [Feature Request] Python3 compatibility for dbtextdb (#1747)
kamctl's dbtextdb.py fails to build in a Python3-only environment. Update dbtextdb to Python3. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1747___ 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] Unexpected log_systemd behavior when daemon is forked (#799)
Thanks @miconda. I still have the same issue with 5.1, but I'll try from scratch, working my way up from a basic config to try and isolate the problem further. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/799#issuecomment-422205809___ 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] Restrict app_python to Python2 enabling builds on systems where Python3 is the default (#1645)
@henningw @miconda lightning quick. Thank you! -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1645#issuecomment-421785094___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] Restrict app_python to Python2 enabling builds on systems where Python3 is the default (#1645)
The following change enables app_python (which only works with Python2 anyway) to build on systems where Python3 is the default (Fedora 29). ``` diff --git a/src/modules/app_python/Makefile b/src/modules/app_python/Makefile index d1854c12e..c9ad254c3 100644 --- a/src/modules/app_python/Makefile +++ b/src/modules/app_python/Makefile @@ -9,7 +9,7 @@ NAME=app_python.so # the following to point to the correct instance. Module has been tested # to work with 2.6 and 2.5. Python 2.4 has been only confirmed to compile, # but no testing has been done with that. -PYTHON?=python +PYTHON?=python2 PYTHON_VERSION=${shell ${PYTHON} -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('VERSION')"} PYTHON_LIBDIR=${shell ${PYTHON} -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('LIBDIR')"} ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1645___ 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] app_java: gcj is been removed from gcc since gcc7 (#1487)
While I don't use app_java at all, I did some work to at least get it to build on modern Fedora 27 systems without GCJ and with the following patch and spec: https://messinet.com/rpms/browser/kamailio/app_java.patch, https://messinet.com/rpms/browser/kamailio/kamailio.spec Though even with that patch it probably my builds probably wouldn't work--the build is filled with lots of incompatible pointer type warnings like the following so the code probably needs some modernizing too. ``` BUILDSTDERR: java_msgobj.c: In function 'fill_sipmsg_object': BUILDSTDERR: java_msgobj.c:83:27: warning: passing argument 2 of '(*env)->SetIntField' from incompatible pointer type [-Wincompatible-pointer-types] BUILDSTDERR: (*env)->SetIntField(env, SipMsgInstance, fid, msg->id); ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1487#issuecomment-375822982___ 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] auth_ephemeral.so: undefined symbol: EVP_sha512 (#1473)
Just keeping an eye on this ticket... Using TLS and auth_ephemeral on Fedora based systems (currently Fedora 27 with openssl-1.1.0g-1.fc27.x86_64) I haven't run across this issue, though I compile with `TLS_EXTRA_LIBS="-lcrypto -lz -lkrb5"` and don't need static linking. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1473#issuecomment-372486091___ 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] SEGV coredump on Kamailio stop or restart (possibly related to use of systemd and log_systemd module) (#1454)
Thank @miconda. I'll rebuild and report back if there are issues. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1454#issuecomment-368855430___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] SEGV coredump on Kamailio stop or restart (possibly related to use of systemd and log_systemd module) (#1454)
### Description SEGV coredump on Kamailio stop or restart -- this doesn't happen every time, but about 90% of the time. ``` Stack trace of thread 12773: #0 0x7f02de3ad286 __GI___strlen_sse2 (libc.so.6) #1 0x7f02de385835 fputs_unlocked (libc.so.6) #2 0x7f02de4132b1 syslog (libc.so.6) #3 0x0042aa60 main (kamailio) #4 0x7f02de32400a __libc_start_main (libc.so.6) #5 0x0041800a _start (kamailio) ``` ### Troubleshooting I do not use the `xlog` module and use `log_systemd` module functions within the script but do not set `log_engine_type="systemd"` due to issue #799. Module loading order ``` ~]# grep loadmod /etc/kamailio/kamailio.cfg loadmodule "log_systemd.so" loadmodule "tls.so" loadmodule "db_postgres.so" loadmodule "jsonrpcs.so" loadmodule "kex.so" loadmodule "corex.so" loadmodule "tm.so" loadmodule "tmx.so" loadmodule "sl.so" loadmodule "rr.so" loadmodule "pv.so" loadmodule "maxfwd.so" loadmodule "usrloc.so" loadmodule "registrar.so" loadmodule "textops.so" loadmodule "siputils.so" #loadmodule "xlog.so" loadmodule "sanity.so" loadmodule "ctl.so" loadmodule "cfg_rpc.so" loadmodule "acc.so" loadmodule "counters.so" loadmodule "sqlops.so" loadmodule "auth.so" loadmodule "auth_db.so" loadmodule "permissions.so" loadmodule "alias_db.so" loadmodule "speeddial.so" loadmodule "domain.so" loadmodule "presence.so" loadmodule "presence_conference.so" loadmodule "presence_dialoginfo.so" loadmodule "presence_mwi.so" loadmodule "presence_reginfo.so" loadmodule "presence_xml.so" loadmodule "pua.so" loadmodule "pua_usrloc.so" loadmodule "pua_dialoginfo.so" loadmodule "nathelper.so" loadmodule "rtpengine.so" loadmodule "ipops.so" loadmodule "sdpops.so" loadmodule "htable.so" loadmodule "pike.so" loadmodule "xmlrpc.so" loadmodule "debugger.so" loadmodule "dialog.so" loadmodule "group.so" loadmodule "uac.so" loadmodule "imc.so" loadmodule "lcr.so" loadmodule "app_python.so" loadmodule "textopsx.so" loadmodule "msilo.so" loadmodule "tcpops.so" loadmodule "topos.so" loadmodule "diversion.so" loadmodule "tmrec.so" loadmodule "xhttp.so" loadmodule "websocket.so" loadmodule "auth_ephemeral.so" ``` systemd unit file ``` [Unit] Description=Kamailio SIP Server Documentation=man:kamailio(8) https://www.kamailio.org/ After=network.target [Service] Type=forking User=kamailio Environment=SHM_SIZE=64 Environment=PKG_SIZE=8 ExecStartPre=/usr/sbin/kamailio -c ExecStart=/usr/sbin/kamailio -m $SHM_SIZE -M $PKG_SIZE -P /run/kamailio/kamailio.pid ExecStopPost=/usr/bin/rm -f /run/kamailio/kamailio.pid PIDFile=/run/kamailio/kamailio.pid Restart=on-failure RestartSec=30 [Install] WantedBy=multi-user.target ``` Reproduction The issue usually occurs when stopping or restarting Kamailio Debugging Data ``` #0 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:120 No locals. #1 0x7f02de385835 in __GI___fputs_unlocked (str=0x7f02ddb597c8 , fp=fp@entry=0x131ceb0) at iofputs_u.c:34 len = result = #2 0x7f02de4132b1 in __GI___vsyslog_chk (ap=0x7ffe7e661398, fmt=0x742598 "%s: %s%s(): error sending exit status: %s [%d]\n", flag=-1, pri=) at ../misc/syslog.c:205 buf = 0x0 now_tm = {tm_sec = 49, tm_min = 29, tm_hour = 12, tm_mday = 24, tm_mon = 1, tm_year = 118, tm_wday = 6, tm_yday = 54, tm_isdst = 0, tm_gmtoff = -21600, tm_zone = 0x11a2350 "CST"} fd = failbuf = "\000\000\000\000\005\000\000\000\216\247J\336\002\177", '\000' now = 1519496989 f = 0x131ceb0 bufsize = 0 msgoff = 20 saved_errno = 32 #3 __syslog (pri=, fmt=0x742598 "%s: %s%s(): error sending exit status: %s [%d]\n") at ../misc/syslog.c:117 ap = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7ffe7e661500, reg_save_area = 0x7ffe7e661410}} #4 0x0042aa60 in main (argc=7, argv=0x7ffe7e6617a8) at main.c:2664 __llevel = -1 cfg_stream = 0x10fb260 c = -1 r = 0 tmp = 0x7ffe7e662ee9 "" tmp_len = 0 port = 0 proto = 0 options = 0x740400 ":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 = 2750509941 rfd = 4 debug_save = 0 debug_flag = 0 dont_fork_cnt = 0 n_lst = 0x7f02ded2d6d0 p = 0x7ffe7e661600 "\377\377\377\377" st = {st_dev = 22, st_ino = 23605, st_nlink = 2, st_mode = 16872, st_uid = 986, st_gid = 983, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1519444521, tv_nsec = 392061379}, st_mtim = {tv_sec = 1519496899, tv_nsec = 273235419}, st_ctim = {tv_sec = 1519496899, tv_nsec = 273235419}, __glibc_reserved = {0, 0, 0}} __func__ = "main" __llevel = -1 cfg_stream = 0x10fb260 c = -1 r = 0 tmp = 0x7ffe7e662ee9 "" tmp_len = 0 port = 0 proto = 0 options = 0x740400 ":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 = 2750509941 rfd = 4 debug_save = 0 debug
Re: [sr-dev] [kamailio/kamailio] s.substr transformation with negative offset and length greater than 1 not working (#1426)
Thanks @miconda. When you say it that way and I go back to read the docs, they make sense. Sorry for the noise. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1426#issuecomment-362928447___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] s.substr transformation with negative offset and length greater than 1 not working (#1426)
According to https://www.kamailio.org/wiki/cookbooks/5.1.x/transformations (and I'm using 5.1), I should be able to do something like `$var(num)=$(fU{s.substr,-1,10})` and `$var(num)` should be `123456789` if `$fU` is `0123456789` (only the last 10 characters are displayed). However, `$var(num)` ends up with only the last character of the substring, in this case, `9`. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1426___ 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] DB Postgres BLOB conversion for presence (#1255)
It may be more than is necessary, but PostgreSQL can store XML documents natively with the XML data type: https://www.postgresql.org/docs/9.6/static/datatype-xml.html, but I guess that would require a rewrite of how Kamailio stores presence data :( -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1255#issuecomment-352268538___ 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] [Low Priority] Minor build warnings with gcc-7.2.1-2.fc27.x86_64 (#1325)
Just upgraded to 5.1 branch. Closed in favor of #1369. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1325#issuecomment-351980427___ 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] [Low Priority] Minor build warnings with gcc-7.2.1-2.fc27.x86_64 (#1325)
Closed #1325. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1325#event-1389425101___ 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] 5.1.0 group use_domain not working (after upgrade from 5.0) (#1363)
Thanks @miconda -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1363#issuecomment-351705323___ 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] 5.1.0 group use_domain not working (after upgrade from 5.0) (#1363)
>From my kamailio.cfg file: `is_user_in("Request-URI", "did"))` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1363#issuecomment-351372745___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] 5.1.0 group use_domain not working (after upgrade from 5.0) (#1363)
### Description After upgrading from 5.0 to 5.1.0, the use_domain parameter of the group module doesn't seem to work properly. The configuration file was not changed for the upgrade. ### Troubleshooting Reproduction Verified proper configuration ``` #!define WITH_GROUP ... #!ifdef WITH_MULTIDOMAIN #!define MULTIDOMAIN 1 #!else #!define MULTIDOMAIN 0 #!endif ... #!ifdef WITH_GROUP # - group params - modparam("group", "db_url", DBURL) modparam("group", "use_domain", MULTIDOMAIN) #!endif ``` Log Messages The actual phone number has been replaced by `+1NXXNXX` below. ``` kamailio[5663]: DEBUG: [core/select.c:412]: run_select(): Calling SELECT 0x7f072eecf700 kamailio[5663]: DEBUG: db_postgres [km_val.c:154]: db_postgres_val2str(): PQescapeStringConn: in: 12 chars, out: 12 chars kamailio[5663]: DEBUG: db_postgres [km_val.c:154]: db_postgres_val2str(): PQescapeStringConn: in: 3 chars, out: 3 chars kamailio[5663]: DEBUG: db_postgres [km_val.c:154]: db_postgres_val2str(): PQescapeStringConn: in: 0 chars, out: 0 chars kamailio[5663]: DEBUG: db_postgres [km_dbase.c:248]: db_postgres_submit_query(): sending query ok: 0x7f072efefca0 (2) - [select grp from grp where username='+1NXXNXX' AND grp='did' AND domain=''] kamailio[5663]: DEBUG: [db_res.c:119]: db_new_result(): allocate 56 bytes for result set at 0x7f072efce170 kamailio[5663]: DEBUG: db_postgres [km_dbase.c:530]: db_postgres_store_result(): 0x7f072efefca0 PQresultStatus(PGRES_TUPLES_OK) PQgetResult(0x14f5d00) kamailio[5663]: DEBUG: db_postgres [km_res.c:95]: db_postgres_get_columns(): 1 columns returned from the query kamailio[5663]: DEBUG: [db_res.c:156]: db_allocate_columns(): allocate 8 bytes for result names at 0x7f072f065478 kamailio[5663]: DEBUG: [db_res.c:167]: db_allocate_columns(): allocate 4 bytes for result types at 0x7f072f065118 kamailio[5663]: DEBUG: db_postgres [km_res.c:112]: db_postgres_get_columns(): allocate 16 bytes for RES_NAMES[0] at 0x7f072efef9e8 kamailio[5663]: DEBUG: db_postgres [km_res.c:119]: db_postgres_get_columns(): RES_NAMES(0x7f072efef9e8)[0]=[grp] kamailio[5663]: DEBUG: db_postgres [km_res.c:154]: db_postgres_get_columns(): use DB1_STRING result type kamailio[5663]: DEBUG: db_postgres [km_res.c:200]: db_postgres_convert_rows(): no rows returned from the query kamailio[5663]: DEBUG: group [group.c:182]: is_user_in_helper(): user is not in group 'did' ``` SIP Traffic Since the group isn't found with the domain, the call is rejected (but the SIP traffic isn't an issue here). ### Possible Solutions ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` version: kamailio 5.1.0 (x86_64/linux) flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled on 18:49:15 Dec 11 2017 with gcc 7.2.1 ``` * **Operating System**: ``` Linux example.com 4.14.3-300.fc27.x86_64 #1 SMP Mon Dec 4 17:18:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1363___ 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] [Low Priority] Minor build warnings with gcc-7.2.1-2.fc27.x86_64 (#1325)
Sorry for the noise @miconda, I have been building against the tip of the 5.0 branch. I'll check out master and report back. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1325#issuecomment-346981864___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] [Low Priority] Minor build warnings with gcc-7.2.1-2.fc27.x86_64 (#1325)
Getting prepared for the next set of builds with an updated Fedora 27 system using gcc-7.2.1-2.fc27.x86_64, the following are the warnings dumped out. Feel free to close if this isn't important. I am not reporting that any of these create issues in my running Kamailio instance. ``` rtpengine.c: In function 'add_rtpengine_socks': rtpengine.c:778:24: warning: comparison between pointer and zero character constant [-Wpointer-compare] if (p1 != NULL && p1 != '\0') { ^~ rtpengine.c:778:21: note: did you mean to dereference the pointer? if (p1 != NULL && p1 != '\0') { ``` ``` libsms_modem.c: In function 'initmodem': libsms_modem.c:230:36: warning: '%s' directive writing up to 128 bytes into a region of size 91 [-Wformat-overflow=] clen=sprintf(command,"AT+CPIN=\"%s\"\r",mdm->pin); ^~ libsms_modem.c:230:8: note: 'sprintf' output between 12 and 140 bytes into a destination of size 100 clen=sprintf(command,"AT+CPIN=\"%s\"\r",mdm->pin); ``` ``` xhttp_rpc_fnc.c:188:18: warning: 'XHTTP_RPC_Post_1a' defined but not used [-Wunused-const-variable=] static const str XHTTP_RPC_Post_1a = str_init("\n"\ ^ xhttp_rpc_fnc.c:176:18: warning: 'XHTTP_RPC_ATTR_VAL_SEPARATOR' defined but not used [-Wunused-const-variable=] static const str XHTTP_RPC_ATTR_VAL_SEPARATOR = str_init("="); ^~~~ xhttp_rpc_fnc.c:175:18: warning: 'XHTTP_RPC_ATTR_SEPARATOR' defined but not used [-Wunused-const-variable=] static const str XHTTP_RPC_ATTR_SEPARATOR = str_init(" "); ^~~~ xhttp_rpc_fnc.c:174:18: warning: 'XHTTP_RPC_NODE_SEPARATOR' defined but not used [-Wunused-const-variable=] static const str XHTTP_RPC_NODE_SEPARATOR = str_init(":: "); ^~~~ ``` ``` uac_reg.c: In function 'reg_ht_add': uac_reg.c:558:81: warning: ?: using integer constants in boolean context [-Wint-in-bool-context] uac_reg.c:502:13: p = p + ((bsize)?(bsize):(dst)->len) + 1; \ ~~~ uac_reg.c:558:81: reg_copy_shm(&nr->callid, &str_empty, reg_keep_callid ? UAC_REG_TM_CALLID_SIZE : 0); uac_reg.c:502:14: note: in definition of macro 'reg_copy_shm' p = p + ((bsize)?(bsize):(dst)->len) + 1; \ ^ ``` ``` cr_fifo.c:64:12: warning: 'get_fifo_opts' declared 'static' but never defined [-Wunused-function] static int get_fifo_opts(str * buf, fifo_opt_t * opts, unsigned int opt_set[]); ^ cr_fifo.c:66:12: warning: 'update_route_data' declared 'static' but never defined [-Wunused-function] static int update_route_data(fifo_opt_t * opts); ^ cr_fifo.c:753:12: warning: 'update_route_data_recursor' defined but not used [-Wunused-function] static int update_route_data_recursor(struct dtrie_node_t *node, str * act_domain, fifo_opt_t * opts) { ^~ cr_fifo.c:78:12: warning: 'str_toklen' defined but not used [-Wunused-function] static int str_toklen(str * str, const char * delims) ^~ ``` ``` authorize.c:158:12: warning: 'get_ha1' defined but not used [-Wunused-function] static int get_ha1(struct username* _username, str* _domain, ^~~ ``` ``` java_msgobj.c: In function 'fill_sipmsg_object': java_msgobj.c:88:30: warning: passing argument 2 of '(*env)->SetIntField' from incompatible pointer type [-Wincompatible-pointer-types] (*env)->SetIntField(env, SipMsgInstance, fid, msg->id); ^~ java_msgobj.c:88:30: note: expected 'jobject {aka struct _jobject *}' but argument is of type 'struct _jobject **' java_msgobj.c:103:30: warning: passing argument 2 of '(*env)->SetIntField' from incompatible pointer type [-Wincompatible-pointer-types] (*env)->SetIntField(env, SipMsgInstance, fid, msg->pid); ^~ java_iface.c: In function 'java_exec': java_iface.c:193:48: warning: passing argument 2 of '(*env)->NewLocalRef' from incompatible pointer type [-Wincompatible-pointer-types] invk_method_ref = (*env)->NewLocalRef(env, invk_method); ^~~ java_iface.c:193:48: note: expected 'jobject {aka struct _jobject *}' but argument is of type 'jmethodID {aka struct _jmethodID *}' java_iface.c:193:21: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types] invk_method_ref = (*env)->NewLocalRef(env, invk_method); ^ java_iface.c:197:30: warning: passing argument 2 of '(*env)->DeleteLocalRef' from incompatible pointer type [-Wincompatible-pointer-types] (*env)->DeleteLocalRef(env, invk_method_ref); ^~~ java_iface.c:197:30: note: expected 'jobject {aka struct _jobject *}' but argument is of type 'jmethodID {a
Re: [sr-dev] [kamailio/kamailio] usrloc: more docs for db_insert_null parameter (03d0a93)
fiels -> fields -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/commit/03d0a93acb9cbb212292f32a7913dcf7754eb155#commitcomment-25795012___ 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] Segfault when trying to write to the DB when it can't (possibly on shutdown) (#1287)
I've patched it in to my build for testing and will report back if I see the issue again. Thank you. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1287#issuecomment-341791398___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev