### Description
Periodically Kamailio crashes, log shows that it happens on REGISTER request with incorrect params. I don't know if it is a network problem or somebody sends incorrect request, but there are records in logs:
#### Log Messages
Jan 30 03:49:29 kam /usr/sbin/kamailio[20718]: ERROR: <core> [core/parser/parse_from.c:53]: parse_from_header(): bad msg or missing FROM header
Jan 30 03:49:29 kam /usr/sbin/kamailio[20718]: ERROR: dialog [dlg_cseq.c:93]: dlg_cseq_prepare_msg(): cannot parse FROM header
Jan 30 03:49:29 kam /usr/sbin/kamailio[20718]: ERROR: pv [pv_core.c:664]: pv_get_callid(): cannot parse Call-Id header
Jan 30 03:49:29 kam /usr/sbin/kamailio[20718]: {1 <null> <null>} ERROR: <core> [core/parser/parse_from.c:53]: parse_from_header(): bad msg or missing FROM header
Jan 30 03:49:29 kam /usr/sbin/kamailio[20718]: {1 <null> <null>} ERROR: pv [pv_core.c:468]: pv_get_from_attr(): cannot parse From header
Jan 30 03:49:29 kam /usr/sbin/kamailio[20718]: {1 <null> <null>} ERROR: pv [pv_core.c:664]: pv_get_callid(): cannot parse Call-Id header
Jan 30 03:49:29 kam /usr/sbin/kamailio[20718]: {1 <null> <null>} NOTICE: <script>: REQ: M='REGISTER sip:1.2.3.208:5060' F='<null>' T='<null>' CI='<null>' SRC='113.128.105.127:49556' AU='<null>'
Jan 30 03:49:29 kam /usr/sbin/kamailio[20736]: CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 15
Jan 30 03:49:29 kam /usr/sbin/kamailio[20713]: ALERT: <core> [main.c:746]: handle_sigs(): child process 20718 exited by a signal 11
Jan 30 03:49:29 kam /usr/sbin/kamailio[20713]: ALERT: <core> [main.c:749]: handle_sigs(): core was not generated
Jan 30 03:49:29 kam /usr/sbin/kamailio[20713]: INFO: <core> [main.c:771]: handle_sigs(): terminating due to SIGCHLD
### Additional Information
version: kamailio 5.2.0-dev2 (i386/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 4.9.2
* **Operating System**:
Linux kam 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1420
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests.
If you have questions about using Kamailio or related to its configuration file,
ask on sr-users mailing list:
* http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing
C code, ask on sr-dev mailing list
* http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the
developers to troubleshoot the issue.
If you submit a feature request (or enhancement), you can delete the text of
the template and only add the description of what you would like to be added.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
We are using lua base routing with app_lua. We are seeing that our memory-utilization on that system continuously getting increase. our route.lua will have all routing logic same as
https://github.com/kamailio/kamailio/blob/master/misc/examples/kemi/kamaili…
we are using following set of modules
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "pv.so"
loadmodule "tmx.so"
loadmodule "sl.so"
loadmodule "maxfwd.so"
loadmodule "nathelper.so"
loadmodule "textops.so"
loadmodule "siputils.so"
loadmodule "xlog.so"
loadmodule "sanity.so"
loadmodule "path.so"
loadmodule "jsonrpcs.so"
loadmodule "app_lua.so"
loadmodule "dispatcher.so"
loadmodule "json.so"
loadmodule "cfg_rpc.so"
loadmodule "ctl.so"
loadmodule "ipops.so"
loadmodule "http_async_client.so"
loadmodule "dialog.so"
# ----------------- setting module-specific parameters ---------------
# ----- rr params -----
# set next param to 1 to add value to ;lr param (helps with some UAs)
modparam("rr", "enable_full_lr", 0)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 1)
# ----- dispatcher params -----
modparam("dispatcher", "list_file", DISPATCHER_FILE)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "ds_ping_interval", 10)
modparam("dispatcher", "ds_ping_from", "sip:ping@test.com")
# ----- nathelper params ----
modparam("nathelper", "received_avp", "$avp(s:rcv)")
# ----- http_async_client -------
# ---- number of worker process for async req and res
modparam("http_async_client", "workers", 4)
# ----- ctl ------
modparam("ctl", "binrpc", "tcp:MY_IP_ADDR:2086")
# ----- app_lua params ----
modparam("app_lua", "reload", 1)
modparam("app_lua", "load", ROUTE_LUA)
# ---- dialog params ----
modparam("dialog", "enable_stats", 1)
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "event_callback", "ksr_dialog_event")
cfgengine "lua"
### Troubleshooting
#### Reproduction
We can easily reproduce by loading app_lua with kamailio-basic-kemi-lua.lua
https://github.com/kamailio/kamailio/blob/master/misc/examples/kemi/kamaili…
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
root@ip-172-31-4-160:~# kamcmd -s tcp:172.31.4.160:2046 tm.stats
{
current: 2220
waiting: 2198
total: 6113169
total_local: 1371
rpl_received: 11958486
rpl_generated: 6111711
rpl_sent: 12224635
6xx: 0
5xx: 6104789
4xx: 6831
3xx: 0
2xx: 1483
created: 6113169
freed: 6110949
delayed_free: 0
}
transaction are getting free as they are created so no transaction memory leak.
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
U 54.183.198.87:5060 -> 172.31.4.160:5060
INVITE sip:919980950111@13.57.122.212:5060 SIP/2.0.
Record-Route: <sip:54.183.198.87;lr;ftag=2186327>.
Via: SIP/2.0/UDP 54.183.198.87:5060;branch=z9hG4bK62f3.22dfb9a43503cc12dafdcdbc9ab1e17d.0.
Via: SIP/2.0/UDP 172.31.13.202:5060;rport=5060;received=13.232.78.75;branch=z9hG4bK-20254-2186327-0.
From: <sip:919980950111@21979254854757081.zt.plivo.com>;tag=2186327.
To: <sip:919980950111@21979254854757081.zt.plivo.com>.
Call-ID: 2186327-20254(a)172.31.13.202.
CSeq: 1 INVITE.
Contact: <sip:sipp@13.126.252.148:5060;transport=UDP;alias=13.232.78.75~5060~1>.
Max-Forwards: 69.
User-Agent: Sipp/Linux.
Supported: replaces, outbound.
Content-Type: application/sdp.
Content-Length: 139.
X-ZT-Cust-IP: 13.232.78.75.
X-ZT-Trunk: 21979254854757081.zt.plivo.com.
.
v=0.
o=user1 53655765 2353687637 IN IP4 13.126.252.148.
s=-.
c=IN IP4 13.126.252.148.
t=0 0.
m=audio 6000 RTP/AVP 0.
a=rtpmap:0 PCMU/8000.
#
U 172.31.4.160:5060 -> 54.183.198.87:5060
SIP/2.0 100 trying -- your call is important to us.
Via: SIP/2.0/UDP 54.183.198.87:5060;branch=z9hG4bK62f3.22dfb9a43503cc12dafdcdbc9ab1e17d.0;rport=5060.
Via: SIP/2.0/UDP 172.31.13.202:5060;rport=5060;received=13.232.78.75;branch=z9hG4bK-20254-2186327-0.
From: <sip:919980950111@21979254854757081.zt.plivo.com>;tag=2186327.
To: <sip:919980950111@21979254854757081.zt.plivo.com>.
Call-ID: 2186327-20254(a)172.31.13.202.
CSeq: 1 INVITE.
Server: kamailio (5.1.3 (x86_64/linux)).
Content-Length: 0.
.
#
U 172.31.4.160:5060 -> 54.183.198.87:5060
SIP/2.0 408 Request Timeout.
Via: SIP/2.0/UDP 54.183.198.87:5060;branch=z9hG4bK223b.cd9c3cb1d2dc6adc346e6fb7acdee708.0;rport=5060.
Via: SIP/2.0/UDP 172.31.13.202:5060;rport=5060;received=13.232.78.75;branch=z9hG4bK-20254-2185727-0.
From: <sip:919980950111@21979254854757081.zt.plivo.com>;tag=2185727.
To: <sip:919980950111@21979254854757081.zt.plivo.com>;tag=c99e9820d9036d36e5541ff825b95248-8c22.
Call-ID: 2185727-20254(a)172.31.13.202.
CSeq: 1 INVITE.
Server: kamailio (5.1.3 (x86_64/linux)).
Content-Length: 0.
.
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
Jun 29 19:18:14 ip-172-31-4-160 kamailio[8119]: ERROR: <core> [core/mem/q_malloc.c:287]: qm_find_free(): qm_find_free(0x7fe974b24000, 35992); Free fragment not found!
Jun 29 19:18:14 ip-172-31-4-160 kamailio[8119]: ERROR: <core> [core/mem/q_malloc.c:421]: qm_malloc(): qm_malloc(0x7fe974b24000, 35992) called from http_async_client: http_multi.c: curl_shm_calloc(346), module: http_async_client; Free fragment not found!
Jun 29 19:18:14 ip-172-31-4-160 kamailio[8119]: ERROR: http_async_client [http_multi.c:437]: new_request(): curl_easy_init() failed!
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
(paste your output here)
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
root@ip-172-31-4-160:/etc/kamailio# uname -a
Linux ip-172-31-4-160 3.13.0-143-generic #192-Ubuntu SMP Tue Feb 27 10:45:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1577
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1086
-- Commit Summary --
* pkg/kamailio: Fix of ticket 1085
-- File Changes --
M pkg/kamailio/centos/7/kamailio.service (2)
M pkg/kamailio/deb/debian/kamailio.service (2)
M pkg/kamailio/deb/jessie/kamailio.service (2)
M pkg/kamailio/deb/sid/kamailio.service (2)
M pkg/kamailio/deb/stretch/kamailio.service (2)
M pkg/kamailio/deb/xenial/kamailio.service (2)
M pkg/kamailio/fedora/17/kamailio.service (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1086.patchhttps://github.com/kamailio/kamailio/pull/1086.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/1086
(Feature request)
be able to recover data from htable variable when kamailio starts, from another kamailio instances through dmq module.
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/260
Apparently the default locks are set to PTHREAD mutex, when the architecture is not handled explicitely. It should be reviewed and eventually switch to standard POSIX, they should work everywhere while PTHREAD are targeting threads and work only in few cases for processes.
--
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/1035
repro servers peer with each other in a federated manner just like SMTP servers for email, but using TLS mutual authentication to prevent impersonation.
Kamailio has TLS support and should be able to talk to such servers and other Kamailio servers in the same way.
It would be good to create a recommended sample configuration for this type of service and also add it to the RTC Quick Start Guide:
http://rtcquickstart.org/guide/multi/sip-proxy.html
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/531
### Description
<!--
I want to do call drop when balance reach to 0.
so for that i am using CNXCC module and kamailio 4.2 version
now when user balance reach to 0 then i can see in log
terminate_call(): Error executing dlg_end_dlg command. Return code was [404]
Apr 1 06:49:56 sip /usr/sbin/kamailio[1316]: ALERT: cnxcc [cnxcc_check.c:81]: check_calls_by_money(): [S2N5rn7nlu] call has exhausted its credit. Breaking the loop
So my target is call disconnect when users balance reach at 0.
-->
#### Log Messages
```
terminate_call(): Error executing dlg_end_dlg command. Return code was [404]
Apr 1 06:49:56 sip /usr/sbin/kamailio[1316]: ALERT: cnxcc [cnxcc_check.c:81]: check_calls_by_money(): [S2N5rn7nlu] call has exhausted its credit. Breaking the loop
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
kamctl -v
/usr/sbin/kamctl 4.2.0
```
* **Operating System**:
```
Centos 6 64bit
```
--
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/1051
### Description
According the documentation the module will send reply if one of the checks is failed.
However it doesn't send reply if digest credentials, duplicated To/From tags or authorization header checks are failed.
I would like to propose to add a new parameter which will enable or disable auto sending of reply.
#### Reproduction
Send to kamailio request with empty nonce in Authorization header.
### Possible Solutions
Set autodrop to 0 and send the reply from configuration file. But in some cases this reply will be sent twice from module and from config.
### Additional Information
kamailio version 4.4.7 and the latest 5.x
--
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/1543
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests.
If you have questions about using Kamailio or related to its configuration file,
ask on sr-users mailing list:
* http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing
C code, ask on sr-dev mailing list
* http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the
developers to troubleshoot the issue.
If you submit a feature request (or enhancement), you can delete the text of
the template and only add the description of what you would like to be added.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
I have configured a kamailio as PCSCF taking the configuration sample files (kamailio.cfg and pcscf.cfg) in https://github.com/kamailio/kamailio/tree/master/misc/examples/pcscf
The version of kamailio installed is the 5.1.
When I perform "service pcscf start" the services doesn't restart giving a parsing error for a pseudo variable called $uac_req. The error is found in this section:
route[NATPING] {
route(preload_pcscf);
sht_iterator_start("nat_iterator", "natping");
while(sht_iterator_next("nat_iterator")) {
xlog("OPTIONS to $shtitval(nat_iterator) via $shtitkey(nat_iterator)...\n");
$uac_req(method) = "OPTIONS";
$uac_req(ruri) = $shtitval(nat_iterator);
$uac_req(furi) = PCSCF_URL;
$uac_req(turi) = $shtitval(nat_iterator);
$uac_req(ouri) = $shtitkey(nat_iterator);
$uac_req(evroute) = 1;
uac_req_send();
}
sht_iterator_end("nat_iterator");
}
I have checked that I have only one "uac.so" file in /usr/lib64/kamailio/modules/ and the date of the file is April 15th. So I guess that the file is updated.
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
```
(paste your debugging data here)
```
#### Log Messages
ERROR: <core> [core/pvapi.c:828]: pv_parse_spec2(): error searching pvar "uac_req" 0(2271) ERROR: <core> [core/pvapi.c:1032]: pv_parse_spec2(): wrong char [m/109] in [$uac_req(method)] at [9 (5)] 0(2271) CRITICAL: <core> [core/cfg.y:3414]: yyerror_at(): parse error in config file /etc/kamailio/pcscf/kamailio.cfg, line 906, column 3-18: Can't get from cache: $uac_req(method) ERROR: bad config file (1 errors)
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
version: kamailio 5.1.0-dev2 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 4.7.2
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
Debian 8
--
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/1123