The setting "keep_proxy_rr" will add the Record-Route headers added by the
proxy to the route_set stored in the dialog. When in use, sending locally
generated in-dialog requests will loop back to the proxy with a proper
Record-Route header, including any parameters.
<!-- 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 you're unsure about any of these, don't 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 on 5.1, compile tested on master
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1832
-- Commit Summary --
* dialog: Add setting to loop BYE through proxy
-- File Changes --
M src/modules/dialog/dialog.c (9)
M src/modules/dialog/dlg_handlers.c (29)
M src/modules/dialog/dlg_handlers.h (2)
M src/modules/dialog/dlg_hash.c (82)
M src/modules/dialog/dlg_hash.h (9)
M src/modules/dialog/doc/dialog_admin.xml (36)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1832.patchhttps://github.com/kamailio/kamailio/pull/1832.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/1832
We are having problems in our environment with the way rtpengine distributes RTP sessions. It doesn't provide a good enough distribution among RTP nodes and this is mostly because the current algorithm is quite simple, doing the sum of the characters in the callid and after that applying a 0xFF mask over this(which contributes even more to the distribution of this algorithm). This may affect our systems under heavy load and we've been looking for an alternative.
To have something to compare I have designed a tesing application in which I generate CallIds, apply a hashing algorithm and assign the result to a set/node. For example I have 10 nodes each of weight 10. Let's say hash value is 125 I do 125 mod (10 * 10) = 25 therefore the hash will go to node 3.
I've been running some tests over various hashing algorithms such as: SHA 256, jenkins(simple hashing algorithm found on wikipedia), md5, sha1, ripemd, crc32 and the one used in the rtpengine. For each algorithm I test from 1000 randomly generated callids to 10 million with a multiplyer of 10(5 tests for each algorithm). The callIds have 16 randomly generated bytes and 16 fixed bytes which are always the same. This way I'm trying to reproduce the way callIds are generated most of them containing a randomly generated part and a fixed part.
>From the results I can tell for sure that multiple rounded hashing algorithms from libssl(md5, sha1, ripemd, sha 2) offer a much better distribution than a trivial hashing function so we're looking to change the current algorithm with SHA 1 because SHA 2 takes more time without significant improvement.
It would be nice to push this upstream, but there are some issues. First, using these functions, rtpengine module will depend on libssl. What is your opinion about this? I've looked if we can copy any of the algos from libssl into the code but this is not as easy as it seems. Secondly, if you agree to replacing the algorithm, how would you approach the issue: only replace the current one or add the posibility for the user to select between multiple algorithms?
Any suggestion of testing scenarios or hashing algorithms that we've not considered is much welcome.
The results of the tests are attached to his post.
[h_funcs_compare.txt](https://github.com/kamailio/kamailio/files/3014285/h_f…
--
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/1911
Long time ago I have added in the configuration:
latency_limit_db=500
After the upgrade from version 5.1.7 to version 5.1.8, kamailio started printing a lot of log lines related to db slow query:
<core> [db_query.c:68]: db_do_submit_query(): alert - query execution too long [1136 us]
<core> [db_query.c:68]: db_do_submit_query(): alert - query execution too long [914 us]
<core> [db_query.c:68]: db_do_submit_query(): alert - query execution too long [741 us]
<core> [db_query.c:68]: db_do_submit_query(): alert - query execution too long [621 us]
It seems that after the upgrade the latency_limit_db parameter configuration changed from milliseconds to microseconds.
Here the commit that probably caused the issue:
https://github.com/kamailio/kamailio/commit/ce8d36f301d7688255597a67693e47d…
If a fix is released, please backport it till 5.1 branch.
Thank you.
Marco
--
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/1956
I have compiled this app_java module on my debian buster, there's still a memory leak problem to solve :
core> [core/route.c:872]: fix_actions(): fixing xlog()
May 31 15:15:03 PROXY-TEST-01 /usr/sbin/kamailio[16509]: CRITICAL: <core> [core/mem/q_malloc.c:144]: qm_debug_check_frag(): BUG: qm: prev. fragm. tail overwritten(55c775816cd0, abcdefed)[0x7f64aa9c9d80:0x7f64aa9c9db8]! Memory allocator was called from xlog: xlog.c:498. Fragment marked by core: db_res.c:88. Exec from core/mem/q_malloc.c:384
<!-- 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 you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] 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
- [ ] 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 -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1971
-- Commit Summary --
* gcj is no more let's use openjdk
-- File Changes --
M src/modules/app_java/Makefile (21)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1971.patchhttps://github.com/kamailio/kamailio/pull/1971.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/1971
i try script:
```
$var(some_string) = 'a=foo1;b=foo2;c=foo3,4,5;d=3';
$var(c_value) = $(var(some_string){param.value,c,;});
xlog("L_INFO", "'c' param from '$var(some_string)' is '$var(c_value)'");
```
in log:
> 'c' param from 'a=foo1;b=foo2;c=foo3,4,5;d=3' is 'foo3'
Has this behaviour any reason? or it's possible to delete comma from stop list (and use separator parameter for comma-delimited list)?
```
diff --git a/parser/parse_param.c b/parser/parse_param.c
index b9e0fbc..e7784c8 100644
--- a/parser/parse_param.c
+++ b/parser/parse_param.c
@@ -355,7 +355,6 @@ static inline int parse_token_param(str* _s, str* _r, char separator)
case '\t':
case '\r':
case '\n':
- case ',':
/* So if you find
* any of them
* stop iterating
```
---
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/648
<!--
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