<!--
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 want to give decimal value of ip address to the server_id but when i am converting the ipv6 address to decimal then its bigger then integer range.so here in kamailio, we need to update every place where ever we are using server id by int64.we need to also make changes to database also by changing the server_id field type.
### Troubleshooting
#### Reproduction
issue can be reproduced by following steps:
first get the server_id by converting the ipv6 ip address to decimal so whenever any endpoint register it will store the -1 into database as integer range is reached to limit.
#### Debugging Data
<!--
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.
-->
```
(paste your debugging data here)
```
#### 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).
-->
```
(paste your log messages here)
```
#### 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.0.4 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 13:58:01 Nov 20 2017 with unknown
```
* **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-0-35:~# uname -a
Linux ip-172-31-0-35 4.4.0-1022-aws #31-Ubuntu SMP Tue Jun 27 11:27:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1322
### Description
We had Kamailio 5.1.4 with websocket module. Unfortunately, our clients don't support websocket keepalive mechanism at all, so I used TCP keepalive instead with the following parameters:
```
tcp_keepalive=yes
tcp_keepcnt=6
tcp_keepidle=60
tcp_keepintvl=10
```
and set up KEEPALIVE_MECHANISM_NONE:
`modparam("websocket", "keepalive_mechanism", 0)`
During load testing and debugging, when 8k clients sent registrations, it was found out that shared memory was not freed after closing connections (_ws_connection_list_t *wsconn_used_list_ variable in ws_conn.c ).
### Possible Solutions
I've decided to add new keepalive mechanism that periodically checks TCP connection related to websocket:
```
enum
{
KEEPALIVE_MECHANISM_NONE = 0,
KEEPALIVE_MECHANISM_PING = 1,
KEEPALIVE_MECHANISM_PONG = 2,
KEEPALIVE_MECHANISM_TCP_CONN_CHECK = 3
};
```
and added the line to config:
```
# Enable custom tcp-connection-health based keepalive mechanism (3)
# KEEPALIVE_MECHANISM_NONE = 0,
# KEEPALIVE_MECHANISM_PING = 1,
# KEEPALIVE_MECHANISM_PONG = 2
# KEEPALIVE_MECHANISM_TCP_CONN_CHECK = 3
modparam("websocket", "keepalive_mechanism", 3)
```
Also, I've implemented the mechanism in ws_keepalive function:
```
void ws_keepalive(unsigned int ticks, void *param)
{
int check_time =
(int)time(NULL) - cfg_get(websocket, ws_cfg, keepalive_timeout);
ws_connection_t **list = NULL, **list_head = NULL;
ws_connection_t *wsc = NULL;
/* get an array of pointer to all ws connection */
list_head = wsconn_get_list();
if(!list_head)
return;
list = list_head;
wsc = *list_head;
while(wsc && wsc->last_used < check_time) {
if (ws_keepalive_mechanism == KEEPALIVE_MECHANISM_TCP_CONN_CHECK) {
struct tcp_connection *con = tcpconn_get(wsc->id, 0, 0, 0, 0);
if(!con) {
LM_INFO("tcp connection has been lost\n");
wsc->state = WS_S_CLOSING;
}
}
if(wsc->state == WS_S_CLOSING || wsc->awaiting_pong) {
LM_INFO("forcibly closing connection\n");
wsconn_close_now(wsc);
} else {
int opcode = (ws_keepalive_mechanism == KEEPALIVE_MECHANISM_PING)
? OPCODE_PING
: OPCODE_PONG;
ping_pong(wsc, opcode);
}
wsc = *(++list);
}
wsconn_put_list(list_head);
}
```
and changed memory allocation method in wsconn_get_list and wsconn_put_list methods from pkg to shm, because, as it turned out during load testing, using pkg_malloc (the C malloc) in this functions may cousing fails under serious loads.
These modifications solved the problem. But about a week ago we've started switching to ver. 5.2.1 and found a lot of changes in the websocket module. So, I've added my changes in this commit https://github.com/korizza/kamailio/commit/b3e03d03574ff4ff076005bb8a01d746… . Please take a look.
### Additional Information
Adding ws_conn_put_id in this commit https://github.com/kamailio/kamailio/commit/a975bca1702ea2f3db47f834f7e4da2… did not solve problem with ref counter increasing.
--
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/1892
Hi,Kamailio Community
Is there a bug when we assign new value to $fU pseudo-variable multi time?
My scenery is according below:
In a point on config file, let us that $fU value is: 7777. When I do assign:
.....
$fU = "5555" + $fU; ### Here $fU = 55557777
.....
In another point, let us that value $sht(htble=>$var(nnnn)) hold is:
44444444. And I do:
.....
$fU = $sht(htble=>$var(nnnn)); #### Here, it seems that this is
happening $fU = 5555777744444444
.....
When I turn on ngrep analysis, I catch From header:
.................
.................
From: "User Name" <sip:5555777744444444@IP-Address>
.................
.................
This two assignments are realizing on same route block.
So, it seems to be a bug.
Best Regards,
CMA
### Description
When Kamailio starts up with app_python3 enabled, multiple threading exceptions appear in the log after forking. The same setup previously using app_python2 exhibits no such errors.
### Expected behavior
When Kamailio starts up with app_python3 enabled, everything is successful.
#### Actual observed behavior
When Kamailio starts up with app_python3 enabled, exceptions in the Python interpreter are logged.
#### Debugging Data
#### Log Messages
[dump.log](https://github.com/kamailio/kamailio/files/3027162/dump.log)
#### SIP Traffic
N/A
### Possible Solutions
The errors may or may not be benign (and thus safe to ignore), routing still appear to work.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.2.2 (x86_64/linux)
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_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 6.3.0
```
* **Operating System**:
Debian GNU/Linux 9 (stretch)
```
Linux 4e0ff3e84062 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 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/1916
### Description
Same exact configuration that works with kamailio5.1+rtpengine7 does NOT work on 5.2
#### Reproduction
I'm using https://github.com/davidcsi/kamailio-private-public/blob/master/README.md and i used kamailio's 5.0, 5.1 from the kamailio's debian repo. Both start properly.
When i switched to 5.2 it won't start, complaining it's running out of memory, but no matter how much memory I'd add, it just won't start.
#### Log Messages
kamailio's log
https://github.com/davidcsi/kamailio-private-public/blob/master/kamailio52-…
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
root@ip-10-0-210-226:~# kamailio -v
version: kamailio 5.2.2 (x86_64/linux)
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_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 6.3.0
```
* **Operating System**:
Debian stretch 9
```
root@ip-10-0-210-226:~# uname -a
Linux ip-10-0-210-226 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) 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/1940
If I do a substring operation where I extract the middle of a string, I occasionally get results that are not correct. Example code:
$var(x) = $(var(y){s.substr,1,5});
This seems to be the same issue as: http://sip-router.1086192.n5.nabble.com/PATCH-Memory-corruption-using-s-sub…
This issue had a fix which added "tr_string_clone_result" in numerous exit points in pv_trans.c: https://github.com/kamailio/kamailio/commit/fe7e4a5152674aa9c81c09dd2fc9938…
It seemed to be missing at the exit path for the substring operation which may explain my observation. See:
https://github.com/kamailio/kamailio/blob/master/src/modules/pv/pv_trans.c#…
I also notice that this is not used in some other string operations which leads me to wonder if this problem is more prevalent (likely, since I've heard reports of similar symptoms with the replace).
Suggestion:
Investigate if we can have this "tr_string_clone_result" called here and remove all other occurrences in the switch clause.
--
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/1937