[sr-dev] git:5.0:8cdee50d: kamctl: kamdbctl - proper use of DBPORT for postgres
Module: kamailio Branch: 5.0 Commit: 8cdee50d7c89c1617b68e2eff1ce646eba0c33fb URL: https://github.com/kamailio/kamailio/commit/8cdee50d7c89c1617b68e2eff1ce646eba0c33fb Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2017-06-30T08:39:23+02:00 kamctl: kamdbctl - proper use of DBPORT for postgres (cherry picked from commit 17f907d5fa1267f434f422fb61e4b315e3eafb97) --- Modified: utils/kamctl/kamdbctl.pgsql --- Diff: https://github.com/kamailio/kamailio/commit/8cdee50d7c89c1617b68e2eff1ce646eba0c33fb.diff Patch: https://github.com/kamailio/kamailio/commit/8cdee50d7c89c1617b68e2eff1ce646eba0c33fb.patch --- diff --git a/utils/kamctl/kamdbctl.pgsql b/utils/kamctl/kamdbctl.pgsql index a946f2a204..059b6faa82 100644 --- a/utils/kamctl/kamdbctl.pgsql +++ b/utils/kamctl/kamdbctl.pgsql @@ -55,8 +55,8 @@ if [ -z "$DBPORT" ] ; then CMD="psql -q -h $DBHOST -U $DBROOTUSER " DUMP_CMD="pg_dump -h $DBHOST -U $DBROOTUSER -c" else - CMD="psql -q -h $DBHOST -p $DBHOST -U $DBROOTUSER " - DUMP_CMD="pg_dump -h $DBHOST -p $DBHOST -U $DBROOTUSER -c" + CMD="psql -q -h $DBHOST -p $DBPORT -U $DBROOTUSER " + DUMP_CMD="pg_dump -h $DBHOST -p $DBPORT -U $DBROOTUSER -c" fi # ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:17f907d5: kamctl: kamdbctl - proper use of DBPORT for postgres
Module: kamailio Branch: master Commit: 17f907d5fa1267f434f422fb61e4b315e3eafb97 URL: https://github.com/kamailio/kamailio/commit/17f907d5fa1267f434f422fb61e4b315e3eafb97 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2017-06-30T08:38:11+02:00 kamctl: kamdbctl - proper use of DBPORT for postgres --- Modified: utils/kamctl/kamdbctl.pgsql --- Diff: https://github.com/kamailio/kamailio/commit/17f907d5fa1267f434f422fb61e4b315e3eafb97.diff Patch: https://github.com/kamailio/kamailio/commit/17f907d5fa1267f434f422fb61e4b315e3eafb97.patch --- diff --git a/utils/kamctl/kamdbctl.pgsql b/utils/kamctl/kamdbctl.pgsql index a946f2a204..059b6faa82 100644 --- a/utils/kamctl/kamdbctl.pgsql +++ b/utils/kamctl/kamdbctl.pgsql @@ -55,8 +55,8 @@ if [ -z "$DBPORT" ] ; then CMD="psql -q -h $DBHOST -U $DBROOTUSER " DUMP_CMD="pg_dump -h $DBHOST -U $DBROOTUSER -c" else - CMD="psql -q -h $DBHOST -p $DBHOST -U $DBROOTUSER " - DUMP_CMD="pg_dump -h $DBHOST -p $DBHOST -U $DBROOTUSER -c" + CMD="psql -q -h $DBHOST -p $DBPORT -U $DBROOTUSER " + DUMP_CMD="pg_dump -h $DBHOST -p $DBPORT -U $DBROOTUSER -c" fi # ___ 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] Incorrect translation of tel: uri to sip: uri in tel2sip() (#1173)
@miconda, thanks very much! I will take a stab at an improvement and submit, starting with sorting the parameters according to the spec. This is good for me to understand the spec and kamailio code, and a small part of, over time, making kamailio better so that it can/will be used in more places. I do understand that there are trade-offs in enforcing esoteric details of the spec, and, in any case, it would be impossible (and not even desirable) to try to enforce everything. -- 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/1173#issuecomment-312121769___ 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] Incorrect translation of tel: uri to sip: uri in tel2sip() (#1173)
I expect that tel2uri() was implemented based on the needs of initial developer as documented at: * https://www.kamailio.org/docs/modules/devel/modules/siputils.html#siputils.f.tel2sip It can be improved if one needs/wants more. Note also that specs are not implemented ad-litteram in a single function. The design of the application has been from the beginning to offer small tools (functions/statements) that can be blended in config script to get what you need. There are many functions and transformations that can help you replace/remove unwanted characters from user part of R-URI, such as subst_user(...), {re.subst} or {s...} transformations, etc. With all these I am pretty sure you can transfrorm tel to sip uri as per specs without using tel2sip() function. To be clear: I am not against enhancing tel2sip() to do more that it does now, but wanted to highlight that many spec requirements can be done with a combination of functions and expressions. I am not the author of tel2sip() and actually I haven't used it many times. I do URI normalization with script operations. -- 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/1173#issuecomment-312115866___ 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 5.0.2 suddenly stops processing traffic, then generates a core when restarting. (#1172)
The backtraces show that the worker processes are waiting to receive traffic from network, which is the normal situation. When you get it to the state of not processing sip traffic, grab again the backtraces. -- 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/1172#issuecomment-312110717___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] Incorrect translation of tel: uri to sip: uri in tel2sip() (#1173)
### Description I received a wireshark trace from a team member showing that a tel: uri was translated to a sip: uri in a very strange (invalid) way: INVITE tel:491234567891;phone-context=ims.mnc001.mcc001.3gppnetwork.org Was translated to: INVITE sip:491234567891;phone-context=ims.mnc001.mcc001.3gppnetwork@ims.mnc001.mcc001.3gppnetwork.org;user=phone ### Troubleshooting I first thought this was definitely an error, and only the phone number should be copied to the sip: uri. But, on further reading of the specification, (https://www.ietf.org/rfc/rfc3261.txt), I see that it is in fact legal to leave all parameters in. Though, when the phone-context parameter is simply a domain, it would at least seem the cleanest thing would be to remove it when the exact same domain is also inserted after the @ in the sip message. So, looking to find where the message is translated, I saw in the scscf.cfg configuration file that there is a translation specified. I found that "tel2sip" is mapped to the C function of the same name tel2sip() In this function, the translation will do exactly what I found in the trace, in other words, it will leave in all parameters separated by semi-colon, inserted before the @ symbol. But, reading the spec, I see that the spec is not being followed in any case. The spec states that all parameters included when translating, must be switched to alphabetic order, with the exception that isdn-subaddress and post-dial, must occur first and in that order. There is no code in tel2sip() to perform that sorting. Also, the parser removes '(', ')', '.', and '-' in the phone number, as specified, but, these same characters could be scattered anywhere in invalid places, and they are just silently removed, '+' can scattered anywhere and it is just left alone, Other characters can be scattered anywhere and they will just be left as-is, no error. So, I feel there should be some minimal checking of the phone number, trying to follow the spec (if we could just execute the BNF from the spec!). Reproduction This can be reproduced by sending a tel: uri with parameters inserted separated by semicolon. Debugging Data ``` (none) ``` Log Messages ``` (none) ``` SIP Traffic ``` See attached file ``` ### Possible Solutions The solution would be to modify tel2sip(), adding the sorting of parameters, putting the two exceptions first if they exist, before inserting back into the string. We should also throw errors on obvious bad formatting and ilegal characters, etc, in the input tel: uri Should we remove the "phone-context" if it is a domain and also exactly the same as the domain inserted after the @? ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` version: kamailio 5.0.0-dev5 (x86_64/linux) da4ef4-dirty flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: da4ef4 -dirty compiled on 10:37:40 May 12 2017 with gcc 5.4.0 ``` SIP spec: https://www.ietf.org/rfc/rfc3261.txtWireshark output: ![wireshark-tel2sip](https://user-images.githubusercontent.com/4886876/27705203-cfd3c150-5cd2-11e7-9f77-1664a51e7ac3.png) ``` In RFC 3966, Tel URI format: The "tel" URI has the following syntax: telephone-uri= "tel:" telephone-subscriber telephone-subscriber = global-number / local-number global-number= global-number-digits *par local-number = local-number-digits *par context *par par = parameter / extension / isdn-subaddress isdn-subaddress = ";isub=" 1*uric extension= ";ext=" 1*phonedigit context = ";phone-context=" descriptor descriptor = domainname / global-number-digits global-number-digits = "+" *phonedigit DIGIT *phonedigit local-number-digits = *phonedigit-hex (HEXDIG / "*" / "#")*phonedigit-hex domainname = *( domainlabel "." ) toplabel [ "." ] domainlabel = alphanum / alphanum *( alphanum / "-" ) alphanum toplabel = ALPHA / ALPHA *( alphanum / "-" ) alphanum parameter= ";" pname ["=" pvalue ] pname= 1*( alphanum / "-" ) pvalue = 1*paramchar paramchar= param-unreserved / unreserved / pct-encoded unreserved = alphanum / mark mark = "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")" pct-encoded = "%" HEXDIG HEXDIG param-unreserved
Re: [sr-dev] [kamailio/kamailio] ims_isc module does not deliver to AS after asynchronous SAR to HSS (distinct PSI) (#1168)
I am just testing the "at" sign: @christoph-v -- 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/1168#issuecomment-312017553___ 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 5.0.2 suddenly stops processing traffic, then generates a core when restarting. (#1172)
Hi Daniel, Here is the output: ``` root:~/bt# kamctl ps | grep -B1 "tcp receiver" "PID": 23610, "DSC": "tcp receiver (generic) child=0" -- "PID": 23611, "DSC": "tcp receiver (generic) child=1" -- "PID": 23612, "DSC": "tcp receiver (generic) child=2" -- "PID": 23613, "DSC": "tcp receiver (generic) child=3" -- "PID": 23614, "DSC": "tcp receiver (generic) child=4" -- "PID": 23615, "DSC": "tcp receiver (generic) child=5" -- "PID": 23616, "DSC": "tcp receiver (generic) child=6" -- "PID": 23617, "DSC": "tcp receiver (generic) child=7" root:~/bt# root:~/bt# gdb /usr/sbin/kamailio -ex "bt full" --batch 23610 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 0x7f73f4cbd0d3 in __epoll_wait_nocancel () at ../sysdeps/unix/syscall-template.S:84 84 ../sysdeps/unix/syscall-template.S: No such file or directory. #0 0x7f73f4cbd0d3 in __epoll_wait_nocancel () at ../sysdeps/unix/syscall-template.S:84 No locals. #1 0x55a667819c13 in io_wait_loop_epoll (h=0x55a667cbee80 , t=2, repeat=0) at core/io_wait.h:1034 n = 2 r = 1 fm = 0x7ffddf805cf0 revents = 1734426560 __func__ = "io_wait_loop_epoll" #2 0x55a66782afd3 in tcp_receive_loop (unix_sock=40) at core/tcp_read.c:1789 __func__ = "tcp_receive_loop" #3 0x55a66770f088 in tcp_init_children () at core/tcp_main.c:4796 r = 0 i = 7 reader_fd_1 = 40 pid = 0 si_desc = "tcp receiver (generic)\000\000\360\\\200\337\375\177", '\000' , "\320X\200\337\375\177\000\000u\340tg\246U\000\000\201\016\234g\246U\000\000\001\000\000\000\000\000\000\000p\022\230g\000\000\000\000\070\352C\364s\177\000\000\300?ag\246U\000\000\f\372\000s\000\000\000\000\360X\200\337\375\177\000\000\f\372\000s\000\000\000" si = 0x0 __func__ = "tcp_init_children" #4 0x55a667620ff7 in main_loop () at main.c:1715 i = 8 pid = 23603 si = 0x0 si_desc = "udp receiver child=7 sock=[2602:FF37:0:1:0:0:C601:3779]:5060\000\257$\366\200:z\360q\177\000\000\f\372\000s\000\000\000\000\300?ag\246U\000\000\360\\\200\337\375\177", '\000' , " Z\200\337\375\177\000\000a\262\200g\246U\000" nrprocs = 8 woneinit = 1 __func__ = "main_loop" #5 0x55a667627fb9 in main (argc=13, argv=0x7ffddf805cf8) at main.c:2646 cfg_stream = 0x55a668b42010 c = -1 r = 0 tmp = 0x7ffddf806eb5 "" tmp_len = -178570608 port = 32627 proto = -545236016 options = 0x55a66796b0e8 ":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 = 83065607 rfd = 4 debug_save = 0 debug_flag = 0 dont_fork_cnt = 0 n_lst = 0x0 p = 0x st = {st_dev = 19, st_ino = 15809, st_nlink = 2, st_mode = 16832, st_uid = 109, st_gid = 113, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1498523393, tv_nsec = 31134570}, st_mtim = {tv_sec = 1498687722, tv_nsec = 986617235}, st_ctim = {tv_sec = 1498687722, tv_nsec = 986617235}, __glibc_reserved = {0, 0, 0}} __func__ = "main" root:~/bt# root:~/bt# kamctl ps | grep -B1 "udp receiver" "PID": 23586, "DSC": "udp receiver child=0 sock=198.1.55.121:5060" -- "PID": 23587, "DSC": "udp receiver child=1 sock=198.1.55.121:5060" -- "PID": 23588, "DSC": "udp receiver child=2 sock=198.1.55.121:5060" -- "PID": 23589, "DSC": "udp receiver child=3 sock=198.1.55.121:5060" -- "PID": 23590, "DSC": "udp receiver child=4 sock=198.1.55.121:5060" -- "PID": 23591, "DSC": "udp receiver child=5 sock=198.1.55.121:5060" -- "PID": 23592, "DSC": "udp receiver child=6 sock=198.1.55.121:5060" -- "PID": 23593, "DSC": "udp receiver child=7 sock=198.1.55.121:5060" -- "PID": 23594, "DSC": "udp receiver child=0 sock=[2602:FF37:0:1:0:0:C601:3779]:5060" -- "PID": 23595, "DSC": "udp receiver child=1 sock=[2602:FF37:0:1:0:0:C601:3779]:5060" -- "PID": 23596, "DSC": "udp receiver child=2 sock=[2602:FF37:0:1:0:0:C601:3779]:5060" -- "PID": 23597, "DSC": "udp receiver child=3 sock=[2602:FF37:0:1:0:0:C601:3779]:5060" -- "PID": 23598, "DSC": "udp receiver child=4 sock=[2602:FF37:0:1:0:0:C601:3779]:5060" -- "PID": 23599, "DSC": "udp receiver child=5 sock=[2602:FF37:0:1:0:0:C601:3779]:5060" -- "PID": 23600, "DSC": "udp receiver child=6 sock=[2602:FF37:0:1:0:0:C601:3779]:5060" -- "PID": 23601, "DSC": "udp receiver child=7 sock=[2602:FF37:0:1:0:0:C601:3779]:5060" root:~/bt# root:~/bt# gdb /usr/sbin/kamailio -ex "bt full" --batch 23586 [Thread debugging using libthread_db enabled] Usi
Re: [sr-dev] [kamailio/kamailio] pkg/kamailio/centos/7: Packaged sipcapture module (#1106)
@miconda when your ready to accept PR, i will bump all commits to one. Is required to install config file to folder like "/usr/share/kamailio/example" too? -- 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/1106#issuecomment-311936676___ 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] pkg/kamailio/centos/7: Packaged sipcapture module (#1106)
@sergey-safarov pushed 1 commit. a864080 Moved to other folder sipcapture config file -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/kamailio/kamailio/pull/1106/files/ab3f257db0df5f85c66b66d88340c59bb9e09aae..a864080315b868ac3550385012cfe52ddfce4b9d ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] Segfault when calling $sel(cfg_get...) (#1159)
I can't reproduce, using master branch, but should be the same code. I tried with the default config adding at the top of request_route: ``` xlog("=+++ cfg var: $sel(cfg_get.wurst.wasser)\n"); $var(cw) = $sel(cfg_get.wurst.wasser); xlog("=+++ var: $var(cw)\n"); ``` The definition was like in your example: ``` wurst.wasser = "mic check 123" desc "bla" ``` The logs were: ``` 1(41976) DEBUG: [core/select.c:412]: run_select(): Calling SELECT 0x1078e1230 1(41976) ERROR:
Re: [sr-dev] [kamailio/kamailio] Kamailio 5.0.2 suddenly stops processing traffic, then generates a core when restarting. (#1172)
Can you paste the content of a bactrace for one udp and one tcp worker? -- 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/1172#issuecomment-311913726___ 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] pkg/kamailio: Fix of ticket 1085 (#1086)
When kamailio cannot allocate memory (no free memeory on host), then we got non null exit 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/1086#issuecomment-311911630___ 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] pkg/kamailio: Fix of ticket 1085 (#1086)
I still don't see why we need this. What is the case of "non null exit"? >From my POV I only want kamailio service to restart if there was a segfault >and AFAICT that is already happening with the actual systemd configuration -- 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/1086#issuecomment-311900396___ 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 5.0.2 suddenly stops processing traffic, then generates a core when restarting. (#1172)
Ok! I'll wait until it happens again. Some extra info: 1- Pike is enabled, but we have logging when it blocks something (and no logs appeared). 2- CPU is always < 1% usage. 3- I have enabled kernel.core_uses_pid=1. 4- Our traffic is: [clients]--> IPv4/IPv6 tls_443 [Kamailio] IPv4 udp_5060 --> IPv4 udp_5060 [dispatcher setid 4]. If I run the bt full right now to a worker process, should we get random stuff? Becase right now I'm getting mostly the same on each process: ``` root:~# for i in `kamctl ps | grep PID | awk '{print $2}' | tr -d ","`; do gdb /usr/sbin/kamailio -ex "bt full" --batch $i >> $i.txt 2>&1; done root:~# root:~# ls -l total 140 -rw-r--r-- 1 root root 1769 Jun 29 01:04 23585.txt -rw-r--r-- 1 root root 3300 Jun 29 01:04 23586.txt -rw-r--r-- 1 root root 3300 Jun 29 01:04 23587.txt -rw-r--r-- 1 root root 3301 Jun 29 01:04 23588.txt -rw-r--r-- 1 root root 3300 Jun 29 01:04 23589.txt -rw-r--r-- 1 root root 3301 Jun 29 01:04 23590.txt -rw-r--r-- 1 root root 3300 Jun 29 01:04 23591.txt -rw-r--r-- 1 root root 3301 Jun 29 01:04 23592.txt -rw-r--r-- 1 root root 3301 Jun 29 01:04 23593.txt -rw-r--r-- 1 root root 3432 Jun 29 01:04 23594.txt -rw-r--r-- 1 root root 3432 Jun 29 01:04 23595.txt -rw-r--r-- 1 root root 3431 Jun 29 01:04 23596.txt -rw-r--r-- 1 root root 3432 Jun 29 01:04 23597.txt -rw-r--r-- 1 root root 3432 Jun 29 01:04 23598.txt -rw-r--r-- 1 root root 3432 Jun 29 01:04 23599.txt -rw-r--r-- 1 root root 3432 Jun 29 01:04 23600.txt -rw-r--r-- 1 root root 3432 Jun 29 01:04 23601.txt -rw-r--r-- 1 root root 2388 Jun 29 01:04 23602.txt -rw-r--r-- 1 root root 1836 Jun 29 01:04 23603.txt -rw-r--r-- 1 root root 2245 Jun 29 01:04 23604.txt -rw-r--r-- 1 root root 4023 Jun 29 01:04 23605.txt -rw-r--r-- 1 root root 2950 Jun 29 01:04 23606.txt -rw-r--r-- 1 root root 2837 Jun 29 01:04 23607.txt -rw-r--r-- 1 root root 4691 Jun 29 01:04 23608.txt -rw-r--r-- 1 root root 2740 Jun 29 01:04 23609.txt -rw-r--r-- 1 root root 2691 Jun 29 01:04 23610.txt -rw-r--r-- 1 root root 2691 Jun 29 01:04 23611.txt -rw-r--r-- 1 root root 2691 Jun 29 01:04 23612.txt -rw-r--r-- 1 root root 2691 Jun 29 01:04 23613.txt -rw-r--r-- 1 root root 2691 Jun 29 01:04 23614.txt -rw-r--r-- 1 root root 2691 Jun 29 01:04 23615.txt -rw-r--r-- 1 root root 2691 Jun 29 01:04 23616.txt -rw-r--r-- 1 root root 2691 Jun 29 01:04 23617.txt -rw-r--r-- 1 root root 2151 Jun 29 01:04 23618.txt root:~# root:~# grep -n * 23585.txt:31:p = 0x 23586.txt:39:p = 0x 23587.txt:39:p = 0x 23588.txt:39:p = 0x 23589.txt:39:p = 0x 23590.txt:39:p = 0x 23591.txt:39:p = 0x 23592.txt:39:p = 0x 23593.txt:39:p = 0x 23594.txt:39:p = 0x 23595.txt:39:p = 0x 23596.txt:39:p = 0x 23597.txt:39:p = 0x 23598.txt:39:p = 0x 23599.txt:39:p = 0x 23600.txt:39:p = 0x 23601.txt:39:p = 0x 23602.txt:40:p = 0x 23603.txt:33:p = 0x 23604.txt:39:p = 0x 23605.txt:75:p = 0x 23606.txt:51:p = 0x 23607.txt:49:p = 0x 23608.txt:75:p = 0x 23609.txt:50:p = 0x 23610.txt:47:p = 0x 23611.txt:47:p = 0x 23612.txt:47:p = 0x 23613.txt:47:p = 0x 23614.txt:47:p = 0x 23615.txt:47:p = 0x 23616.txt:47:p = 0x 23617.txt:47:p = 0x 23618.txt:41:p = 0x root:~# ``` Am I missing something or am I doing anything wrong here? -- 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/1172#issuecomment-311893980___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] git:master:4826ba74: permissions: new parameter load_backends
> On 29 Jun 2017, at 09:28, Daniel-Constantin Mierla wrote: > > > permissions: new parameter load_backends > > - control what backends should be loaded > - 1 - address table > - 2 - trusted table > - 4 - allow file > - 8 - deny file > - it can be a combination (sum) of the options to load many backends > - default value 0x (load all backends) Great patch. I have been irritated over the error messages over no allow/deny files when using trusted… Thank you Daniel! /O___ 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 5.0.2 suddenly stops processing traffic, then generates a core when restarting. (#1172)
Have you enabled one core per process (pid)? If not, core files from other processes may be overwritten by the main process doing cleanup at shut down. Anyhow, if a worker process crashes, you should see a log message in syslog. not only the one about signal 15. If you don't get a response, then the sip trace is not that useful for the moment. First thing to double check -- if you enabled pike module, be sure you don't block the traffic that is trusted. Otherwise, if you can reproduce, do following: * when kamailio runs fine, do `kamctl ps` to get the list of running processes * when kamailio stops routing sip traffic, attach with gdb to a worker process for your kind of traffic (UDP, TCP ... for example for UDP, attach to the PID listed for the process with ID 1) and get the backtrace: ``` gdb /path/to/kamailio PID bt full ``` Also see if the CPU is at high load. That could be an indication of a dead (spin) lock. If CPU is low, maybe there is some blocking operation dns, db query, ... -- 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/1172#issuecomment-31117___ 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 5.0.2 suddenly stops processing traffic, then generates a core when restarting. (#1172)
In the capture at some point Kamailio stops responding to any request. We have Nagios sending OPTIONS requests, when we get the CRITICAL because Kamailio doesn't reply, then we manually restart it (so the signal 15 TERM is caused in the restart). We have a dispatcher group with 2 nodes, if both are down, Kamailio should reply with a 503. I can send you the pcap in private, I would have to hide a lot of data to make post it here. Also, I'm pretty sure the problem will reproduce, when it is happening how can I get some traces or something useful to send to you before we restart 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/issues/1172#issuecomment-311886954___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:e703b10c: keepalive: removed duplicated typedef definition
Module: kamailio Branch: master Commit: e703b10cab467a0bd2a147fe63177a29310ece81 URL: https://github.com/kamailio/kamailio/commit/e703b10cab467a0bd2a147fe63177a29310ece81 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2017-06-29T09:33:47+02:00 keepalive: removed duplicated typedef definition --- Modified: src/modules/keepalive/api.h --- Diff: https://github.com/kamailio/kamailio/commit/e703b10cab467a0bd2a147fe63177a29310ece81.diff Patch: https://github.com/kamailio/kamailio/commit/e703b10cab467a0bd2a147fe63177a29310ece81.patch --- diff --git a/src/modules/keepalive/api.h b/src/modules/keepalive/api.h index 020989b4ce..33b7db135b 100644 --- a/src/modules/keepalive/api.h +++ b/src/modules/keepalive/api.h @@ -29,6 +29,7 @@ #define __KEEPALIVE_API_H_ #include "../../core/sr_module.h" +#include "keepalive.h" typedef int ka_state; @@ -36,7 +37,6 @@ typedef int ka_state; #define KA_STATE_UP 1 #define KA_STATE_DOWN 2 -typedef void (*ka_statechanged_f)(str *uri, int state, void *user_attr); typedef int (*ka_add_dest_f)(str *uri, str *owner, int flags, ka_statechanged_f callback, void *user_attr); typedef ka_state (*ka_dest_state_f)(str *uri); @@ -70,4 +70,4 @@ static inline int keepalive_load_api(keepalive_api_t *api) return 0; } -#endif /* __KEEPALIVE_API_H__ */ \ No newline at end of file +#endif /* __KEEPALIVE_API_H__ */ ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:6ad1744f: modules: readme files regenerated - permissions ... [skip ci]
Module: kamailio Branch: master Commit: 6ad1744f13d8ceda7463024e6df37a7d229bc4cc URL: https://github.com/kamailio/kamailio/commit/6ad1744f13d8ceda7463024e6df37a7d229bc4cc Author: Kamailio Dev Committer: Kamailio Dev Date: 2017-06-29T09:31:37+02:00 modules: readme files regenerated - permissions ... [skip ci] --- Modified: src/modules/permissions/README --- Diff: https://github.com/kamailio/kamailio/commit/6ad1744f13d8ceda7463024e6df37a7d229bc4cc.diff Patch: https://github.com/kamailio/kamailio/commit/6ad1744f13d8ceda7463024e6df37a7d229bc4cc.patch ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:64c529d1: permissions: documented load_backends parameter
Module: kamailio Branch: master Commit: 64c529d15262921bed26f7f4b15af043382bba36 URL: https://github.com/kamailio/kamailio/commit/64c529d15262921bed26f7f4b15af043382bba36 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2017-06-29T09:27:33+02:00 permissions: documented load_backends parameter --- Modified: src/modules/permissions/doc/permissions_admin.xml --- Diff: https://github.com/kamailio/kamailio/commit/64c529d15262921bed26f7f4b15af043382bba36.diff Patch: https://github.com/kamailio/kamailio/commit/64c529d15262921bed26f7f4b15af043382bba36.patch --- diff --git a/src/modules/permissions/doc/permissions_admin.xml b/src/modules/permissions/doc/permissions_admin.xml index 6579b7dfb1..315a70c832 100644 --- a/src/modules/permissions/doc/permissions_admin.xml +++ b/src/modules/permissions/doc/permissions_admin.xml @@ -792,6 +792,30 @@ modparam("permissions", "max_subnets", 1024) + + load_backends (int) + + Control what backends should be loaded: 1 - address table; + 2 - trusted table; 4 - allow file; 8 - deny file. + + + It can be a combination (sum) of the options to load many backends + (e.g., 3 - loads address and trusted tables). + + + + Default value is 0x (load all backends). + + + + Set load_backends parameter + +... +modparam("permissions", "load_backends", 1) +... + + + ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] git:master:4826ba74: permissions: new parameter load_backends
Module: kamailio Branch: master Commit: 4826ba749a3d8589d57bc5fcb38eeb6f9e840e02 URL: https://github.com/kamailio/kamailio/commit/4826ba749a3d8589d57bc5fcb38eeb6f9e840e02 Author: Daniel-Constantin Mierla Committer: Daniel-Constantin Mierla Date: 2017-06-29T09:21:22+02:00 permissions: new parameter load_backends - control what backends should be loaded - 1 - address table - 2 - trusted table - 4 - allow file - 8 - deny file - it can be a combination (sum) of the options to load many backends - default value 0x (load all backends) --- Modified: src/modules/permissions/permissions.c Modified: src/modules/permissions/permissions.h --- Diff: https://github.com/kamailio/kamailio/commit/4826ba749a3d8589d57bc5fcb38eeb6f9e840e02.diff Patch: https://github.com/kamailio/kamailio/commit/4826ba749a3d8589d57bc5fcb38eeb6f9e840e02.patch --- diff --git a/src/modules/permissions/permissions.c b/src/modules/permissions/permissions.c index 3d50c6b0b7..f6715556a3 100644 --- a/src/modules/permissions/permissions.c +++ b/src/modules/permissions/permissions.c @@ -89,6 +89,8 @@ static int check_all_branches = 1; int _perm_max_subnets = 512; +int _perm_load_backends = 0x; + /* * Convert the name of the files into table index */ @@ -178,6 +180,7 @@ static param_export_t params[] = { {"mask_col", PARAM_STR, &mask_col}, {"port_col", PARAM_STR, &port_col}, {"max_subnets",PARAM_INT, &_perm_max_subnets }, + {"load_backends", PARAM_INT, &_perm_load_backends }, {0, 0, 0} }; @@ -576,33 +579,42 @@ static int double_fixup(void** param, int param_no) */ static int mod_init(void) { - if(permissions_init_rpc()!=0) - { - LM_ERR("failed to register RPC commands\n"); + if(_perm_load_backends==0) { + LM_ERR("failure - no backend to be loaded\n"); return -1; } - allow[0].filename = get_pathname(default_allow_file); - allow[0].rules = parse_config_file(allow[0].filename); - if (allow[0].rules) { - LM_DBG("default allow file (%s) parsed\n", allow[0].filename); - } else { - LM_INFO("default allow file (%s) not found => empty rule set\n", - allow[0].filename); + if(permissions_init_rpc()!=0) { + LM_ERR("failed to register RPC commands\n"); + return -1; } - deny[0].filename = get_pathname(default_deny_file); - deny[0].rules = parse_config_file(deny[0].filename); - if (deny[0].rules) { - LM_DBG("default deny file (%s) parsed\n", deny[0].filename); + if(_perm_load_backends&PERM_LOAD_ALLOWFILE) { + allow[0].filename = get_pathname(default_allow_file); + allow[0].rules = parse_config_file(allow[0].filename); + if (allow[0].rules) { + LM_DBG("default allow file (%s) parsed\n", allow[0].filename); + } else { + LM_INFO("default allow file (%s) not found => empty rule set\n", + allow[0].filename); + } } else { - LM_INFO("default deny file (%s) not found => empty rule set\n", - deny[0].filename); + allow[0].filename = NULL; + allow[0].rules = NULL; } - if (init_trusted() != 0) { - LM_ERR("failed to initialize the allow_trusted function\n"); - return -1; + if(_perm_load_backends&PERM_LOAD_DENYFILE) { + deny[0].filename = get_pathname(default_deny_file); + deny[0].rules = parse_config_file(deny[0].filename); + if (deny[0].rules) { + LM_DBG("default deny file (%s) parsed\n", deny[0].filename); + } else { + LM_INFO("default deny file (%s) not found => empty rule set\n", + deny[0].filename); + } + } else { + deny[0].filename = NULL; + deny[0].rules = NULL; } if (init_tag_avp(&tag_avp_param) < 0) { @@ -610,9 +622,18 @@ static int mod_init(void) return -1; } - if (init_addresses() != 0) { - LM_ERR("failed to initialize the allow_address function\n"); - return -1; + if(_perm_load_backends&PERM_LOAD_TRUSTEDDB) { + if (init_trusted() != 0) { + LM_ERR("failed to initialize the allow_trusted function\n"); + return -1; + } + } + + if(_perm_load_backends&PERM_LOAD_ADDRESSDB) { + if (init_addresses() != 0) { + LM_ERR("failed to initialize the allow_address function\n"); + return -1; + } } if ((db
Re: [sr-dev] [kamailio/kamailio] radius : Fixes use of freeradiusclient library (#1170)
Hello, after cloning from git , i didnt get any error. i will test again with version 5. thanks for support. -- 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/1170#issuecomment-311883384___ 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] radius : Fixes use of freeradiusclient library (#1170)
Closed #1170. -- 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/1170#event-1143668552___ 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] pkg/kamailio/centos/7: Packaged sipcapture module (#1106)
Can you store the kamailio sipcapture config inside the folder with spec files or in misc/examples? Nothing new should be placed in etc/ folder, it is planned to clean it up and let there only mandatory config files, as suggested by distros and move other config examples in a docs/share folder. -- 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/1106#issuecomment-311879779___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev