[sr-dev] Re: [kamailio/kamailio] websocket: move some logging from ERROR to INFO (PR #3349)
if you're changing this maybe set to `L_DEBUG` instead ? or add a mod param for this ? -- Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/3349#issuecomment-1406661231 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] [kamailio/kamailio] hostname in kubernetes (#2119)
@henningw we've been applying that patch in our builds and it works for us, but i'm ok in closing 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/2119#issuecomment-919989068___ 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] textops: RFC2543 is broken (#2844)
Merged #2844 into master. -- 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/2844#event-5265074590___ 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] xlog: add prefix_mode (#2845)
Merged #2845 into master. -- 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/2845#event-5265072178___ 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] xlog: add prefix_mode (#2845)
thanks @miconda in the PR example the $_s() was added to have an extra space at end, the `LOG_FX` macro joins the prefix without a space if there's a value and i didn't want to change the `macro`, maybe a PR can be made to `core` to tweak the `LOG_FX` macro. -- 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/2845#issuecomment-914214179___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] xlog: add prefix_mode (#2845)
allows pv_format specifier in prefix param !-- Kamailio Pull Request Template -- !-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with git cherry-pick -x ... - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -- Pre-Submission Checklist !-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -- !-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-- !-- If youre unsure about any of these, dont hesitate to ask on sr-dev mailing list -- - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description !-- Describe your changes in detail -- add `prefix_mode` param to xlog to optionally interpret `prefix` as a `pv_format` specifier. `config`: ``` mod_param(xlog, prefix, $_s([$(cfg(file):$cfg(line)] $ci $(cfg(route){s.tolower}) )) mod_param(xlog, prefix_mode, 1) ... xlog(L_INFO, hello) ... ``` `output:` precode 66(307) INFO: b[my-file.cfg:5]/b 62795aa2-9696c27c bmy_route/b hello /code /pre You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/2845 -- Commit Summary -- * xlog: add prefix_mode -- File Changes -- M src/modules/xlog/doc/xlog_admin.xml (22) M src/modules/xlog/xlog.c (46) -- Patch Links -- https://github.com/kamailio/kamailio/pull/2845.patch https://github.com/kamailio/kamailio/pull/2845.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/2845 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:3ee0670e: textops: RFC2543 is broken
Module: kamailio Branch: master Commit: 3ee0670ee9ca5e2812fd90cccef3a7ae4e55a3b4 URL: https://github.com/kamailio/kamailio/commit/3ee0670ee9ca5e2812fd90cccef3a7ae4e55a3b4 Author: lazedo Committer: lazedo Date: 2021-09-07T12:12:12+01:00 textops: RFC2543 is broken commit cbcc27ef8b1674448bd8b1c45f03388e36f65f51 broke RFC2543 hold there's no need to check for sendrecv_mode, is_on_hold is either set or not in sdp_stream and/or sdp_session --- Modified: src/modules/textops/textops.c --- Diff: https://github.com/kamailio/kamailio/commit/3ee0670ee9ca5e2812fd90cccef3a7ae4e55a3b4.diff Patch: https://github.com/kamailio/kamailio/commit/3ee0670ee9ca5e2812fd90cccef3a7ae4e55a3b4.patch --- diff --git a/src/modules/textops/textops.c b/src/modules/textops/textops.c index 84e93f30ed..bfb5a54941 100644 --- a/src/modules/textops/textops.c +++ b/src/modules/textops/textops.c @@ -4517,13 +4517,10 @@ static int ki_is_audio_on_hold(sip_msg_t *msg) if(!sdp_stream) break; if(sdp_stream->media.len==AUDIO_STR_LEN && strncmp(sdp_stream->media.s,AUDIO_STR,AUDIO_STR_LEN)==0 && - sdp_stream->sendrecv_mode.len && sdp_stream->is_on_hold) return sdp_stream->is_on_hold; if(sdp_stream->media.len==AUDIO_STR_LEN && strncmp(sdp_stream->media.s,AUDIO_STR,AUDIO_STR_LEN)==0 && - !sdp_stream->sendrecv_mode.len && - sdp_session->sendrecv_mode.len && sdp_session->is_on_hold) return sdp_session->is_on_hold; sdp_stream_num++; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:88e5f613: xlog: add prefix_mode
Module: kamailio Branch: master Commit: 88e5f6130a26f37e4e5dfa515ef640443bbc6873 URL: https://github.com/kamailio/kamailio/commit/88e5f6130a26f37e4e5dfa515ef640443bbc6873 Author: Luis Azedo Committer: lazedo Date: 2021-09-07T12:11:47+01:00 xlog: add prefix_mode allows pv_format specifier in prefix param --- Modified: src/modules/xlog/doc/xlog_admin.xml Modified: src/modules/xlog/xlog.c --- Diff: https://github.com/kamailio/kamailio/commit/88e5f6130a26f37e4e5dfa515ef640443bbc6873.diff Patch: https://github.com/kamailio/kamailio/commit/88e5f6130a26f37e4e5dfa515ef640443bbc6873.patch --- diff --git a/src/modules/xlog/doc/xlog_admin.xml b/src/modules/xlog/doc/xlog_admin.xml index 3a6b029c6e..3fcda4c105 100644 --- a/src/modules/xlog/doc/xlog_admin.xml +++ b/src/modules/xlog/doc/xlog_admin.xml @@ -165,6 +165,28 @@ modparam("xlog", "long_format", 1) ... modparam("xlog", "prefix", "-xlog: ") ... + + + + + prefix_mode (str) + + control behaviour of prefix value. + if mode = 0 then prefix is treated as string (current behaviour). + if mode = 1 then prefix is treated as pv_format specifier and value will be evaluated before output. + + + + Default value is 0. + + + + Set prefix_mode parameter + +... +modparam("xlog", "prefix", "$cfg(name):$cfg(line)") +modparam("xlog", "prefix_mode", 1) +... diff --git a/src/modules/xlog/xlog.c b/src/modules/xlog/xlog.c index ed167d80ba..ea05e51833 100644 --- a/src/modules/xlog/xlog.c +++ b/src/modules/xlog/xlog.c @@ -60,6 +60,9 @@ MODULE_VERSION char *_xlog_buf = NULL; char *_xlog_prefix = "
[sr-dev] [kamailio/kamailio] textops: RFC2543 is broken (#2844)
commit cbcc27ef8b1674448bd8b1c45f03388e36f65f51 broke RFC2543 hold theres no need to check for sendrecv_mode, is_on_hold is either set or not in sdp_stream and/or sdp_session !-- Kamailio Pull Request Template -- !-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with git cherry-pick -x ... - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -- Pre-Submission Checklist !-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -- !-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-- !-- If youre unsure about any of these, dont hesitate to ask on sr-dev mailing list -- - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [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: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [X] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description !-- Describe your changes in detail -- removed the check for `sendrecv_mode` You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/2844 -- Commit Summary -- * textops: RFC2543 is broken -- File Changes -- M src/modules/textops/textops.c (3) -- Patch Links -- https://github.com/kamailio/kamailio/pull/2844.patch https://github.com/kamailio/kamailio/pull/2844.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/2844 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] tlsf is broken (#2843)
### Description ### Troubleshooting Reproduction kamailio -c -x tlsf -f misc/examples/pkg/kamailio-basic.cfg Debugging Data ``` core was generated by `kamailio -c -x tlsf -f misc/examples/pkg/kamailio-basic.cfg'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x555e79902495 in str_hash_add (ht=0x555e79d6e0f0 , e=0x7f01c0521a48) at core/str_hash.h:85 85 clist_insert(>table[h], e, next, prev); (gdb) bt full #0 0x555e79902495 in str_hash_add (ht=0x555e79d6e0f0 , e=0x7f01c0521a48) at core/str_hash.h:85 h = 6 #1 0x555e79902e46 in route_add (rt=0x555e79d6e0e0 , name=0x555e79bd87be "0", i=0) at core/route.c:134 e = 0x7f01c0521a48 __func__ = "route_add" #2 0x555e799035f3 in init_rlist (r_name=0x555e79bd87c0 "main", rt=0x555e79d6e0e0 , n_entries=2, hash_size=8) at core/route.c:160 __func__ = "init_rlist" #3 0x555e79903647 in init_routes () at core/route.c:172 No locals. #4 0x555e79776eaa in main (argc=6, argv=0x7ffec006df78) at main.c:2408 cfg_stream = 0x0 c = -1 r = 0 tmp = 0x0 tmp_len = 0 port = 0 proto = 0 ahost = 0x0 aport = 0 options = 0x555e79ba60a8 ":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 = 0 rfd = 0 debug_save = 0 debug_flag = 0 dont_fork_cnt = 0 n_lst = 0x0 p = 0x0 st = {st_dev = 0, st_ino = 0, st_nlink = 0, st_mode = 0, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 0, st_blksize = 0, st_blocks = 0, st_atim = {tv_sec = 0, tv_nsec = 0}, st_mtim = {tv_sec = 0, tv_nsec = 0}, st_ctim = {tv_sec = 0, tv_nsec = 0}, __unused = {0, 0, 0}} tbuf = '\000' ... option_index = 0 long_options = {{name = 0x555e79ba85a6 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x555e79ba3504 "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x555e79ba85ab "alias", has_arg = 1, flag = 0x0, val = 1024}, {name = 0x555e79ba85b1 "subst", has_arg = 1, flag = 0x0, val = 1025}, {name = 0x555e79ba85b7 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x555e79ba85c0 "substdefs", has_arg = 1, flag = 0x0, val = 1027}, {name = 0x555e79ba85ca "server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x555e79ba85d4 "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x555e79ba85df "modparam", has_arg = 1, flag = 0x0, val = 1030}, {name = 0x555e79ba85e8 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x555e79ba85f3 "debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x555e79ba85f9 "cfg-print", has_arg = 0, flag = 0x0, val = 1033}, {name = 0x555e79ba8603 "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x555e79ba860a "defenv", has_arg = 1, flag = 0x0, val = 1035}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}} __func__ = "main" (gdb) info locals h = 6 (gdb) list 80 struct str_hash_entry* e) 81 { 82 int h; 83 84 h=get_hash1_raw(e->key.s, e->key.len) % ht->size; 85 clist_insert(>table[h], e, next, prev); 86 } 87 88 89 (gdb) ``` ### Possible Solutions works after reverting - ddafeebfaf1537c684eee22be228867563dd02ac - 2d7aee506c617f2d258719562f8debf2b4ba087e ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` bash-5.0# kamailio -v version: kamailio 5.5.2 (x86_64/linux) 55e232-dirty 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: 55e232 -dirty compiled on 15:08:48 Sep 5 2021 with gcc 9.3.0 ``` * **Operating System**: ``` Alpine Docker Image 3.12 ``` -- 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/2843___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] tm: restore xavps & flags after rebuilding message (#2821)
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: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [X] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description setting via xavp in tm:local-request has no effect ``` xavp_via_params = via event_route[tm:local-request] { $xavp(via=xi) = something via_add_xavp_params(1); } reply_route { $var(vd) = $sel(via.params[xi]); xlog(L_INFO, $ci|log|core|reply $rm this should be true = ($var(vd) == something)\n); } ``` Changes changed t_run_local_req and moved restore xavps flags to the end, after the messages changes are applied. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/2821 -- Commit Summary -- * tm: restore xavps flags after rebuilding message -- File Changes -- M src/modules/tm/uac.c (8) -- Patch Links -- https://github.com/kamailio/kamailio/pull/2821.patch https://github.com/kamailio/kamailio/pull/2821.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/2821 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] Rfc3264 on session (#2813)
Pre-Submission Checklist !-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -- !-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-- !-- If youre unsure about any of these, dont hesitate to ask on sr-dev mailing list -- - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [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: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [X] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description !-- Describe your changes in detail -- some user agents send a=sendonly as a session attribute and is_audio_on_hold() returns false when it should return true. Changes - changed sdp_session_cell struct in sdp.h to add sendrecv_mode and is_on_hold - changed parse_sdp_session in sdp.c to iterate session attributes and call extract_sendrecv_mode for assigment to session - changed ki_is_audio_on_hold in textops.c to look for session sendrecv_mode if its not set in media You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/2813 -- Commit Summary -- * core: parse session sendrecv_mode in sdp * textops: check session sendrecv_mode in is_audio_on_hold -- File Changes -- M src/core/parser/sdp/sdp.c (12) M src/core/parser/sdp/sdp.h (2) M src/modules/textops/textops.c (7) -- Patch Links -- https://github.com/kamailio/kamailio/pull/2813.patch https://github.com/kamailio/kamailio/pull/2813.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/2813 ___ 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] kazoo: different binding for private module and for current 5.4.5 (#2747)
Closed #2747. -- 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/2747#event-4799079966___ 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] kazoo: different binding for private module and for current 5.4.5 (#2747)
@sergey-safarov try running kazoo-kamailio-configs from 4.3 branch -- 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/2747#issuecomment-848734677___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] tlsf memory manager status weirdness (#2628)
### Description TLSF mem manager accounting for wrong values was trying to debug a crash and this popped up. using a lot of small allocs until pkg_alloc returns NULL (when exhausted) when NULL is returned the memory **used+overhead** exceeds the heap allocated. ### Troubleshooting Reproduction use frequent small memory allocs until pool is exausted (returns NULL) , check tlsf status. static void do_test_mem() { void* chunk; tlsf_t pool = NULL; size_t total = 16 * 1024 * 1024; size_t half = 8 * 1024 * 1024; size_t sz = 6; int x; void* mem = malloc(total); char* mem2 = tlsf_cast(char*, tlsf_cast(ptrdiff_t, mem) + half); memset(mem2, 'X', half); assert(*mem2 == 'X'); pool = tlsf_create_with_pool(mem, half); do { chunk = tlsf_malloc(pool, sz); } while(chunk != NULL); tlsf_status(pool); for(x=0; x < half; x++) { assert(*mem2 == 'X'); mem2++; } free(mem); } ``` heap size= **8388592** used= **6285144**, used+overhead=**12578696**, free=**18446744073705361512**, fragments=0 max used (+overhead)=12578696, max fragments=1 Free blocks matrix ('.': none, 'X': between 2^X and (2^(X+1)-1) free blocks, X=A..Z, A=0, B=1, ...) > first-level: 32 block list arrays between 2^fl and 2^(fl+1) bytes (fl=8..39) v second-level: 32 block lists between 2^fl+sl*2^(fl-5) and 2^fl+(sl+1)*2^(fl-5)-1 bytes (sl=0..31) 0|| 1|| 2|| 3|| 4|| 5|| 6|| 7|| 8|| 9|| 10|| 11|| 12|| 13|| 14|| 15|| 16|| 17|| 18|| 19|| 20|| 21|| 22|| 23|| 24|| 25|| 26|| 27|| 28|| 29|| 30|| 31|| ``` Log Messages ``` identical to reproduce step when calling mem debug on a running instance ``` ### Possible Solutions ### Additional Information ``` * **Kamailio Version** - built from master ``` * **Operating System**: ``` CentOS7 and alpine ``` ## comments heap size= **8388592** shouldn't it be **8388608** ? used+overhead=**12578696** misleading free=**18446744073705361512** misleading, looks like it has a negative value the map doesn't look ok (or i'm not understanding what it should show), its the same output before the alloc and after. -- 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/2628___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:f39f88a4: core: add sip_parser_log core variable
Module: kamailio Branch: master Commit: f39f88a47bed160bf55c7bb3c06bff9fa7569750 URL: https://github.com/kamailio/kamailio/commit/f39f88a47bed160bf55c7bb3c06bff9fa7569750 Author: lazedo Committer: lazedo Date: 2020-07-17T10:08:43Z core: add sip_parser_log core variable * when handling non sip messages, parser errors are logged at core level which defaults to ERR. since this may induce in error sysops or log scanners, sometimes the core level is set to debug just to omit these messages from log, which is not good since other messages are omitted too. this commit adds a new core variable to set the log level for message parsing errors. this way, we can explicitly set the log level for message parsing while leaving the core level at ERR. --- Modified: src/core/cfg.lex Modified: src/core/cfg.y Modified: src/core/cfg_core.c Modified: src/core/cfg_core.h Modified: src/core/parser/msg_parser.c Modified: src/core/parser/parse_fline.c Modified: src/core/receive.c --- Diff: https://github.com/kamailio/kamailio/commit/f39f88a47bed160bf55c7bb3c06bff9fa7569750.diff Patch: https://github.com/kamailio/kamailio/commit/f39f88a47bed160bf55c7bb3c06bff9fa7569750.patch ___ 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: add sip_parser_log core variable (#2402)
- [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description when handling non sip messages, parser errors are logged at core level which defaults to ERR. since this may induce in error sysops or log scanners, sometimes the core level is set to debug just to omit these messages from log, which is not good since other messages are omitted too. this commit adds a new core variable to set the log level for message parsing errors. this way, we can explicitly set the log level for message parsing while leaving the core level at ERR. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/2402 -- Commit Summary -- * core: add sip_parser_log core variable -- File Changes -- M src/core/cfg.lex (2) M src/core/cfg.y (3) M src/core/cfg_core.c (3) M src/core/cfg_core.h (1) M src/core/parser/msg_parser.c (2) M src/core/parser/parse_fline.c (2) M src/core/receive.c (2) -- Patch Links -- https://github.com/kamailio/kamailio/pull/2402.patch https://github.com/kamailio/kamailio/pull/2402.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/2402 ___ 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 websocket close event (#2397)
Merged #2397 into master. -- 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/2397#event-3555323588___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:16914788: websocket: emit core event on close
Module: kamailio Branch: master Commit: 16914788ba49b69aaabc8e75ca9b5d95dce6b825 URL: https://github.com/kamailio/kamailio/commit/16914788ba49b69aaabc8e75ca9b5d95dce6b825 Author: lazedo Committer: lazedo Date: 2020-07-16T21:55:15Z websocket: emit core event on close --- Modified: src/modules/websocket/ws_conn.c --- Diff: https://github.com/kamailio/kamailio/commit/16914788ba49b69aaabc8e75ca9b5d95dce6b825.diff Patch: https://github.com/kamailio/kamailio/commit/16914788ba49b69aaabc8e75ca9b5d95dce6b825.patch --- diff --git a/src/modules/websocket/ws_conn.c b/src/modules/websocket/ws_conn.c index 8570afa086..7ffedd9be5 100644 --- a/src/modules/websocket/ws_conn.c +++ b/src/modules/websocket/ws_conn.c @@ -31,6 +31,7 @@ #include "../../core/counters.h" #include "../../core/kemi.h" #include "../../core/mem/mem.h" +#include "../../core/events.h" #include "ws_conn.h" #include "websocket.h" @@ -261,6 +262,14 @@ int wsconn_add(struct receive_info *rcv, unsigned int sub_protocol) return 0; } +static void wsconn_run_close_callback(ws_connection_t *wsc) +{ + sr_event_param_t evp = {0}; + wsc->rcv.proto_reserved1 = wsc->id; + evp.rcv = >rcv; + sr_event_exec(SREV_TCP_WS_CLOSE, ); +} + static void wsconn_run_route(ws_connection_t *wsc) { int rt, backup_rt; @@ -321,6 +330,8 @@ static void wsconn_dtor(ws_connection_t *wsc) if(wsc->run_event) wsconn_run_route(wsc); + wsconn_run_close_callback(wsc); + shm_free(wsc); LM_DBG("wsconn_dtor for [%p] destroyed\n", wsc); ___ 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 websocket close event (#2397)
@miconda any other comments or can this be merged ? -- 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/2397#issuecomment-659588598___ 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 websocket close event (#2397)
@lazedo pushed 1 commit. 4934651fd555e939e45a2baa13f8372635f757db websocket: emit core event on close -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/kamailio/kamailio/pull/2397/files/d9e00a71378b761c92a526372f6f7311d5bd96e6..4934651fd555e939e45a2baa13f8372635f757db ___ 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 websocket close event (#2397)
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) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description allow kamailio modules to be notified when a websocket is closed without depending on script callbacks. this allows for multiple independent modules to subscribe to new core event `SREV_TCP_WS_CLOSE` You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/2397 -- Commit Summary -- * core: add websocket event * websocket: emit core event on close -- File Changes -- M src/core/events.c (20) M src/core/events.h (2) M src/modules/websocket/ws_conn.c (21) -- Patch Links -- https://github.com/kamailio/kamailio/pull/2397.patch https://github.com/kamailio/kamailio/pull/2397.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/2397 ___ 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: don't close tcp connection for dropped non sip messages (#2396)
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) - [X] Breaking change (fix or feature that would change existing functionality) Checklist: - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description when handling non sip messages in a module thru the callback, if we return `NONSIP_MSG_DROP` the tcp/websocket connection is closed. this was observed when receiving non sip messages with websocket module. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/2396 -- Commit Summary -- * core: dont close tcp connection for dropped non sip messages -- File Changes -- M src/core/receive.c (2) -- Patch Links -- https://github.com/kamailio/kamailio/pull/2396.patch https://github.com/kamailio/kamailio/pull/2396.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/2396 ___ 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] Kazoo: added basic kemi support (#2324)
@tao-communications thank you again for your contribution. -- 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/2324#issuecomment-632119666___ 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] Kazoo: added basic kemi support (#2324)
Merged #2324 into master. -- 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/2324#event-3360912478___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:3a840116: kazoo: add basic kemi support
Module: kamailio Branch: master Commit: 3a84011684cc84ebceea0e9c915c5e2316b5 URL: https://github.com/kamailio/kamailio/commit/3a84011684cc84ebceea0e9c915c5e2316b5 Author: Author Yufei Tao Committer: lazedo Date: 2020-05-21T14:30:58Z kazoo: add basic kemi support --- Modified: src/modules/kazoo/doc/kazoo_admin.xml Modified: src/modules/kazoo/kazoo.c Modified: src/modules/kazoo/kz_amqp.c Modified: src/modules/kazoo/kz_amqp.h --- Diff: https://github.com/kamailio/kamailio/commit/3a84011684cc84ebceea0e9c915c5e2316b5.diff Patch: https://github.com/kamailio/kamailio/commit/3a84011684cc84ebceea0e9c915c5e2316b5.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] Kazoo: added basic kemi support (#2324)
@tao-communications looks good, just waiting for travis to complete. thanks. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/2324#issuecomment-632116609___ 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] Kazoo: added basic kemi support (#2324)
@lazedo approved 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/2324#pullrequestreview-416189882___ 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] Kazoo: added basic kemi support (#2324)
@lazedo requested changes on this pull request. waiting on squashed commit -- 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/2324#pullrequestreview-416080988___ 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] Kazoo: added basic kemi support (#2324)
@miconda why did you dismissed my review ? -- 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/2324#issuecomment-632040899___ 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] Kazoo: added basic kemi support (#2324)
@miconda i know that, i just asked to squash 6 commits into one. waiting on this and i will `Rebase and merge`. i want to preserve the original commit and not do a `merge`. 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/pull/2324#issuecomment-632040435___ 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] Kazoo: added basic kemi support (#2324)
@tao-communications all good. please squash your commits so it can be merged -- 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/2324#issuecomment-632011805___ 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] Kazoo: added basic kemi support (#2324)
@tao-communications great job, thank you. i do have a final request, when that's done, please squash your commits into a single commit, `kazoo: add basic kemi support` i feel that `kazoo_route_no` doesn't express well the intent for the variable which is to use `kemi` instead of `cfg`. can you please rename `kazoo_route_no` to `kazoo_kemi_enabled` with default 0 and set it to 1 in [here](https://github.com/kamailio/kamailio/pull/2324/files#diff-52d37ad2407d869cdcee8ffc29166e62R330) and then use ``` if ( kazoo_kemi_enabled ) { do kemi routine } else { do cfg routine } ``` where applicable, for example in `fire_init_event` ``` if (kazoo_kemi_enabled) { return fire_init_event_kemi(); } else { return fire_init_event_cfg(); } `` -- 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/2324#issuecomment-631961748___ 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] Kazoo: added basic kemi support (#2324)
@lazedo requested changes on this pull request. thank you for your contribution. some required changes > +if(faked_msg_init()<0) +{ +LM_ERR("failed to init kazoo local sip msg\n"); +return -1; +} + why was this added ? > +sr_kemi_eng_t *keng = NULL; + if(kazoo_event_callback.s!=NULL && kazoo_event_callback.len>0) { + keng = sr_kemi_eng_get(); + if(keng==NULL) { + LM_ERR("failed to find kemi engine\n"); + return -1; + } + kazoo_route_no=-1; + } +else { + route_no=route_lookup(_rt, "kazoo:consumer-event"); + if (route_no==-1) + { + LM_ERR("failed to find event_route[kazoo:consumer-event]\n"); + return -1; + } + if (event_rt.rlist[route_no]==0) + { + LM_WARN("event_route[kazoo:consumer-event] is empty\n"); + } + kazoo_route_no=route_no; +} + + please use a different logic here. `kazoo:consumer-event` is not mandatory. you could set a variable like `kz_use_kemi` that is set if `kazoo_event_callback` is set and `kemi` is valid. then use that variable when needed > + if (kazoo_route_no>=0) { + rt = route_get(_rt, "kazoo:mod-init"); +if(rt>=0 && event_rt.rlist[rt]!=NULL) { + LM_DBG("executing event_route[kazoo:mod-init] (%d)\n", rt); formatting looks odd > + if (kazoo_route_no>=0) { sprintf(buffer, "kazoo:consumer-event-%.*s-%.*s",ev_category.len, ev_category.s, ev_name.len, ev_name.s); -for (p=buffer ; *p; ++p) *p = tolower(*p); -for (p=buffer ; *p; ++p) if(*p == '_') *p = '-'; -if(kz_amqp_consumer_fire_event(buffer) != 0) { -sprintf(buffer, "kazoo:consumer-event-%.*s",ev_category.len, ev_category.s); for (p=buffer ; *p; ++p) *p = tolower(*p); for (p=buffer ; *p; ++p) if(*p == '_') *p = '-'; if(kz_amqp_consumer_fire_event(buffer) != 0) { -sprintf(buffer, "kazoo:consumer-event-%s-%s", key, subkey); +sprintf(buffer, "kazoo:consumer-event-%.*s",ev_category.len, ev_category.s); for (p=buffer ; *p; ++p) *p = tolower(*p); for (p=buffer ; *p; ++p) if(*p == '_') *p = '-'; if(kz_amqp_consumer_fire_event(buffer) != 0) { -sprintf(buffer, "kazoo:consumer-event-%s", key); +sprintf(buffer, "kazoo:consumer-event-%s-%s", key, subkey); for (p=buffer ; *p; ++p) *p = tolower(*p); for (p=buffer ; *p; ++p) if(*p == '_') *p = '-'; - if(kz_amqp_consumer_fire_event(buffer) != 0) { - sprintf(buffer, "kazoo:consumer-event"); - if(kz_amqp_consumer_fire_event(buffer) != 0) { - LM_ERR("kazoo:consumer-event not found\n"); - } - } +if(kz_amqp_consumer_fire_event(buffer) != 0) { +sprintf(buffer, "kazoo:consumer-event-%s", key); +for (p=buffer ; *p; ++p) *p = tolower(*p); +for (p=buffer ; *p; ++p) if(*p == '_') *p = '-'; +if(kz_amqp_consumer_fire_event(buffer) != 0) { +sprintf(buffer, "kazoo:consumer-event"); +if(kz_amqp_consumer_fire_event(buffer) != 0) { +LM_ERR("kazoo:consumer-event not found\n"); +} +} +} } } +} else { +keng = sr_kemi_eng_get(); +if(keng!=NULL) { +sip_msg_t *msg; +str evrtname = str_init("kazoo:consumer-event"); + +rtb = get_route_type(); +msg = faked_msg_next(); +if(sr_kemi_route(keng, msg, EVENT_ROUTE, _event_callback, )<0){ +LM_ERR("error running event route kemi callback\n"); +} +set_route_type(rtb); +} else { +LM_ERR("no event route or kemi callback found for execution\n"); +} } + split this in two different functions that are evoked depending on `kemi` being active > - rt = route_get(_rt, "kazoo:mod-init"); - if(rt>=0 && event_rt.rlist[rt]!=NULL) { - LM_DBG("executing event_route[kazoo:mod-init] (%d)\n", rt); - if(faked_msg_init()<0) -
Re: [sr-dev] [kamailio/kamailio] Kazoo: added basic kemi support (#2324)
@miconda i'll try to take a deeper look next week. at first glance, some formatting issues and use of route_no which can break things already in place. -- 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/2324#issuecomment-627332578___ 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] registrar: add new xavp_rcd_mask parameter (#2168)
@miconda i'm not proposing `"default random list of stored attributes"`, i `was` proposing a known value that is compatible with 5.3 `if` it was implemented by `adding`instead of `skipping`. but as i said before, i'm not blocking this in any way, just concerned about memory footprint from one version to another as a principle, tho in this is case, it adds almost none -- 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/2168#issuecomment-563358740___ 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] registrar: add new xavp_rcd_mask parameter (#2168)
@henningw `You can easily disable this feature it in your installation if you are concerned about it` this is exactly what you should not ask the user to do, no ? i'm not blocking this in any way, just concerned. -- 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/2168#issuecomment-56771___ 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] registrar: add new xavp_rcd_mask parameter (#2168)
@henningw just saw `Defines what values to skip when xavp_rcd is stored.` which i think its the wrong approach. imo, it should define what values to retrieve and default that to the existing ones in 5.3 branch. with this implementation, if new values are added they are retrieved by default which may increase the memory footprint and take more time to process it (shouldn't be relevant). -- 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/2168#issuecomment-563255674___ 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] registrar: add new xavp_rcd_mask parameter (#2168)
@linuxmaniac i think the default should be set to the value that makes it work like in 5.3 -- 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/2168#issuecomment-563218964___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:6d036dcc: kazoo: add new functions & params
Module: kamailio Branch: master Commit: 6d036dcca36ace03c84a2ee663b44b17d44cd151 URL: https://github.com/kamailio/kamailio/commit/6d036dcca36ace03c84a2ee663b44b17d44cd151 Author: lazedo Committer: lazedo Date: 2019-11-07T22:27:56Z kazoo: add new functions & params --- Modified: src/modules/kazoo/kazoo.c Modified: src/modules/kazoo/kz_amqp.c Modified: src/modules/kazoo/kz_amqp.h Modified: src/modules/kazoo/kz_fixup.c --- Diff: https://github.com/kamailio/kamailio/commit/6d036dcca36ace03c84a2ee663b44b17d44cd151.diff Patch: https://github.com/kamailio/kamailio/commit/6d036dcca36ace03c84a2ee663b44b17d44cd151.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] crash in slow timer (#2120)
sorry, meant to write `tl` -- 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/2120#issuecomment-549825790___ 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] crash in slow timer (#2120)
no warnings , just crash. what are the odds of `tl` being `null` ? we had some crashes where `fl` was `null`. maybe something is grabbing or invalidating the timer between `UNLOCK_SLOW_TIMER_LIST` and next instruction ? is that even possible ? -- 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/2120#issuecomment-549811795___ 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] crash in slow timer (#2120)
@miconda yes, latest 5.1 / 5.2 under heavy load. thanks -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2120#issuecomment-549807403___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:9d32561b: presence_xml: adds option to aggregate xml body with priorities
Module: kamailio Branch: master Commit: 9d32561b15a12bd1ed2465a4ae1b4312662eb6fc URL: https://github.com/kamailio/kamailio/commit/9d32561b15a12bd1ed2465a4ae1b4312662eb6fc Author: lazedo Committer: lazedo Date: 2019-11-05T11:18:03Z presence_xml: adds option to aggregate xml body with priorities --- Modified: src/modules/presence_xml/doc/presence_xml_admin.xml Modified: src/modules/presence_xml/notify_body.c Modified: src/modules/presence_xml/presence_xml.c --- Diff: https://github.com/kamailio/kamailio/commit/9d32561b15a12bd1ed2465a4ae1b4312662eb6fc.diff Patch: https://github.com/kamailio/kamailio/commit/9d32561b15a12bd1ed2465a4ae1b4312662eb6fc.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] presence_xml: adds option to aggregate xml body with priorities (#2118)
Merged #2118 into master. -- 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/2118#event-2771023332___ 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] dispatcher: add state to mode in ds_list_exists (#2117)
Merged #2117 into master. -- 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/2117#event-2760469945___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:2945ba44: dispatcher: add state to mode in ds_list_exists
Module: kamailio Branch: master Commit: 2945ba448c6365728b49c10ba98824be357f85b3 URL: https://github.com/kamailio/kamailio/commit/2945ba448c6365728b49c10ba98824be357f85b3 Author: lazedo Committer: lazedo Date: 2019-10-31T16:12:31Z dispatcher: add state to mode in ds_list_exists adds Bit 3 to allow the check of active/inactive entries in ds_list --- Modified: src/modules/dispatcher/dispatch.c Modified: src/modules/dispatcher/dispatch.h Modified: src/modules/dispatcher/doc/dispatcher_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/2945ba448c6365728b49c10ba98824be357f85b3.diff Patch: https://github.com/kamailio/kamailio/commit/2945ba448c6365728b49c10ba98824be357f85b3.patch --- diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index 18b713ce02..75b3b56f3a 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -2998,7 +2998,9 @@ int ds_is_addr_from_set(sip_msg_t *_m, struct ip_addr *pipaddr, && ((mode & DS_MATCH_NOPORT) || node->dlist[j].port == 0 || tport == node->dlist[j].port) && ((mode & DS_MATCH_NOPROTO) - || tproto == node->dlist[j].proto)) { + || tproto == node->dlist[j].proto) + && (((mode & DS_MATCH_ACTIVE) && !ds_skip_dst(node->dlist[j].flags)) + || !(mode & DS_MATCH_ACTIVE))) { if(export_set_pv && ds_setid_pvname.s != 0) { memset(, 0, sizeof(pv_value_t)); val.flags = PV_VAL_INT | PV_TYPE_INT; diff --git a/src/modules/dispatcher/dispatch.h b/src/modules/dispatcher/dispatch.h index 3a6a5aedc6..e4a54944aa 100644 --- a/src/modules/dispatcher/dispatch.h +++ b/src/modules/dispatcher/dispatch.h @@ -57,6 +57,7 @@ #define DS_MATCH_ALL 0 #define DS_MATCH_NOPORT1 #define DS_MATCH_NOPROTO 2 +#define DS_MATCH_ACTIVE4 #define DS_SETOP_DSTURI0 #define DS_SETOP_RURI 1 diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml index 11881bbed5..94e7062705 100644 --- a/src/modules/dispatcher/doc/dispatcher_admin.xml +++ b/src/modules/dispatcher/doc/dispatcher_admin.xml @@ -1569,8 +1569,10 @@ if(ds_list_exists("10")) { mode - (optional) - a bitmask to specify how the matching should be done. If is 0, all ip, port and - proto are matched. If bit one is set, then port is ignored. - If bit two is set, then protocol is ignored. The parameter + proto are matched and active status is ignored. + If bit one is set, then port is ignored. + If bit two is set, then protocol is ignored. + If bit three is set, then state must be active. The parameter can be an integer or a variable holding an integer value. It must be provided if the uri parameter is provided. ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] crash in slow timer (#2120)
### Description on busy servers, there's a sporadic crash in slow timer. we don't have any debugging data anymore nor a way to reliably reproduce it. just posting here in case someone sees the same and can find a way to reliably reproduce it and maybe test the patch below. ### Troubleshooting Reproduction ### Possible Solutions with the patch below we don't see any crashes either `tl` or `tl->f` is null when it crashes. this is probably some race condition ``` diff --git a/src/core/timer.c b/src/core/timer.c index 0e0dc8812..3c59db3da 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -1128,7 +1128,7 @@ void slow_timer_main() #endif SET_RUNNING_SLOW(tl); UNLOCK_SLOW_TIMER_LIST(); - ret=tl->f(*ticks, tl, tl->data); + ret= (tl->f ? tl->f(*ticks, tl, tl->data) : 0); /* reset the configuration group handles */ cfg_reset_all(); if (ret==0){ ``` ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` 5.1 / 5.2 ``` * **Operating System**: ``` CentOS7 ``` -- 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/2120___ 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] Add optional parameter to ds_is_from_list() to check only active GW (#1908)
#2117 should allow closure of this 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/1908#issuecomment-548429125___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] hostname in kubernetes (#2119)
### Description gethostname not accurate in kubernetes ### Troubleshooting Reproduction on a recent test with kamailio in kubernetes, found that gethostname can return only the hostname and not the fqdn. this depends on the kind of object is used (deployment/statefulset) ### Possible Solutions the below patch fixed the issues i was having ``` diff --git a/src/modules/ipops/ipops_pv.c b/src/modules/ipops/ipops_pv.c index 5f77aa9..f65b4dd 100644 --- a/src/modules/ipops/ipops_pv.c +++ b/src/modules/ipops/ipops_pv.c @@ -455,6 +455,11 @@ if (gethostname(hbuf, 512)<0) { LM_WARN("gethostname failed - host pvs will be null\n"); return -1; + } else { + struct hostent* h; + if((h = gethostbyname(hbuf)) != NULL) { + memcpy(hbuf, h->h_name, 512); + } } hlen = strlen(hbuf); ``` ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` latest master ``` * **Operating System**: ``` buster & centos7 ``` -- 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/2119___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] presence_xml: adds option to aggregate xml body with priorities (#2118)
!-- Kamailio Pull Request Template -- !-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with git cherry-pick -x ... - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -- Pre-Submission Checklist !-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -- !-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-- !-- If youre unsure about any of these, dont hesitate to ask on sr-dev mailing list -- - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description !-- Describe your changes in detail -- this allow notify body aggregation with priorities You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/2118 -- Commit Summary -- * presence_xml: adds option to aggregate xml body with priorities -- File Changes -- M src/modules/presence_xml/notify_body.c (112) M src/modules/presence_xml/presence_xml.c (7) -- Patch Links -- https://github.com/kamailio/kamailio/pull/2118.patch https://github.com/kamailio/kamailio/pull/2118.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/2118 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] dispatcher: add state to mode in ds_list_exists (#2117)
!-- Kamailio Pull Request Template -- !-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with git cherry-pick -x ... - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -- Pre-Submission Checklist !-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -- !-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-- !-- If youre unsure about any of these, dont hesitate to ask on sr-dev mailing list -- - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: !-- Go over all points below, and after creating the PR, tick the checkboxes that apply -- - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description !-- Describe your changes in detail -- adds Bit 3 to mode parameter in ds_list_exists to allow the check of active/inactive entries in a list You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/2117 -- Commit Summary -- * dispatcher: add state to mode in ds_list_exists -- File Changes -- M src/modules/dispatcher/dispatch.c (4) M src/modules/dispatcher/dispatch.h (1) M src/modules/dispatcher/doc/dispatcher_admin.xml (6) -- Patch Links -- https://github.com/kamailio/kamailio/pull/2117.patch https://github.com/kamailio/kamailio/pull/2117.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/2117 ___ 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] dispatcher: ds_list_exist support pv as param (only logging level adjustment was kept) (#2099)
the `INFO` level for this message is actually misleading ops that get into panic saying `something's not working` when is perfectly normal not to have entries in some group. just merge it :) -- 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/2099#issuecomment-543399345___ 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] dispatcher: ds_list_exist support pv as param (#2099)
@jchavanton this is ok but you could already do ``` if (ds_list_exist("$var(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/pull/2099#issuecomment-540987013___ 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] $Au incorrectly contains domain or realm (#2056)
@henningw please hold on the `backport` as this is a changing on existing behaviour. users are currently getting the `realm` part and this change may break their 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/2056#issuecomment-528513771___ 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] Siptrace (#1912)
@ionutionita92 hello, currently we can enable/disable the trace flag, this can be done in script processing in generic and/or specific routes. By removing this you are removing flexibility in script processing as there is no `sip_untrace` function. -- 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/1912#issuecomment-477577263___ 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] Add optional parameter to ds_is_from_list() to check only active GW (#1908)
this should use the existing `mode` parameter `mode - (optional) - a bitmask to specify how the matching should be done.` -- 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/1908#issuecomment-476983353___ 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] crash in slow timer (#1897)
@miconda we are trying the commit and haven't seen more crashes but these were very random. -- 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/1897#issuecomment-475643015___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] crash in slow timer (#1897)
### Description slow_timer proc exited with crash, kamailio kept running but tm transaction kept accumulating which will lead to shared memory exhaustion and crash. in line 1131 `ret=tl->f(*ticks, tl, tl->data);` f is null, reason of crash ### Troubleshooting Reproduction happens from time to time, not a way to reliably reproduce it. Debugging Data ``` #0 0x in ?? () #1 0x0049f648 in slow_timer_main () at core/timer.c:1131 #2 0x00424b84 in main_loop () at main.c:1685 #3 0x0042b9d3 in main (argc=16, argv=0x7ffe568bcd08) at main.c:2663 (gdb) frame 1 #1 0x0049f648 in slow_timer_main () at core/timer.c:1131 1131ret=tl->f(*ticks, tl, tl->data); (gdb) list 1126#ifdef TIMER_DEBUG 1127tl->expires_no++; 1128#endif 1129SET_RUNNING_SLOW(tl); 1130UNLOCK_SLOW_TIMER_LIST(); 1131ret=tl->f(*ticks, tl, tl->data); 1132/* reset the configuration group handles */ 1133cfg_reset_all(); 1134if (ret==0){ 1135/* one shot */ (gdb) p *tl $1 = {next = 0x0, prev = 0x0, expire = 938928580, initial_timeout = 80, data = 0x0, f = 0x0, flags = 768, slow_idx = 45488} (gdb) info locals n = 12 ret = 4294967295 tl = 0x7fb2d3c860d0 i = 432 __func__ = "slow_timer_main" ``` Log Messages ``` (paste your log messages here) ``` SIP Traffic ``` (paste your sip traffic here) ``` ### Possible Solutions ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` 5.1.7 ``` * **Operating System**: ``` centos 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/1897___ 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] fixes & improvements (#1882)
i see it as a bug since `tosocket` is using `msg` to determine the transport instead of parsed uri from input, try to run it in a timer route and you'll see but i guess that it will also give wrong result if you receive a `udp` message and then try to apply the transform to "sip:xxx@yyy;transport=tcp". as for the backport, i think this is in 5.2 but not 5.1. -- 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/1882#issuecomment-470771629___ 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] fixes & improvements (#1882)
@lazedo pushed 1 commit. 5fad824a716e9a5ecece30e5ba5830d566e83743 tmx: use t_release_transaction for t_drop -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/kamailio/kamailio/pull/1882/files/b4696169e8b464da01774b1e40af677f941c803b..5fad824a716e9a5ecece30e5ba5830d566e83743 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] fixes & improvements (#1882)
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 - [ ] Related to issue # (replace with an open issue number) Description - added a worker_id for timer routines. when using rtimer in script with mode=4 there's no way to know which of the workers is in use. this is useful for db queries based on slot - fixed {uri.tosocket} transformation - added t_release_transaction to tm api - fixed xavp_clone_level_nodata - add sockinfo to $subs - increase `MAX_DEFINES` as we run out of `defines` Note: please use rebase instead of merge for this PR to backport: - https://github.com/kamailio/kamailio/commit/eea9c5f72b73df9c3d898cff18dced6b7f72c7d4 - https://github.com/kamailio/kamailio/commit/e3ed896d80171feba78d3292484a09f0016e68e0 - https://github.com/kamailio/kamailio/commit/b4696169e8b464da01774b1e40af677f941c803b You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1882 -- Commit Summary -- * core: allow a worker id in timer routines * rtimer: use timer worker id * pv: use parsed uri to compute tosocket * tm: add t_release_transaction to api * core: free resources in xavp_clone_level_nodata * presence: add sockinfo to $subs * core: increase max_defines from 256 to 512 -- File Changes -- M src/core/cfg.lex (4) M src/core/timer.h (2) M src/core/timer_proc.c (43) M src/core/timer_proc.h (4) M src/core/xavp.c (11) M src/modules/presence/subscribe.c (6) M src/modules/pv/pv_trans.c (37) M src/modules/rtimer/rtimer_mod.c (34) M src/modules/tm/t_funcs.h (1) M src/modules/tm/tm_load.c (1) M src/modules/tm/tm_load.h (1) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1882.patch https://github.com/kamailio/kamailio/pull/1882.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/1882 ___ 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] registrar: memory leak in xavp_rcd (#1834)
@miconda i don't think its related. the issue on [adc4493](https://github.com/kamailio/kamailio/commit/adc4493fa6861895bdcf8b459e5fbc76e80d0f1f) was to prevent crashing after leak that led to shm exhaustion. in our case it was a instant shm exhaustion not a slow leak. the slow leak could be related to the growth in xavp_rcd_helper or lookup_helper. i still need to proof this but my theory is that different processes accessed the contact xvap or the ulrcd in shm during xavp_clone and created a circular reference. something like a register and a notify (that calls lookup) at the same time. the server worked stable for 2 weeks, no shm growth, suddenly shm was exhausted, and this unprotected xavp_clone made sip workers died and server became unresponsive. btw, is there a way to create/generate/force a core file with the contents of the shm mem ? the core files we got (from sip workers) could not access the shm mem to see if the shm xavp's contents could proof my theory -- 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/1834#issuecomment-463189815___ 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] registrar : check xavp clone result (#1844)
@henningw can you backport to 5.2 and 5.1 ? -- 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/1844#issuecomment-462551225___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Kamailio-Master tcp request relaying problem (EAGAIN) (#1836)
@henningw not me, i only commented on the way to fix it.credits should go to @sergey-safarov -- 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/1836#issuecomment-462475029___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Kamailio-Master tcp request relaying problem (EAGAIN) (#1836)
looks like the change should be ``` - if (unlikely(wb==0)) + if (unlikely(wb==0)) { SHM_MEM_ERROR; goto error; +} ``` -- 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/1836#issuecomment-462312285___ 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] kazoo: consuming of events fails if message has no body (#1837)
Closed #1837. -- 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/1837#event-2119957787___ 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] kazoo: consuming of events fails if message has no body (#1837)
Reopened #1837. -- 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/1837#event-2119959098___ 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] kazoo: consuming of events fails if message has no body (#1837)
@mihovilkolaric this is by design. your possible fix only allows the publishing of the routing key which in this case is useless. however, this will be taken in consideration when we update the module. 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/1837#issuecomment-460847574___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:83a43714: core: allow pp_define_get to be used by modules
Module: kamailio Branch: master Commit: 83a437144bad5d31f5ce1bfc10b03f613524852f URL: https://github.com/kamailio/kamailio/commit/83a437144bad5d31f5ce1bfc10b03f613524852f Author: lazedo Committer: lazedo Date: 2019-01-18T13:18:01Z core: allow pp_define_get to be used by modules --- Modified: src/core/cfg.lex --- Diff: https://github.com/kamailio/kamailio/commit/83a437144bad5d31f5ce1bfc10b03f613524852f.diff Patch: https://github.com/kamailio/kamailio/commit/83a437144bad5d31f5ce1bfc10b03f613524852f.patch --- diff --git a/src/core/cfg.lex b/src/core/cfg.lex index 6e4d6971e5..9912d111bc 100644 --- a/src/core/cfg.lex +++ b/src/core/cfg.lex @@ -113,7 +113,7 @@ struct sr_yy_fname *next; } *sr_yy_fname_list = 0; - static str *pp_define_get(int len, const char * text); + str *pp_define_get(int len, const char * text); static int pp_ifdef_type(int pos); static void pp_ifdef_var(int len, const char * text); static void pp_ifdef(); @@ -1856,7 +1856,7 @@ int pp_define_set(int len, char *text) return 0; } -static str *pp_define_get(int len, const char * text) +str *pp_define_get(int len, const char * text) { str var = {(char *)text, len}; int i; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:2a436316: core: allow pvar resolve in subsdef
Module: kamailio Branch: master Commit: 2a43631692285346050ae906f772a1c111906c5b URL: https://github.com/kamailio/kamailio/commit/2a43631692285346050ae906f772a1c111906c5b Author: lazedo Committer: lazedo Date: 2019-01-18T13:17:02Z core: allow pvar resolve in subsdef --- Modified: src/core/ppcfg.c --- Diff: https://github.com/kamailio/kamailio/commit/2a43631692285346050ae906f772a1c111906c5b.diff Patch: https://github.com/kamailio/kamailio/commit/2a43631692285346050ae906f772a1c111906c5b.patch --- diff --git a/src/core/ppcfg.c b/src/core/ppcfg.c index 1ff3103f52..a06795f760 100644 --- a/src/core/ppcfg.c +++ b/src/core/ppcfg.c @@ -32,6 +32,7 @@ #include "dprint.h" #include "ppcfg.h" +#include "fmsg.h" typedef struct _pp_subst_rule { char *indata; @@ -184,7 +185,8 @@ int pp_subst_run(char **data) i = 0; while(pr) { - result=subst_str(*data, 0, + sip_msg_t *fmsg = faked_msg_get_next(); + result=subst_str(*data, fmsg, (struct subst_expr*)pr->ppdata, 0); /* pkg malloc'ed result */ if(result!=NULL) { ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:43aeb98f: pv: add $def pseudo variable
Module: kamailio Branch: master Commit: 43aeb98fbe3902cb8a1c5d653ce0ff8f4551d99a URL: https://github.com/kamailio/kamailio/commit/43aeb98fbe3902cb8a1c5d653ce0ff8f4551d99a Author: lazedo Committer: lazedo Date: 2019-01-18T13:25:24Z pv: add $def pseudo variable --- Modified: src/modules/pv/pv.c Modified: src/modules/pv/pv_core.c Modified: src/modules/pv/pv_core.h --- Diff: https://github.com/kamailio/kamailio/commit/43aeb98fbe3902cb8a1c5d653ce0ff8f4551d99a.diff Patch: https://github.com/kamailio/kamailio/commit/43aeb98fbe3902cb8a1c5d653ce0ff8f4551d99a.patch --- diff --git a/src/modules/pv/pv.c b/src/modules/pv/pv.c index 06f831bd97..0df9353606 100644 --- a/src/modules/pv/pv.c +++ b/src/modules/pv/pv.c @@ -189,6 +189,8 @@ static pv_export_t mod_pvs[] = { {{"dd", (sizeof("dd")-1)}, /* */ PVT_OTHER, pv_get_dsturi_attr, 0, 0, 0, pv_init_iname, 1}, + {{"def", (sizeof("env")-1)}, PVT_OTHER, pv_get_def, 0, + pv_parse_def_name, 0, 0, 0}, {{"di", (sizeof("di")-1)}, /* */ PVT_OTHER, pv_get_diversion, 0, 0, 0, pv_init_iname, 1}, diff --git a/src/modules/pv/pv_core.c b/src/modules/pv/pv_core.c index 01cebc8534..2e54253eb4 100644 --- a/src/modules/pv/pv_core.c +++ b/src/modules/pv/pv_core.c @@ -3658,3 +3658,28 @@ int pv_get_env(sip_msg_t *msg, pv_param_t *param, pv_value_t *res) return pv_get_null(msg, param, res); } +int pv_parse_def_name(pv_spec_p sp, str *in) +{ + if (in == NULL || in->s == NULL || sp == NULL) { + LM_ERR("INVALID DEF NAME\n"); + return -1; + } + sp->pvp.pvn.type = PV_NAME_INTSTR; + sp->pvp.pvn.u.isname.type = AVP_NAME_STR; + sp->pvp.pvn.u.isname.name.s = *in; + return 0; + +} + +extern str *pp_define_get(int len, const char * text); + +int pv_get_def(sip_msg_t *msg, pv_param_t *param, pv_value_t *res) +{ + str *val = pp_define_get(param->pvn.u.isname.name.s.len, param->pvn.u.isname.name.s.s); + + if (val) { + return pv_get_strval(msg, param, res, val); + } + return pv_get_null(msg, param, res); +} + diff --git a/src/modules/pv/pv_core.h b/src/modules/pv/pv_core.h index 411f2f8aac..86629e66e0 100644 --- a/src/modules/pv/pv_core.h +++ b/src/modules/pv/pv_core.h @@ -379,5 +379,8 @@ int pv_parse_ksr_attrs_name(pv_spec_p sp, str *in); int pv_get_ksr_attrs(sip_msg_t *msg, pv_param_t *param, pv_value_t *res); +int pv_parse_def_name(pv_spec_p sp, str *in); +int pv_get_def(sip_msg_t *msg, pv_param_t *param, pv_value_t *res); + #endif ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] Lazedo/pv def (#1814)
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: - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description allows the use definitions as pseudo-variables ``` #!trydef XIP "$HN(i)" #!substdef "!MY_IP_ADDRESS!$def(XIP)!g" #!substdef "!MY_HOSTNAME!$HN(f)!g" #!trydef REGISTRAR_MIN_EXPIRES 300 loadmodule "registrar.so" modparam("registrar", "min_expires", REGISTRAR_MIN_EXPIRES) route[SOMETHING] { xlog("L_INFO", "configured value of registrar min-expires is $def(REGISTRAR_MIN_EXPIRES)\n"); xlog("L_INFO", "configured value of host is MY_HOSTNAME\n"); xlog("L_INFO", "configured value of ip is MY_IP_ADDRESS\n"); } ``` You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1814 -- Commit Summary -- * core: allow pvar resolve in subsdef * core: allow pp_define_get to be used by modules * pv: add $def pseudo variable -- File Changes -- M src/core/cfg.lex (4) M src/core/ppcfg.c (4) M src/modules/pv/pv.c (2) M src/modules/pv/pv_core.c (25) M src/modules/pv/pv_core.h (3) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1814.patch https://github.com/kamailio/kamailio/pull/1814.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/1814 ___ 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] siptrace module not send ACK (#1811)
@sergey-safarov then you're good. for the `sip trace`, as @miconda commented , did you tried to change the trace_mode ? @miconda if only we could filter out the `OPTIONS` ..., its a blocker for us not having that. -- 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/1811#issuecomment-455203817___ 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] siptrace module not send ACK (#1811)
@sergey-safarov i think the issue is in `freeswitch` you can try these PRs for freeswitch in order [merged] https://freeswitch.org/stash/projects/FS/repos/freeswitch/pull-requests/1660/overview https://freeswitch.org/stash/projects/FS/repos/freeswitch/pull-requests/1523/overview https://freeswitch.org/stash/projects/FS/repos/freeswitch/pull-requests/1524/overview https://freeswitch.org/stash/projects/FS/repos/freeswitch/pull-requests/1516/overview let us know which (if any) of these fix your issue with freeswitch. -- 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/1811#issuecomment-454969114___ 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: Add PROXY protocol implementation (#1765)
@miconda the `proxy` protocol was first defined by haproxy but there may be other programs that implement the protocol (not `haproxy` exclusive). i suggest `accept_proxy_protocol` -- 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/1765#issuecomment-447261855___ 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] tmx: add t_drop (#1726)
@miconda thanks -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/1726#issuecomment-443906127___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tm: bad error in log (#1727)
yes, already agreed on closing this. thanks -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/1727#issuecomment-439940773___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tm: bad error in log (#1727)
@miconda i'm ok with you closing this one and discussion going into mailing list. fyi, none of the proposed uses (rtimer, evrexec) will keep you from having a `ghost` process that does nothing after 1st execution, which seems not ideal since it still using resources (memory). rtimer will keep running the event routes evrexec will never exit the process -- 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/1727#issuecomment-439921373___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] tm: bad error in log (#1727)
@miconda i looked at rtimer and evrexec in the first place. the problem is that we need a one time deferred execution -- 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/1727#issuecomment-439906834___ 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] tmx: add t_drop (#1726)
@miconda i updated the documentation and added parameter to set uas.status code -- 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/1726#issuecomment-439905061___ 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] dispatcher : xavp_get fix in ds_update_dst (#1725)
@miconda it works -- 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/1725#issuecomment-439497396___ 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] tmx: add t_drop (#1726)
there seems to be an unrelated? error in the build ` Compiler: clang C, DIST=sid` -- 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/1726#issuecomment-439457134___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] tm: bad error in log (#1727)
### Description tm module writes a misleading log error that `triggers` ops alerts. ### Troubleshooting Reproduction using this partial script ``` event_route[core:worker-one-init] { async_route("DEFERRED_CLEANUP", "20"); } route[DEFERRED_CLEANUP] { xlog("L_INFO", "processing deferred cleanup\n"); } ``` Log Messages ``` 2018-11-15T19:22:44.547049+00:00 apps001 kamailio[2105]: INFO:
[sr-dev] [kamailio/kamailio] tmx: add t_drop (#1726)
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) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description we have a use case where we need to drop the request within a transaction, and that is not possible because tm module will always send the final reply. ``` route[MYREQ] { ## protect from retrans if (!t_newtran()) { xlog("L_ERROR", "$ci|log|failed to create transaction\n"); drop; } if(some early business use case that requires drop) { xlog("L_INFO", "$ci|log|dropping request\n"); t_drop(); } async_func_that_suspends_and_continues("$anyparam", "TR_OK", "TR_ERROR"); } failure_route[TR_ERROR] { xlog("L_INFO", "$ci|log|failed $T_reply_code $T_reply_reason\n"); t_drop(); } onreply_route[TR_OK] { xlog("L_INFO", "$ci|log|checking transaction result\n"); if(some business use case that requires dropping the request) { t_drop(); } ... } ``` if we use `drop` instead of `t_drop` , we always get a final reply sent to the requestor not sure if this is the right approach to the problem but at least fixes for us and can start the discussion. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1726 -- Commit Summary -- * tmx: add t_drop -- File Changes -- M src/modules/tmx/tmx_mod.c (22) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1726.patch https://github.com/kamailio/kamailio/pull/1726.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/1726 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] dispatcher : xavp_get fix in ds_update_dst (#1725)
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 - [ ] Related to issue # (replace with an open issue number) Description You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1725 -- Commit Summary -- * dispatcher : xavp_get fix in ds_update_dst -- File Changes -- M src/modules/dispatcher/dispatch.c (7) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1725.patch https://github.com/kamailio/kamailio/pull/1725.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/1725 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:45479865: siputils: add is_uri function
Module: kamailio Branch: master Commit: 454798654c2b2acd252df411d64e55bee0a70f52 URL: https://github.com/kamailio/kamailio/commit/454798654c2b2acd252df411d64e55bee0a70f52 Author: lazedo Committer: lazedo Date: 2018-10-04T12:40:11Z siputils: add is_uri function --- Modified: src/modules/siputils/checks.c Modified: src/modules/siputils/checks.h Modified: src/modules/siputils/doc/siputils_admin.xml Modified: src/modules/siputils/siputils.c --- Diff: https://github.com/kamailio/kamailio/commit/454798654c2b2acd252df411d64e55bee0a70f52.diff Patch: https://github.com/kamailio/kamailio/commit/454798654c2b2acd252df411d64e55bee0a70f52.patch --- diff --git a/src/modules/siputils/checks.c b/src/modules/siputils/checks.c index 0a33bddbd6..b700c620c0 100644 --- a/src/modules/siputils/checks.c +++ b/src/modules/siputils/checks.c @@ -129,6 +129,37 @@ int w_has_totag(struct sip_msg* _m, char* _foo, char* _bar) return has_totag(_m); } +/* + * Check if pseudo variable contains a valid uri + */ +int is_uri(struct sip_msg* _m, char* _sp, char* _s2) +{ + pv_spec_t *sp; + pv_value_t pv_val; + sip_uri_t turi; + + sp = (pv_spec_t *)_sp; + + if (sp && (pv_get_spec_value(_m, sp, _val) == 0)) { + if (pv_val.flags & PV_VAL_STR) { + if (pv_val.rs.len == 0 || pv_val.rs.s == NULL) { + LM_DBG("missing argument\n"); + return -1; + } + if(parse_uri(pv_val.rs.s, pv_val.rs.len, )!=0) { + return -1; + } + return 1; + } else { + LM_ERR("pseudo variable value is not string\n"); + return -1; + } + } else { + LM_ERR("failed to get pseudo variable value\n"); + return -1; + } +} + /* * Check if the username matches the username in credentials */ diff --git a/src/modules/siputils/checks.h b/src/modules/siputils/checks.h index 39a575d94c..a9186386a2 100644 --- a/src/modules/siputils/checks.h +++ b/src/modules/siputils/checks.h @@ -75,6 +75,10 @@ int add_uri_param(struct sip_msg* _msg, char* _param, char* _s2); */ int tel2sip(struct sip_msg* _msg, char* _uri, char* _hostpart, char* _res); +/* + * Check if pseudo variable contains a valid uri + */ +int is_uri(struct sip_msg* _m, char* _sp, char* _s2); /* * Check if user part of URI in pseudo variable is an e164 number diff --git a/src/modules/siputils/doc/siputils_admin.xml b/src/modules/siputils/doc/siputils_admin.xml index a882c3b069..58dd81adcf 100644 --- a/src/modules/siputils/doc/siputils_admin.xml +++ b/src/modules/siputils/doc/siputils_admin.xml @@ -608,6 +608,33 @@ if (is_uri_user_e164("$avp(i:705)") { + + +is_uri(pseudo-variable) + + +Checks if string value of pseudo variable argument is a +valid uri. + + +This function can be used from ANY_ROUTE. + + +is_uri usage + +... +if (is_uri("$var(x)")) { # Check if variable contains a uri + ... +} +if (is_uri("$avp(i:705)") { + # Check value stored in avp i:705 + ... +}; +... + + + + is_tel_number(tval) diff --git a/src/modules/siputils/siputils.c b/src/modules/siputils/siputils.c index af8cb29d4b..50cd7425aa 100644 --- a/src/modules/siputils/siputils.c +++ b/src/modules/siputils/siputils.c @@ -137,6 +137,8 @@ static cmd_export_t cmds[]={ free_fixup_get_uri_param, REQUEST_ROUTE|LOCAL_ROUTE}, {"tel2sip", (cmd_function)tel2sip, 3, fixup_tel2sip, 0, REQUEST_ROUTE|FAILURE_ROUTE|BRANCH_ROUTE|ONREPLY_ROUTE}, + {"is_uri",(cmd_function)is_uri, 1, fixup_pvar_null, + fixup_free_pvar_null, ANY_ROUTE}, {"is_e164",(cmd_function)is_e164, 1, fixup_pvar_null, fixup_free_pvar_null, REQUEST_ROUTE|FAILURE_ROUTE|LOCAL_ROUTE}, {"is_uri_user_e164", (cmd_function)w_is_uri_user_e164, 1, fixup_pvar_null, ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] siputils: add is_uri function (#1666)
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) - [ ] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description maybe this already exists but i didn't find. not required to backport but could be useful in 5.1 You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1666 -- Commit Summary -- * siputils: add is_uri function -- File Changes -- M src/modules/siputils/checks.c (31) M src/modules/siputils/checks.h (4) M src/modules/siputils/doc/siputils_admin.xml (27) M src/modules/siputils/siputils.c (2) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1666.patch https://github.com/kamailio/kamailio/pull/1666.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/1666 ___ 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] nathelper: initialize local variable (#1661)
@miconda thanks. is commit [0d14ce8](https://github.com/kamailio/kamailio/commit/0d14ce8bf45ada579f7ec85793d358a5fa32e4b7#diff-6b4f66e9085d3547acd73e9e61be492f) being backported ? or should i resolve the conflicts for 5.1 ? i can backport it as part of this if you want -- 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/1661#issuecomment-425949168___ 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] nathelper: initialize local variable (#1661)
Merged #1661 into master. -- 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/1661#event-1876997669___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:c814f9fb: nathelper: initialize local variable
Module: kamailio Branch: master Commit: c814f9fb6aa20ae18253f0d165795516a8869085 URL: https://github.com/kamailio/kamailio/commit/c814f9fb6aa20ae18253f0d165795516a8869085 Author: Luis Azedo Committer: lazedo Date: 2018-10-01T17:13:05+02:00 nathelper: initialize local variable --- Modified: src/modules/nathelper/nathelper.c --- Diff: https://github.com/kamailio/kamailio/commit/c814f9fb6aa20ae18253f0d165795516a8869085.diff Patch: https://github.com/kamailio/kamailio/commit/c814f9fb6aa20ae18253f0d165795516a8869085.patch --- diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c index bb9c99767f..27015b7bd8 100644 --- a/src/modules/nathelper/nathelper.c +++ b/src/modules/nathelper/nathelper.c @@ -1644,7 +1644,7 @@ static int ki_fix_nated_sdp(sip_msg_t *msg, int level) static int fix_nated_sdp_f(struct sip_msg *msg, char *str1, char *str2) { int level; - str ip; + str ip = {0,0}; if(fixup_get_ivalue(msg, (gparam_t *)str1, ) != 0) { LM_ERR("failed to get value for first parameter\n"); ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:3892c78a: Revert "nathelper: fix call to alter_mediaip"
Module: kamailio Branch: master Commit: 3892c78ac59a7d894a5dc8804c20df07b52cc795 URL: https://github.com/kamailio/kamailio/commit/3892c78ac59a7d894a5dc8804c20df07b52cc795 Author: Luis Azedo Committer: lazedo Date: 2018-10-01T17:13:05+02:00 Revert "nathelper: fix call to alter_mediaip" This reverts commit 17c14a966ff3ba67ce858dfe424d7cdf5100d4fa. --- Modified: src/modules/nathelper/nathelper.c --- Diff: https://github.com/kamailio/kamailio/commit/3892c78ac59a7d894a5dc8804c20df07b52cc795.diff Patch: https://github.com/kamailio/kamailio/commit/3892c78ac59a7d894a5dc8804c20df07b52cc795.patch --- diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c index 09b385f389..bb9c99767f 100644 --- a/src/modules/nathelper/nathelper.c +++ b/src/modules/nathelper/nathelper.c @@ -1529,7 +1529,7 @@ static inline int replace_sdp_ip( body2.s = oldip.s + oldip.len; body2.len = bodylimit - body2.s; ret = alter_mediaip( - msg, , , pf, , pf, sdp_oldmediaip); + msg, , , pf, , pf, sdp_oldmediaip); if(ret == -1) { LM_ERR("can't alter '%s' IP\n", line); return -1; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] nathelper: initialize local variable (#1661)
Pre-Submission Checklist - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [ ] Each component has a single commit (if not, squash them into one commit) - [ ] 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 - [ ] Related to issue # (replace with an open issue number) Description previous PR #1655 was wrong and tests at the time didn't hit the correct path in the code, sorry for that. this pr reverts #1655 and properly initializes a variable You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1661 -- Commit Summary -- * Revert "nathelper: fix call to alter_mediaip" * nathelper: initialize local variable -- File Changes -- M src/modules/nathelper/nathelper.c (4) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1661.patch https://github.com/kamailio/kamailio/pull/1661.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/1661 ___ 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] nathelper: fix call to alter_mediaip (#1655)
Merged #1655 into master. -- 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/1655#event-1873886544___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:17c14a96: nathelper: fix call to alter_mediaip
Module: kamailio Branch: master Commit: 17c14a966ff3ba67ce858dfe424d7cdf5100d4fa URL: https://github.com/kamailio/kamailio/commit/17c14a966ff3ba67ce858dfe424d7cdf5100d4fa Author: lazedo Committer: lazedo Date: 2018-09-28T18:00:22+02:00 nathelper: fix call to alter_mediaip --- Modified: src/modules/nathelper/nathelper.c --- Diff: https://github.com/kamailio/kamailio/commit/17c14a966ff3ba67ce858dfe424d7cdf5100d4fa.diff Patch: https://github.com/kamailio/kamailio/commit/17c14a966ff3ba67ce858dfe424d7cdf5100d4fa.patch --- diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c index bb9c99767f..09b385f389 100644 --- a/src/modules/nathelper/nathelper.c +++ b/src/modules/nathelper/nathelper.c @@ -1529,7 +1529,7 @@ static inline int replace_sdp_ip( body2.s = oldip.s + oldip.len; body2.len = bodylimit - body2.s; ret = alter_mediaip( - msg, , , pf, , pf, sdp_oldmediaip); + msg, , , pf, , pf, sdp_oldmediaip); if(ret == -1) { LM_ERR("can't alter '%s' IP\n", line); return -1; ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] nathelper: fix call to alter_mediaip (#1655)
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 - [ ] Related to issue # (replace with an open issue number) Description nathelper not obtaininng the IP from sdp correctly You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1655 -- Commit Summary -- * nathelper: fix call to alter_mediaip -- File Changes -- M src/modules/nathelper/nathelper.c (2) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1655.patch https://github.com/kamailio/kamailio/pull/1655.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/1655 ___ 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: allow challenge from failure/onreply routes (#1641)
Merged #1641 into master. -- 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/1641#event-1843465671___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:fc968236: auth: allow challenge from failure/onreply routes
Module: kamailio Branch: master Commit: fc968236cf76ea6e67dcd74211b0e39e81b65d21 URL: https://github.com/kamailio/kamailio/commit/fc968236cf76ea6e67dcd74211b0e39e81b65d21 Author: lazedo Committer: lazedo Date: 2018-09-13T13:17:01+01:00 auth: allow challenge from failure/onreply routes --- Modified: src/modules/auth/auth_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/fc968236cf76ea6e67dcd74211b0e39e81b65d21.diff Patch: https://github.com/kamailio/kamailio/commit/fc968236cf76ea6e67dcd74211b0e39e81b65d21.patch --- diff --git a/src/modules/auth/auth_mod.c b/src/modules/auth/auth_mod.c index eb7a7126c4..2dc9c7c1fc 100644 --- a/src/modules/auth/auth_mod.c +++ b/src/modules/auth/auth_mod.c @@ -154,11 +154,11 @@ static cmd_export_t cmds[] = { {"consume_credentials",w_consume_credentials,0, 0, REQUEST_ROUTE}, {"www_challenge", (cmd_function)www_challenge, 2, - fixup_auth_challenge, REQUEST_ROUTE}, + fixup_auth_challenge, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE}, {"proxy_challenge",(cmd_function)proxy_challenge,2, - fixup_auth_challenge, REQUEST_ROUTE}, + fixup_auth_challenge, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE}, {"auth_challenge", (cmd_function)w_auth_challenge, 2, - fixup_auth_challenge, REQUEST_ROUTE}, + fixup_auth_challenge, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE}, {"pv_www_authorize", (cmd_function)pv_www_authenticate,3, fixup_pv_auth, REQUEST_ROUTE}, {"pv_www_authenticate",(cmd_function)pv_www_authenticate,3, ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] auth: allow challenge from failure/onreply routes (#1641)
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 - [ ] Related to issue # (replace with an open issue number) Description when handling registration requests we create a transaction for async process and need to use t_on_failure / t_on_failure. when the async processes returns we want to call auth_challenge without the need to create `fake` routes ``` onreply_route[KZ_AUTHORIZATION_OK] { $var(password) = $(kzR{kz.json,Auth-Password}); $var(nonce) = $adn; if( $(kzR{kz.json,Event-Name}) == "authn_err" ) { ==>> auth_challenge("$fd", "0"); xlog("L_INFO", "$ci|end|issued auth challenge from async registrar for $Au $si:$sp\n"); exit; } else { xlog("L_INFO", "$ci|log|authenticated $Au via registrar async process\n"); route(SAVE_AUTHORIZATION); } } failure_route[KZ_AUTHORIZATION_ERROR] { xlog("L_INFO", "$ci|log|registrar process failed with $T_reply_code for $Au $si:$sp\n"); ==>> auth_challenge("$fd", "0"); exit; } ``` You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1641 -- Commit Summary -- * auth: allow challenge from failure/onreply routes -- File Changes -- M src/modules/auth/auth_mod.c (6) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1641.patch https://github.com/kamailio/kamailio/pull/1641.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/1641 ___ 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] presence: limit the number of subscriptions handled in timer_dbonly (#1609)
Merged #1609. -- 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/1609#event-1766405730___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev