### Description
By using the WebSocket module we noticed that the memory on the server keeps increasing daily even if the number of registered devices is decreasing
### Troubleshooting
#### Reproduction
Connect to the server through the wss and then disable the network adapter.
#### Debugging Data
If the TCP connection is closed forcefully (tested by disabling network adapter) then the number of current wss connections is not decreasing:
```
kamcmd stats.get_statistics all | grep "ws_current_connections"
```
The same happens with the allocated shared memory:
```
kamcmd mod.stats all shm | grep 'wsconn_'
```
wsconn_add(198) - this value is not decreasing.
Everything is working properly if the TCP connection is properly closed.
* **Operating System**:
```
CentOS 7 X64
3.10.0-1160.76.1.el7.x86_64
version: kamailio 5.6.1 (x86_64/linux) d8f98b
```
XHTTP Request Route:
```
event_route[xhttp:request] {
set_reply_close();
set_reply_no_connect();
if (ws_handle_handshake()) {
xlog("L_INFO", "[$cfg(route)] websocket|log|handled HTTP request $rm from $si:$sp\n");
exit;
}
}
```
TCP Settings:
```
tcp_connection_lifetime=3605
tcp_accept_no_cl=yes
tcp_rd_buf_size=16384
tcp_connect_timeout=10
tcp_crlf_ping=yes
tcp_delayed_ack = yes
tcp_fd_cache = yes
tcp_keepalive = yes
tcp_keepcnt = 3
tcp_keepidle = 30
tcp_keepintvl = 10
tcp_accept_aliases=no
tcp_async=yes
tcp_linger2=30
tcp_max_connections=4096
tcp_send_timeout = 10
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3236
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3236(a)github.com>
Hello,
Kamailio SIP Server v5.5.5 stable release is out.
This is a maintenance release of the stable branch 5.5 that
includes fixes since the release of v5.5.4. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.5.x. Deployments running previous v5.5.x
versions are strongly recommended to be upgraded to v5.5.5.
Note that 5.5 is the second last stable branch, still officially maintained
by Kamailio development team. The latest stable branch is 5.6, with
v5.6.1 being release out of it.
For more details about version 5.5.5 (including links and guidelines to
download the tarball or from GIT repository), visit:
* https://www.kamailio.org/w/2022/09/kamailio-v5-5-5-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
Oct 10-13, 2022 (Europe Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
Hello,
I am considering to release Kamailio v5.5.5 soon, likely on Monday or
Tuesday next week (Sep 19 or 20, 2022). This is the usual heads up
notification to see if anyone is aware of issues not yet reported to bug
tracker and if yes, do it as soon as possible to give them a chance to
be fixed.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
Oct 10-13, 2022 (Europe Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
#### 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 #XXXX (replace XXXX with an open issue number)
#### Description
rx_aar: unreference dialog in case of aar update
release the dialog reference even for aar updates as the dialog was
already referenced when issuing the aar request
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3244
-- Commit Summary --
* rx_aar: unreference dialog in case of aar update (#3104)
* ims_qos: fix compilation warning
-- File Changes --
M src/modules/ims_qos/rx_aar.c (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3244.patchhttps://github.com/kamailio/kamailio/pull/3244.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3244
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3244(a)github.com>
#### 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 #XXXX (replace XXXX with an open issue number)
#### Description
rx_aar: unreference dialog in case of aar update
release the dialog reference even for aar updates as the dialog was
already referenced when issuing the aar request
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3245
-- Commit Summary --
* rx_aar: unreference dialog in case of aar update (#3104)
-- File Changes --
M src/modules/ims_qos/rx_aar.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3245.patchhttps://github.com/kamailio/kamailio/pull/3245.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3245
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3245(a)github.com>
<!-- 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
- [x] Small bug fix (non-breaking change which fixes an issue)
#### 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 #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
I found how the indexes could get mixed up between the call to ds_sorted_by_priority() and ds_manage_routes_fill_reordered_xavp() resulting in invalid gateway list selection.
```
// TEST logs
I made some tests with 3 and 6 gateways, disabling one and then two.
Some test data :
INSERT INTO dispatcher VALUES(1,1,'sip:[192.168.0.1:5060](http://192.168.0.1:5060/)',0,12,'','');
INSERT INTO dispatcher VALUES(2,1,'sip:[192.168.0.2:5060](http://192.168.0.2:5060/)',0,12,'','');
INSERT INTO dispatcher VALUES(3,1,'sip:[192.168.0.3:5060](http://192.168.0.3:5060/)',0,12,'','');
INSERT INTO dispatcher VALUES(4,1,'sip:[192.168.0.4:5060](http://192.168.0.4:5060/)',0,12,'','');
INSERT INTO dispatcher VALUES(5,1,'sip:[192.168.0.5:5060](http://192.168.0.5:5060/)',0,12,'','');
INSERT INTO dispatcher VALUES(6,1,'sip:[192.168.0.6:5060](http://192.168.0.6:5060/)',0,12,'','');
Then disabling 2 gateways :
dispatcher.set_state i 1 sip:[192.168.0.1:5060](http://192.168.0.1:5060/)
dispatcher.set_state i 1 sip:[192.168.0.3:5060](http://192.168.0.3:5060/)
// ----------------- Routing Logic -----------------
//
route {
xinfo("[MAIN][$rm][$ci]from[$fU]to[$tU]ruri[$ru]Rp[$Rp]Ri[$Ri]\n");
if (!ds_select_dst("1","13", "-1")) {
xinfo("[MAIN] no gateway available !\n");
}
while (defined $xavp(_dsdst_)) {
xinfo("[MAIN] URI : $xavp(_dsdst_=>uri) \n");
pv_unset("$xavp(_dsdst_)");
}
return;
}
// Logs showing the gateways returned.
0(398491) DEBUG: dispatcher [dispatch.c:2263]: ds_manage_route_algo13(): [active][0]idx[1]uri[sip:[192.168.0.5:5060](http://192.168.0.5:5060/)]priority[12-0=12]latency[0ms]flag[0]
0(398491) DEBUG: dispatcher [dispatch.c:2263]: ds_manage_route_algo13(): [active][1]idx[2]uri[sip:192.168.0.4:5060]priority[12-0=12]latency[0ms]flag[0]
0(398491) DEBUG: dispatcher [dispatch.c:2270]: ds_manage_route_algo13(): [inactive][2]idx[-1]uri[sip:192.168.0.3:5060]priority[12]latency[0ms]flag[1]
0(398491) DEBUG: dispatcher [dispatch.c:2263]: ds_manage_route_algo13(): [active][3]idx[4]uri[sip:192.168.0.2:5060]priority[12-0=12]latency[0ms]flag[0]
0(398491) DEBUG: dispatcher [dispatch.c:2270]: ds_manage_route_algo13(): [inactive][4]idx[-1]uri[sip:192.168.0.1:5060]priority[12]latency[0ms]flag[1]
0(398491) DEBUG: dispatcher [dispatch.c:2263]: ds_manage_route_algo13(): [active][5]idx[0]uri[sip:192.168.0.6:5060]priority[12-0=12]latency[0ms]flag[0]
0(398491) DEBUG: dispatcher [dispatch.c:2128]: ds_manage_routes_fill_reordered_xavp(): [4|sip:192.168.0.3:5060|idx:-1]skipped 1 || 1
0(398491) DEBUG: dispatcher [dispatch.c:2128]: ds_manage_routes_fill_reordered_xavp(): [5|sip:192.168.0.1:5060|idx:-1]skipped 1 || 1
0(398491) DEBUG: dispatcher [dispatch.c:2300]: ds_manage_route_algo13(): priority[12]gateway_selected[1]next_index[2]
0(398491) DEBUG: dispatcher [dispatch.c:2465]: ds_manage_routes(): using alg [13] hash [1]
0(398491) DEBUG: dispatcher [dispatch.c:2512]: ds_manage_routes(): selected [13-1-0/1] <sip:[192.168.0.5:5060](http://192.168.0.5:5060/)>
0(398491) DEBUG: dispatcher [dispatch.c:2107]: ds_select_dst_limit(): selected target destinations: 4
0(398491) INFO: <script>: [MAIN][sip:[192.168.0.5:5060](http://192.168.0.5:5060/)]
0(398491) INFO: <script>: [MAIN] URI : sip:192.168.0.5:5060
0(398491) INFO: <script>: [MAIN] URI : sip:[192.168.0.4:5060](http://192.168.0.4:5060/)
0(398491) INFO: <script>: [MAIN] URI : sip:[192.168.0.2:5060](http://192.168.0.2:5060/)
0(398491) INFO: <script>: [MAIN] URI : sip:[192.168.0.6:5060](http://192.168.0.6:5060/)
```
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3232
-- Commit Summary --
* dispatcher: fix alog13 gateway selections
-- File Changes --
M src/modules/dispatcher/dispatch.c (32)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3232.patchhttps://github.com/kamailio/kamailio/pull/3232.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3232
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3232(a)github.com>
#### 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:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
The purpose of this pull request is to allow, when generating rpm's, the possibility of history/autocomplete to be seen in the interactive mode of kamcmd.
The proposed solution is to ensure that the readline-devel library is a requirement when building Kamailio, thus ensuring that kamcmd is compiled with this library.
Currently the specfile has as BuildRequires, the pkgconfig library. This library is installed by the readline-devel library (via ncurses-devel dependency), i.e. all existing logic remains unchanged. Furthermore, the readline-devel library is accessible on all distros that use this specfile, namely: Centos, Fedora, OpenSuse, RedHat.
Initially in my testing, I thought I needed to change the Makefile of kamcmd to look at mock path’s (find path of readline.h), but this is not necessary (at least in CentOS).
The possibility of adopting this solution in later branches would be useful, especially in the case of branch 5.6.1.
The tests were performed in a CentOS 7 environment (docker image), following the usual process for generating the rpm's (make rpm). This solution was tested on branch 5.5.4 and on master. In both cases, the history/autocomplete is successfully visible in the interactive mode of kamcmd.
```Shell Script
[root@kamailio-build kamailio]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
[root@kamailio-build kamailio]# uname -a
Linux kamailio-build 5.10.124-linuxkit #1 SMP PREEMPT Thu Jun 30 08:18:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
```
I would appreciate if you could evaluate this solution, since the presence of the autocomplete in kamcmd is very useful. Feel free to adopt changes to the proposed solution.
Thanks.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3233
-- Commit Summary --
* pkg/kamailio/obs: added readline-devel build dependency
-- File Changes --
M pkg/kamailio/obs/kamailio.spec (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3233.patchhttps://github.com/kamailio/kamailio/pull/3233.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3233
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3233(a)github.com>
Module: kamailio
Branch: master
Commit: 8bdee74fa6b68012919ddbb403da372187631bd9
URL: https://github.com/kamailio/kamailio/commit/8bdee74fa6b68012919ddbb403da372…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-16T16:42:16+02:00
core: helper function to get address family name
---
Modified: src/core/ip_addr.c
Modified: src/core/ip_addr.h
---
Diff: https://github.com/kamailio/kamailio/commit/8bdee74fa6b68012919ddbb403da372…
Patch: https://github.com/kamailio/kamailio/commit/8bdee74fa6b68012919ddbb403da372…
---
diff --git a/src/core/ip_addr.c b/src/core/ip_addr.c
index 77ac233eee..9c91c60e4e 100644
--- a/src/core/ip_addr.c
+++ b/src/core/ip_addr.c
@@ -717,6 +717,22 @@ char* get_proto_name(unsigned int proto)
}
}
+/** get address family name (asciiz).
+ * @param af - address family id
+ * @return string with the adderess family name or "unknown".
+ */
+char* get_af_name(unsigned int af)
+{
+ switch(af) {
+ case AF_INET:
+ return "IPv4";
+ case AF_INET6:
+ return "IPv6";
+ default:
+ return "unknown";
+ }
+}
+
/**
* match ip address with net address and bitmask
diff --git a/src/core/ip_addr.h b/src/core/ip_addr.h
index 4fcdebbe3e..7f910a49ce 100644
--- a/src/core/ip_addr.h
+++ b/src/core/ip_addr.h
@@ -304,6 +304,8 @@ char* get_proto_name(unsigned int proto);
int get_valid_proto_string(unsigned int iproto, int utype, int vtype,
str *sproto);
+char* get_af_name(unsigned int af);
+
#ifdef USE_MCAST
/* Returns 1 if the given address is a multicast address */
int is_mcast(struct ip_addr* ip);
<!-- 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
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Exported some functions to kemi. Currently testing.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3235
-- Commit Summary --
* ratelimit: export functions to kemi
* siputils: export is_gruu() to kemi
* dialplan: export dp_translate to kemi
-- File Changes --
M src/modules/dialplan/dialplan.c (90)
M src/modules/ratelimit/ratelimit.c (33)
M src/modules/siputils/siputils.c (10)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3235.patchhttps://github.com/kamailio/kamailio/pull/3235.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3235
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3235(a)github.com>
Hello,
you can use something like this:
$ cd kamailio
$ make modules modules=src/modules/sca
make -C src/ modules modules=modules/sca
make[1]: Entering directory '/home/henning/repositories/kamailio/src'
[..]
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>
From: sr-users <sr-users-bounces(a)lists.kamailio.org> On Behalf Of Satyaprakash Chiramchetty
Sent: Wednesday, September 14, 2022 12:52 PM
To: sr-users(a)lists.kamailio.org
Subject: [SR-Users] Modules changes query
Hi team,
I have added a few lines more in the SCA module, So if I want to compile again only the sca, So what command I need to use?
Thanks and Regards,
Satyaprakash.
[https://ecosmobnew.ecosmob.net/wp-content/uploads/2022/09/Mix-Event-Signatu…]<https://www.ecosmob.com/>
Disclaimer
In addition to generic Disclaimer which you have agreed on our website, any views or opinions presented in this email are solely those of the originator and do not necessarily represent those of the Company or its sister concerns. Any liability (in negligence, contract or otherwise) arising from any third party taking any action, or refraining from taking any action on the basis of any of the information contained in this email is hereby excluded.
Confidentiality
This communication (including any attachment/s) is intended only for the use of the addressee(s) and contains information that is PRIVILEGED AND CONFIDENTIAL. Unauthorized reading, dissemination, distribution, or copying of this communication is prohibited. Please inform originator if you have received it in error.
Caution for viruses, malware etc.
This communication, including any attachments, may not be free of viruses, trojans, similar or new contaminants/malware, interceptions or interference, and may not be compatible with your systems. You shall carry out virus/malware scanning on your own before opening any attachment to this e-mail. The sender of this e-mail and Company including its sister concerns shall not be liable for any damage that may incur to you as a result of viruses, incompleteness of this message, a delay in receipt of this message or any other computer problems.
Hello,
Kamailio SIP Server v5.4.9 stable release is out.
This is a maintenance release of the old stable branch, 5.4, that
includes fixes since the release of v5.4.8. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.4.x. Deployments running previous v5.4.x
versions are strongly recommended to be upgraded to v5.4.9 or even
better to v5.5.x or 5.6.x series.
For more details about version 5.4.9 (including links and guidelines to
download the tarball or from GIT repository), visit:
* https://www.kamailio.org/w/2022/09/kamailio-v5-4-9-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Note: the branch 5.4 is an old stable branch, v5.4.9 being the last
planned release out of it, to mark the end of official maintenance.
The maintained stable branches are now 5.5 and 5.6, at this time with
v5.6.1 being the latest stable release.
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.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.kamailio.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 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 a cluster of 2 Kamailios nodes on debian 9 + Kamailio 5.5.4.
We have installed a 3rd server on debian 11 + Kamailio 5.6.1 but it keeps crashing due to an issue with DMQ USRLOC
### Troubleshooting
#### Reproduction
We don't know how to reproduce but this is currently happening constantly on our new server
#### 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.
-->
Kamailio generates a core on each segfault:
```
-rw------- 1 kamailio kamailio 556M Sep 15 02:42 core.kamailio.7507.csbc03.example.com.1663227725
-rw------- 1 kamailio kamailio 556M Sep 15 02:42 core.kamailio.7576.csbc03.example.com.1663227733
-rw------- 1 kamailio kamailio 556M Sep 15 02:42 core.kamailio.7642.csbc03.example.com.1663227739
-rw------- 1 kamailio kamailio 556M Sep 15 02:42 core.kamailio.7708.csbc03.example.com.1663227746
-rw------- 1 kamailio kamailio 556M Sep 15 02:42 core.kamailio.7772.csbc03.example.com.1663227753
```
But they seem to be empty?
```
root@csbc03:/var/tmp# gdb core.kamailio.7772.csbc03.example.com.1663227753
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
"0x7ffec5273ce0s": not in executable format: file format not recognized
(gdb) bt full
No stack.
(gdb) quit
root@csbc03:/var/tmp#
```
Very similar output for any of the other core files when In run `bt full`.
I confirmed debug symbols were installed:
```
root@csbc03:/var/tmp# dpkg -l | grep kam | grep dbg
ii kamailio-dbg:amd64 5.6.1+bpo11 amd64 very fast and configurable SIP server [debug symbols]
root@csbc03:/var/tmp#
```
#### 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).
-->
/var/log/syslog
```
[ 501.251476] kamailio[7772]: segfault at f8 ip 00007f86ded9bf72 sp 00007ffd892eb7c0 error 4 in dmq_usrloc.so[7f86ded89000+17000]
[ 501.251496] Code: 40 38 01 d0 89 05 12 95 00 00 48 8b 05 cf 8f 00 00 8b 00 83 f8 01 0f 85 80 00 00 00 48 8b 85 48 ff ff ff 48 8b 80 a0 00 00 00 <8b> 90 f8 00 00 00 48 8b 85 48 ff ff ff 48 8b 80 a0 00 00 00 48 8b
```
/var/log/kamailio/kamailio.lorg
```
Sep 15 02:42:34 csbc03 csbc[7792]: CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 59
Sep 15 02:42:36 csbc03 csbc[7736]: ALERT: <core> [main.c:774]: handle_sigs(): child process 7772 exited by a signal 11
Sep 15 02:42:36 csbc03 csbc[7736]: ALERT: <core> [main.c:777]: handle_sigs(): core was generated
```
#### 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`
```
root@csbc03:/var/tmp# kamailio -v
version: kamailio 5.6.1 (x86_64/linux)
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: unknown
compiled with gcc 10.2.1
root@csbc03:/var/tmp#
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
Debian 11 Bullseye
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3238
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3238(a)github.com>
Hello,
I am planning to release a new version from branch 5.4, respectively
5.4.9, sometime soon, maybe on Friday or Monday.
Unless a major regression comes out with this release, this is going to
be the last official packaged version from branch 5.4. The latest two
stable branches 5.5 and 5.6 will be maintained further.
As usual, if anyone is aware of issues not yet reported to bug tracker
or missing backports, report them in order to try to get the fixes in
this release.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Hi,
The "--cfg-print" CLI option is not documented in Kamailio 5.6 Cookbook.
I'm sorry but I don't know how to add it by myself...
Leonid
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3239
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3239(a)github.com>
Module: kamailio
Branch: 5.6
Commit: 2b1a5ffb75566fb9411b23be23b263986b3eafaa
URL: https://github.com/kamailio/kamailio/commit/2b1a5ffb75566fb9411b23be23b2639…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-15T10:28:03+02:00
dmq: docs - note about using same Kamailio version
(cherry picked from commit 1fd789246cc7c58237b9a903a198521cd5b3494d)
---
Modified: src/modules/dmq/doc/dmq_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/2b1a5ffb75566fb9411b23be23b2639…
Patch: https://github.com/kamailio/kamailio/commit/2b1a5ffb75566fb9411b23be23b2639…
---
diff --git a/src/modules/dmq/doc/dmq_admin.xml b/src/modules/dmq/doc/dmq_admin.xml
index 661fd4b8471..7a2c933c62f 100644
--- a/src/modules/dmq/doc/dmq_admin.xml
+++ b/src/modules/dmq/doc/dmq_admin.xml
@@ -47,6 +47,11 @@
Nodes that are not responding to KDMQ reguests are removed the from local
list of active nodes, no longer being considered to be part of the KDMQ cluster.
</para>
+ <para>
+ IMPORTANT: DMQ must be used only between Kamailio instances having same
+ major version. Internal structures can be incompatible between different
+ major versions and can lead to crashes or unexpected behaviour.
+ </para>
<example>
<title>KDMQ Request Example</title>
<para>
Module: kamailio
Branch: 5.6
Commit: 961b62fc1ced8e7015052c97bf288a560d50e7f7
URL: https://github.com/kamailio/kamailio/commit/961b62fc1ced8e7015052c97bf288a5…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-09-15T10:46:34+02:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/dmq/README
---
Diff: https://github.com/kamailio/kamailio/commit/961b62fc1ced8e7015052c97bf288a5…
Patch: https://github.com/kamailio/kamailio/commit/961b62fc1ced8e7015052c97bf288a5…
---
diff --git a/src/modules/dmq/README b/src/modules/dmq/README
index 10f0f7f80a..b79a6c2759 100644
--- a/src/modules/dmq/README
+++ b/src/modules/dmq/README
@@ -28,6 +28,9 @@ Charles Chance
1. Admin Guide
1. Overview
+
+ 1.1. KDMQ Request
+
2. Dependencies
2.1. Kamailio Modules
@@ -99,6 +102,9 @@ Chapter 1. Admin Guide
Table of Contents
1. Overview
+
+ 1.1. KDMQ Request
+
2. Dependencies
2.1. Kamailio Modules
@@ -131,6 +137,8 @@ Chapter 1. Admin Guide
1. Overview
+ 1.1. KDMQ Request
+
The DMQ module implements a distributed message queue on top of
Kamailio in order to facilitate data propagation and replication
between multiple instances, referred as "nodes" (or "peers").
@@ -166,11 +174,16 @@ Chapter 1. Admin Guide
different major versions and can lead to crashes or unexpected
behaviour.
- Example 1.1. KDMQ Request Example
+1.1. KDMQ Request
+
+ KDMQ messages can have different format and content for R-URI username,
+ headers and body, being specific to each component that leverages DMQ
+ to replicate data, such as htable, dialog or usrloc modules.
- This request is generated for DMQ peers availability notifications.
- Other messages can be produced by various modules, with different R-URI
- username and body content, such as htable, dialog or usrloc modules.
+ Next request is generated by DMQ module for peers availability
+ notifications.
+
+ Example 1.1. KDMQ Request Example
...
KDMQ sip:notification_peer@192.168.40.15:5090 SIP/2.0
Module: kamailio
Branch: master
Commit: 95e0fe85ff9149c80249e848a437deb5dae2e463
URL: https://github.com/kamailio/kamailio/commit/95e0fe85ff9149c80249e848a437deb…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-09-15T10:46:17+02:00
modules: readme files regenerated - dmq ... [skip ci]
---
Modified: src/modules/dmq/README
---
Diff: https://github.com/kamailio/kamailio/commit/95e0fe85ff9149c80249e848a437deb…
Patch: https://github.com/kamailio/kamailio/commit/95e0fe85ff9149c80249e848a437deb…
---
diff --git a/src/modules/dmq/README b/src/modules/dmq/README
index 10f0f7f80a..b79a6c2759 100644
--- a/src/modules/dmq/README
+++ b/src/modules/dmq/README
@@ -28,6 +28,9 @@ Charles Chance
1. Admin Guide
1. Overview
+
+ 1.1. KDMQ Request
+
2. Dependencies
2.1. Kamailio Modules
@@ -99,6 +102,9 @@ Chapter 1. Admin Guide
Table of Contents
1. Overview
+
+ 1.1. KDMQ Request
+
2. Dependencies
2.1. Kamailio Modules
@@ -131,6 +137,8 @@ Chapter 1. Admin Guide
1. Overview
+ 1.1. KDMQ Request
+
The DMQ module implements a distributed message queue on top of
Kamailio in order to facilitate data propagation and replication
between multiple instances, referred as "nodes" (or "peers").
@@ -166,11 +174,16 @@ Chapter 1. Admin Guide
different major versions and can lead to crashes or unexpected
behaviour.
- Example 1.1. KDMQ Request Example
+1.1. KDMQ Request
+
+ KDMQ messages can have different format and content for R-URI username,
+ headers and body, being specific to each component that leverages DMQ
+ to replicate data, such as htable, dialog or usrloc modules.
- This request is generated for DMQ peers availability notifications.
- Other messages can be produced by various modules, with different R-URI
- username and body content, such as htable, dialog or usrloc modules.
+ Next request is generated by DMQ module for peers availability
+ notifications.
+
+ Example 1.1. KDMQ Request Example
...
KDMQ sip:notification_peer@192.168.40.15:5090 SIP/2.0
Module: kamailio
Branch: 5.6
Commit: 80699e44d2e7849c25e10d125dfce3ea14bc45f8
URL: https://github.com/kamailio/kamailio/commit/80699e44d2e7849c25e10d125dfce3e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-15T10:35:39+02:00
dmq: docs - reorganized the dmq request section
(cherry picked from commit e683ee506d702e9edbe4ce74304170ca04c1d5ec)
---
Modified: src/modules/dmq/doc/dmq_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/80699e44d2e7849c25e10d125dfce3e…
Patch: https://github.com/kamailio/kamailio/commit/80699e44d2e7849c25e10d125dfce3e…
---
diff --git a/src/modules/dmq/doc/dmq_admin.xml b/src/modules/dmq/doc/dmq_admin.xml
index 7a2c933c62..d463fac2d9 100644
--- a/src/modules/dmq/doc/dmq_admin.xml
+++ b/src/modules/dmq/doc/dmq_admin.xml
@@ -52,15 +52,20 @@
major version. Internal structures can be incompatible between different
major versions and can lead to crashes or unexpected behaviour.
</para>
- <example>
- <title>KDMQ Request Example</title>
+ <section>
+ <title>KDMQ Request</title>
<para>
- This request is generated for DMQ peers availability notifications.
- Other messages can be produced by various modules, with different R-URI
- username and body content, such as <emphasis>htable</emphasis>,
- <emphasis>dialog</emphasis> or <emphasis>usrloc</emphasis> modules.
+ KDMQ messages can have different format and content for R-URI username, headers
+ and body, being specific to each component that leverages DMQ to replicate
+ data, such as <emphasis>htable</emphasis>, <emphasis>dialog</emphasis>
+ or <emphasis>usrloc</emphasis> modules.
</para>
- <programlisting format="linespecific">
+ <para>
+ Next request is generated by DMQ module for peers availability notifications.
+ </para>
+ <example>
+ <title>KDMQ Request Example</title>
+ <programlisting format="linespecific">
...
KDMQ sip:notification_peer@192.168.40.15:5090 SIP/2.0
@@ -82,6 +87,7 @@ sip:192.168.40.17:5060;status=active
</programlisting>
</example>
</section>
+ </section>
<section>
<title>Dependencies</title>
Module: kamailio
Branch: master
Commit: e683ee506d702e9edbe4ce74304170ca04c1d5ec
URL: https://github.com/kamailio/kamailio/commit/e683ee506d702e9edbe4ce74304170c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-15T10:35:17+02:00
dmq: docs - reorganized the dmq request section
---
Modified: src/modules/dmq/doc/dmq_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/e683ee506d702e9edbe4ce74304170c…
Patch: https://github.com/kamailio/kamailio/commit/e683ee506d702e9edbe4ce74304170c…
---
diff --git a/src/modules/dmq/doc/dmq_admin.xml b/src/modules/dmq/doc/dmq_admin.xml
index 7a2c933c62..d463fac2d9 100644
--- a/src/modules/dmq/doc/dmq_admin.xml
+++ b/src/modules/dmq/doc/dmq_admin.xml
@@ -52,15 +52,20 @@
major version. Internal structures can be incompatible between different
major versions and can lead to crashes or unexpected behaviour.
</para>
- <example>
- <title>KDMQ Request Example</title>
+ <section>
+ <title>KDMQ Request</title>
<para>
- This request is generated for DMQ peers availability notifications.
- Other messages can be produced by various modules, with different R-URI
- username and body content, such as <emphasis>htable</emphasis>,
- <emphasis>dialog</emphasis> or <emphasis>usrloc</emphasis> modules.
+ KDMQ messages can have different format and content for R-URI username, headers
+ and body, being specific to each component that leverages DMQ to replicate
+ data, such as <emphasis>htable</emphasis>, <emphasis>dialog</emphasis>
+ or <emphasis>usrloc</emphasis> modules.
</para>
- <programlisting format="linespecific">
+ <para>
+ Next request is generated by DMQ module for peers availability notifications.
+ </para>
+ <example>
+ <title>KDMQ Request Example</title>
+ <programlisting format="linespecific">
...
KDMQ sip:notification_peer@192.168.40.15:5090 SIP/2.0
@@ -82,6 +87,7 @@ sip:192.168.40.17:5060;status=active
</programlisting>
</example>
</section>
+ </section>
<section>
<title>Dependencies</title>
Module: kamailio
Branch: 5.6
Commit: 31b538926d89783cf0ef86bfbc588ee39342b433
URL: https://github.com/kamailio/kamailio/commit/31b538926d89783cf0ef86bfbc588ee…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-09-15T10:31:54+02:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/dmq/README
---
Diff: https://github.com/kamailio/kamailio/commit/31b538926d89783cf0ef86bfbc588ee…
Patch: https://github.com/kamailio/kamailio/commit/31b538926d89783cf0ef86bfbc588ee…
---
diff --git a/src/modules/dmq/README b/src/modules/dmq/README
index 1e7d6ff375..10f0f7f80a 100644
--- a/src/modules/dmq/README
+++ b/src/modules/dmq/README
@@ -161,6 +161,11 @@ Chapter 1. Admin Guide
the from local list of active nodes, no longer being considered to be
part of the KDMQ cluster.
+ IMPORTANT: DMQ must be used only between Kamailio instances having same
+ major version. Internal structures can be incompatible between
+ different major versions and can lead to crashes or unexpected
+ behaviour.
+
Example 1.1. KDMQ Request Example
This request is generated for DMQ peers availability notifications.
Module: kamailio
Branch: master
Commit: b7e6b0cc44b46a615dc23b6fae7f67e63296c913
URL: https://github.com/kamailio/kamailio/commit/b7e6b0cc44b46a615dc23b6fae7f67e…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-09-15T10:31:28+02:00
modules: readme files regenerated - dmq ... [skip ci]
---
Modified: src/modules/dmq/README
---
Diff: https://github.com/kamailio/kamailio/commit/b7e6b0cc44b46a615dc23b6fae7f67e…
Patch: https://github.com/kamailio/kamailio/commit/b7e6b0cc44b46a615dc23b6fae7f67e…
---
diff --git a/src/modules/dmq/README b/src/modules/dmq/README
index 1e7d6ff375..10f0f7f80a 100644
--- a/src/modules/dmq/README
+++ b/src/modules/dmq/README
@@ -161,6 +161,11 @@ Chapter 1. Admin Guide
the from local list of active nodes, no longer being considered to be
part of the KDMQ cluster.
+ IMPORTANT: DMQ must be used only between Kamailio instances having same
+ major version. Internal structures can be incompatible between
+ different major versions and can lead to crashes or unexpected
+ behaviour.
+
Example 1.1. KDMQ Request Example
This request is generated for DMQ peers availability notifications.
Module: kamailio
Branch: master
Commit: 1fd789246cc7c58237b9a903a198521cd5b3494d
URL: https://github.com/kamailio/kamailio/commit/1fd789246cc7c58237b9a903a198521…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-15T10:26:38+02:00
dmq: docs - note about using same Kamailio version
---
Modified: src/modules/dmq/doc/dmq_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/1fd789246cc7c58237b9a903a198521…
Patch: https://github.com/kamailio/kamailio/commit/1fd789246cc7c58237b9a903a198521…
---
diff --git a/src/modules/dmq/doc/dmq_admin.xml b/src/modules/dmq/doc/dmq_admin.xml
index 661fd4b8471..7a2c933c62f 100644
--- a/src/modules/dmq/doc/dmq_admin.xml
+++ b/src/modules/dmq/doc/dmq_admin.xml
@@ -47,6 +47,11 @@
Nodes that are not responding to KDMQ reguests are removed the from local
list of active nodes, no longer being considered to be part of the KDMQ cluster.
</para>
+ <para>
+ IMPORTANT: DMQ must be used only between Kamailio instances having same
+ major version. Internal structures can be incompatible between different
+ major versions and can lead to crashes or unexpected behaviour.
+ </para>
<example>
<title>KDMQ Request Example</title>
<para>
Hello,
kamailio.org system needs a reboot and it will become unavailable for a
short time frame about 08:00UTC (20 min from now). Website, mailing
list, wiki, and a few other web services will be affected.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Module: kamailio
Branch: 5.6
Commit: ad753f4657bc72a79fd61b56276de5ae87b3c574
URL: https://github.com/kamailio/kamailio/commit/ad753f4657bc72a79fd61b56276de5a…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-09-14T20:16:27+02:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/acc/README
Modified: src/modules/posops/README
Modified: src/modules/ratelimit/README
Modified: src/modules/usrloc/README
---
Diff: https://github.com/kamailio/kamailio/commit/ad753f4657bc72a79fd61b56276de5a…
Patch: https://github.com/kamailio/kamailio/commit/ad753f4657bc72a79fd61b56276de5a…
---
diff --git a/src/modules/acc/README b/src/modules/acc/README
index 7c31188ac77..1ea4e6f98d0 100644
--- a/src/modules/acc/README
+++ b/src/modules/acc/README
@@ -529,6 +529,11 @@ Note
information given will not be stored in the CDR as they cannot be
accessed by the end of the call when the CDR is logged.
+ The dialog module needs to be engaged on the dialogs that should be
+ accounted, that they will be tracked by the server. This is usally done
+ by calling the function dlg_manage() or setting the dlg_flag. Refer to
+ the documentation of the dialog module for more information.
+
Sometimes, dialogs expire because the UA has a problem and a final
message is never transmitted. You can toggle on/off the generation of
CDR-based logging in such cases with only the dlg_vars showing by using
@@ -1129,7 +1134,7 @@ modparam("acc", "cdr_start_on_confirmed", 1)
6.34. cdr_facility (integer)
Log facility to which CDR messages are issued to syslog. This allows to
- easily seperate CDR-specific logging from the other log messages.
+ easily separate CDR-specific logging from the other log messages.
Default value is LOG_DAEMON.
diff --git a/src/modules/posops/README b/src/modules/posops/README
index 035f807acb8..e7583adc588 100644
--- a/src/modules/posops/README
+++ b/src/modules/posops/README
@@ -214,6 +214,9 @@ pos_insert("100", "10");
Set the char at position index to first character in val.
+ Important: it changes the character directly in the SIP message buffer,
+ the update being immediately visible.
+
The idx can be an integer value or a variable holding an integer. If
the value is negative, the position is counted from the end of the
buffer.
diff --git a/src/modules/ratelimit/README b/src/modules/ratelimit/README
index ecd6fce79a1..4862e717f73 100644
--- a/src/modules/ratelimit/README
+++ b/src/modules/ratelimit/README
@@ -514,5 +514,5 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
The pipes and queues are stored as static vectors, so no more than
MAX_PIPES/MAX_QUEUES can be added without recompilation.
- * MAX_PIPES - 16
- * MAX_QUEUES - 10
+ * MAX_PIPES - 32
+ * MAX_QUEUES - 32
diff --git a/src/modules/usrloc/README b/src/modules/usrloc/README
index d180968e95d..a15bc8c62de 100644
--- a/src/modules/usrloc/README
+++ b/src/modules/usrloc/README
@@ -1113,10 +1113,15 @@ modparam("usrloc", "version_table", 0)
Note: the internal keepalive is for the moment implemented only for
contact records stored in memory.
- Note: it is recommeder to set 'timer_procs' parameter in order to have
+ Note: it is recommended to set 'timer_procs' parameter in order to have
dedicated timer processes for usrloc module and off-load the keepalive
sending process from the core timers.
+ Note: Keepalives will be sent to the IP and port using the transport
+ defined in the âreceivedâ column. If not set, then keepalives will
+ be sent to the AOR using UDP as a default transport. If available, the
+ TCP connection will be re-used for WS, TCP and TLS.
+
Default value is “0 (keepalive disabled)”.
Example 1.50. ka_mode parameter usage
- URL: https://github.com/kamailio/kamailio/commit/98342927e3493a8af6b859ab1cd1877…
Author: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-09-14T18:54:05+02:00
ratelimit: fix docs to actual values in the code for queue and pipe limits
(cherry picked from commit cae9d78a6c8d33f6c4ec780901a55c27260c2000)
- URL: https://github.com/kamailio/kamailio/commit/e8d797cb26e2b16dff3afd7ecb54beb…
Author: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-09-14T18:55:47+02:00
acc: add some explanation that dialogs need to be tracked for CDR accounting
(cherry picked from commit 3ec40d792df5bcee838eee3e5e0e89a2ebdcc453)
- URL: https://github.com/kamailio/kamailio/commit/8aceadf62fde1b1faf414e5d47c4210…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T18:58:47+02:00
core/cfg: cast pointer to long to silent compiler warning
- GH #3208
(cherry picked from commit 26785f866eeadc6944af83ae1a57e8ff100f60f5)
- URL: https://github.com/kamailio/kamailio/commit/a5cbf0bade8ab0b04d1f8e9288b239d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:00:15+02:00
msrp: proper cmap insert when last item has greater citemid
- condition for last item was processed first, resulting in improper
order of items, GH #3215
(cherry picked from commit 1e4bf1dd7fbfc9d51f0e56e98472a42de781cdbd)
- URL: https://github.com/kamailio/kamailio/commit/5bcb685d19b55b3b2046345e195e5de…
Author: Shane Mitchell <sm(a)opencluster.com.au>
Date: 2022-09-14T19:02:39+02:00
dialog: dont reset dlg_db_mode in POSTCHILDINIT for DB_MODE_SHUTDOWN
(cherry picked from commit 8fb25f7cb6fa73dc37fe11df9b921c32009bd107)
- URL: https://github.com/kamailio/kamailio/commit/506e20e6aae21d862f6d643a2c87c74…
Author: Andy Brezinsky <andy.brezinsky(a)mitel.com>
Date: 2022-09-14T19:03:09+02:00
usrloc: re-use TCP connections for keepalive
- Fixes GH #3178. Sets TCP connection id for keepalive based on the value in the database
If unset, tcpconn_id will remain 0 and keepalives will work the same as they do today
- Update documentation to clarify when it will use received vs AOR for keepalive
(cherry picked from commit 06f933ad17aac3a3f0f81cf0e0ab04f38cf60993)
- URL: https://github.com/kamailio/kamailio/commit/9d473f92d3ff534535e6170b8895569…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:04:06+02:00
usrloc: increased the size for keys2 array in ul_ka_db_records()
- consequence of 06f933ad17aac3a3f0f81cf0e0ab04f38cf60993
(cherry picked from commit b5ae633242e5e34b1f6dc8f025e68872b47b461c)
- URL: https://github.com/kamailio/kamailio/commit/5ffbbaa6c956a74665859a709bd6c79…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:05:12+02:00
registrar: print number of contacts and max limit in logs and formatting updates
(cherry picked from commit a88f805236ef0549ce8a8079142b202d569bf3f1)
- URL: https://github.com/kamailio/kamailio/commit/94101dfc2df05f471fdb7ea1e6190f0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:05:26+02:00
registrar: use macro to init str value and more debug messages
(cherry picked from commit 5f229a799b251e82431b4642e9bd8aa76c405d13)
- URL: https://github.com/kamailio/kamailio/commit/addd16c13a0a6ab5cb460850141073d…
Author: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-09-14T19:05:58+02:00
utils: small whitespace fix for Makefile
(cherry picked from commit 3cb1f8eaec344433fd94011ec28da464c5626c2a)
- URL: https://github.com/kamailio/kamailio/commit/4bdd89b4709553e2dde2fb2356ba47d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:06:19+02:00
pv: detect known headers provided with variable for $hfl(...) and $hflc(...)
- GH #3194
(cherry picked from commit fb13cf364870895dec94fa1ddf6a1afd3c099715)
- URL: https://github.com/kamailio/kamailio/commit/33e1638b92c073f58b27232e7985a5f…
Author: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-09-14T19:06:40+02:00
etc/kamailio.cfg: corrected a typo ("endabled"), GH #3223
(cherry picked from commit b46afeca6c515f5baf1812ca821321117df6478b)
- URL: https://github.com/kamailio/kamailio/commit/e44c6716b5d640c489561062ea02545…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:06:54+02:00
pv: parse header name given with variable to $hdr() and $hdrc()
(cherry picked from commit a10da3a8802fd02bab9e8c655aa845d121370fd4)
- URL: https://github.com/kamailio/kamailio/commit/902807e5de185cb6d6463ff617bf4c2…
Author: korayvt <koray.vatansever(a)gmail.com>
Date: 2022-09-14T19:07:29+02:00
core: added parser mode check
(cherry picked from commit 4598f0a0df90ad81e192be55a89fbd5cca52a40e)
- URL: https://github.com/kamailio/kamailio/commit/272060e1079d9edbc819d396dafb203…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:07:48+02:00
usrloc: adde random and pid to call-id for keepalive requests
- GH #3225
(cherry picked from commit 721daf5ca55a8fb366cff2821e249bfff64d8f87)
- URL: https://github.com/kamailio/kamailio/commit/60a62d6f7df233d61d4ccecc39504e7…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:09:04+02:00
acc: duplicate dlg var values used in extra2strar_dlg_only()
- avoid buffer index overlapping and be coherent with extra2strar()
(cherry picked from commit 54905e6b02e36e72bb74a92c77b273cf57822f18)
- URL: https://github.com/kamailio/kamailio/commit/948f066718e102a7d592ef647754ba0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:09:22+02:00
dialog: updated to get the int value for cseq update operations
(cherry picked from commit a070f5c132a68111fade7212db6a2bc738e03193)
- URL: https://github.com/kamailio/kamailio/commit/363a6267c4c50b6e321e59961dedc4a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:09:30+02:00
dialog: safer version for getting dlg variable value
- clone to ensure that reference is not becoming invalid over the time
(cherry picked from commit aded00bbfe75771cef8d0ee9ae8401772f7644a9)
- URL: https://github.com/kamailio/kamailio/commit/38cbf04afa2c02fa2f15bb1528d6b7f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:09:37+02:00
dialog: fetch directly the int value for dlg variable used in dlg_cseq_update()
(cherry picked from commit 8cb948cc07e2d577cdd14efdfe38f3e9bbf11d79)
- URL: https://github.com/kamailio/kamailio/commit/e1deb704bc1df02e4dbdc85d7728acc…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:09:48+02:00
pua_dialoginfo: clone dlg var values
(cherry picked from commit 1553a6c0efb2cec0b5962bba13bc0095211ee75d)
- URL: https://github.com/kamailio/kamailio/commit/89fa86703adfdf6e30dc43c191d7327…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:09:59+02:00
siptrace: use socket name for hep mirroring
- GH #3174
(cherry picked from commit 30c628732092108e8d73856a5c9ec60b16d5ef99)
- URL: https://github.com/kamailio/kamailio/commit/2427f1951a1c63a8c047710d49ef067…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:10:20+02:00
dialog: wrapper function to set a dlg var with unsigned integer parameter
- use it to set cseq diff value
(cherry picked from commit b7dc2ac6d66839b38ba8d6f36e9f28bc0a2d1425)
- URL: https://github.com/kamailio/kamailio/commit/644938a6be5f841634f2e1443e5f123…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:10:29+02:00
dialog: remove strlen() checks when setting a variable
- assumed key->s and val->s are 0-terminated, which may not be the case
(cherry picked from commit 2cebd46f8f2dc3f87c9cfd2054976e347aa75ace)
- URL: https://github.com/kamailio/kamailio/commit/d8c8922ff4dd47a47773e5391e4ce49…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:10:44+02:00
core: kemi - duplicate module name when registering the api exports
(cherry picked from commit 43f764cae870b15a96b8ca88f1eb195d4ceb8455)
- URL: https://github.com/kamailio/kamailio/commit/b0636ff4aaa3f5c21389ca6b99a90be…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:11:20+02:00
core: use unsigned printing for version defines
(cherry picked from commit 3e94dd4bd3901d503c7be655d761f1d70453a451)
- URL: https://github.com/kamailio/kamailio/commit/5edc2cd0f0308099be410f7f34c0c25…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T19:11:46+02:00
posops: docs - updated pos_set_char() section
- note that the change is done directly inside the sip message buffer
(cherry picked from commit c3771966fa8470db91d04323a1e9c837a16a22cf)
Fix typos in kemi exports
<!-- 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/3237
-- Commit Summary --
* dialplan: Fix typos
-- File Changes --
M src/modules/dialplan/dialplan.c (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3237.patchhttps://github.com/kamailio/kamailio/pull/3237.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3237
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3237(a)github.com>
Module: kamailio
Branch: master
Commit: a84e96f2e025a6befd4721ad3f67a104fd594190
URL: https://github.com/kamailio/kamailio/commit/a84e96f2e025a6befd4721ad3f67a10…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-14T08:17:30+02:00
core: added preprocessor directive #!ifexp stm
- conditional evaluation of the statement as an expression with strings
and numbers
- example:
#!ifexp KAMAILIO_VERSION >= 5006000
...
#!else
...
#!endif
- defined IDs can be used inside the expression
- if not defined, value 0 is used
- if defined with value, the value is used
- if defined with no value, value 1 is used
- if expression is evaluated to !=0 or non-empty string, then it is considered true
---
Modified: src/core/cfg.lex
Modified: src/core/ppcfg.c
Modified: src/core/ppcfg.h
---
Diff: https://github.com/kamailio/kamailio/commit/a84e96f2e025a6befd4721ad3f67a10…
Patch: https://github.com/kamailio/kamailio/commit/a84e96f2e025a6befd4721ad3f67a10…
Hello,
I would like to suggest you an implementation of the rpc command dlg.profile_get_size (on a valued profile) that would return a list of values and the number of current dialogs for any of them .
This could be usefull if you want to get stats per customer_id/trunks/ips or whatever and don't want to get the whole table but only the size.
Regards,
David
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2976
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/2976(a)github.com>
When **trace_mode** is set to 1, then **send_sock_name** is not used (it uses the unexpected socket listen socket).
However, when **trace_mode** is set to 4, then **send_sock_name** works correctly.
Also, in both cases, **send_sock_addr** works correctly.
```
listen=udp:SIP_IPADDRESS:SIP_PORT
listen=udp:SIPCAPTURE_IPADDRESS:SIP_PORT name "siptrace_socket"
modparam("siptrace", "duplicate_uri", "sip:10.218.31.205:9060")
modparam("siptrace", "hep_mode_on", 1)
modparam("siptrace", "hep_version", 3)
modparam("siptrace", "hep_capture_id", 110)
modparam("siptrace", "send_sock_name", "siptrace_socket")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "trace_mode", 1)
modparam("siptrace", "trace_to_database", 0)
```
This is tested on Kamailio 5.5.1 and 5.5.3.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3174
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3174(a)github.com>
#### 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
- [ ] 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:
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
`PyErr_SetString` is a void function. It doesn't return NULL.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3231
-- Commit Summary --
* Python: must return NULL on error, not Py_None
* modules/python3: return NULL on error.
-- File Changes --
M src/modules/app_python3/python_msgobj.c (102)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3231.patchhttps://github.com/kamailio/kamailio/pull/3231.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3231
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3231(a)github.com>
We have installed Kamailio 5.6.0 from http://deb.kamailio.org/kamailio56, but it is intermittently crashing with a segfault like this:
May 29 04:46:53 ss2 kernel: [26920.901572] kamailio[1416]: segfault at 43a ip 00007f78d1396ab5 sp 00007ffd2487ca10 error 4 in app_perl.so[7f78d1392000+21000]
May 29 04:46:53 ss2 kernel: [26920.901575] Code: 8b 05 8f 34 02 00 48 8b 00 48 89 c7 e8 7b ff ff ff e8 3f e5 ff ff 48 8b 15 78 34 02 00 48 89 02 48 8b 05 6e 34 02 00 48 8b 00 <0f> b6 90 3a 04 00 00 48 8b 05 5d 34 02 00 48 8b 00 83 ca 02 88 90
May 29 04:46:56 ss2 kernel: [26923.737834] kamailio[1409]: segfault at 43a ip 00007f78d1396ab5 sp 00007ffd2487ca10 error 4 in app_perl.so[7f78d1392000+21000]
May 29 04:46:56 ss2 kernel: [26923.737838] Code: 8b 05 8f 34 02 00 48 8b 00 48 89 c7 e8 7b ff ff ff e8 3f e5 ff ff 48 8b 15 78 34 02 00 48 89 02 48 8b 05 6e 34 02 00 48 8b 00 <0f> b6 90 3a 04 00 00 48 8b 05 5d 34 02 00 48 8b 00 83 ca 02 88 90
Perl is version 5.30.0, and the system is running Ubuntu 20.04. A Perl library is loaded using:
modparam( "app_perl", "filename", "/path/to/our/Kamailio.pm" )
We have not found a core file anywhere on the server. Please let us know what other information you need, thanks.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3134
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3134(a)github.com>
The schedule for Kamailio World Conference Online 2022 has been
published on the event website:
- https://www.kamailioworld.com
The event spans over two days, September 7-8, 2022, with presentations
and open discussion sessions during 12:50-17:00UTC. With the main target
to share the knowledge and connect the community, the conference has
presentations covering use of Kamailio for 5G services, NAT traversal
and integration with RTPEngine, TLS with WolfSSL, end to end testing
testing, controlling SIP message content from KEMI and resources
management for scalability. It is a good balance between established and
new speakers at this edition of Kamailio World Conference.
There is no registration required to join the event, the sessions will
be presented in a live video conferencing room streamed to YouTube
KamailioWorld Channel. A text chat room will be made available for
posting questions and background discussions.
Book the dates in your agenda and prepare for another amazing Kamailio
World Conference! Keep the eye on the event website for updates!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Module: kamailio
Branch: master
Commit: d0e1827b2f8890da4fd30cc23f8bd090227d87f2
URL: https://github.com/kamailio/kamailio/commit/d0e1827b2f8890da4fd30cc23f8bd09…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-09-08T10:31:31+02:00
modules: readme files regenerated - posops ... [skip ci]
---
Modified: src/modules/posops/README
---
Diff: https://github.com/kamailio/kamailio/commit/d0e1827b2f8890da4fd30cc23f8bd09…
Patch: https://github.com/kamailio/kamailio/commit/d0e1827b2f8890da4fd30cc23f8bd09…
---
diff --git a/src/modules/posops/README b/src/modules/posops/README
index 035f807acb..e7583adc58 100644
--- a/src/modules/posops/README
+++ b/src/modules/posops/README
@@ -214,6 +214,9 @@ pos_insert("100", "10");
Set the char at position index to first character in val.
+ Important: it changes the character directly in the SIP message buffer,
+ the update being immediately visible.
+
The idx can be an integer value or a variable holding an integer. If
the value is negative, the position is counted from the end of the
buffer.
Module: kamailio
Branch: master
Commit: c3771966fa8470db91d04323a1e9c837a16a22cf
URL: https://github.com/kamailio/kamailio/commit/c3771966fa8470db91d04323a1e9c83…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-08T10:23:52+02:00
posops: docs - updated pos_set_char() section
- note that the change is done directly inside the sip message buffer
---
Modified: src/modules/posops/doc/posops_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/c3771966fa8470db91d04323a1e9c83…
Patch: https://github.com/kamailio/kamailio/commit/c3771966fa8470db91d04323a1e9c83…
---
diff --git a/src/modules/posops/doc/posops_admin.xml b/src/modules/posops/doc/posops_admin.xml
index 1a38b85c67f..e47d658f995 100644
--- a/src/modules/posops/doc/posops_admin.xml
+++ b/src/modules/posops/doc/posops_admin.xml
@@ -168,6 +168,10 @@ pos_insert("100", "10");
Set the char at position index to first character in val.
</para>
<para>
+ Important: it changes the character directly in the SIP message
+ buffer, the update being immediately visible.
+ </para>
+ <para>
The idx can be an integer value or a variable holding an integer. If
the value is negative, the position is counted from the end of the buffer.
</para>
Module: kamailio
Branch: master
Commit: 93e77d441112ce41042cfd904cc3e7fd8ae78b4a
URL: https://github.com/kamailio/kamailio/commit/93e77d441112ce41042cfd904cc3e7f…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-09-07T23:46:23+02:00
modules: readme files regenerated - rtpengine ... [skip ci]
---
Modified: src/modules/rtpengine/README
---
Diff: https://github.com/kamailio/kamailio/commit/93e77d441112ce41042cfd904cc3e7f…
Patch: https://github.com/kamailio/kamailio/commit/93e77d441112ce41042cfd904cc3e7f…
---
diff --git a/src/modules/rtpengine/README b/src/modules/rtpengine/README
index 4944f8abaa..fd1e71dc26 100644
--- a/src/modules/rtpengine/README
+++ b/src/modules/rtpengine/README
@@ -2160,6 +2160,10 @@ rtpengine_offer();
+ SIP-source-address - the opposite of trust-address. Restores
the old default behaviour of ignoring endpoint addresses in
the SDP body.
+ + received-from=IP - Configure the SIP-source-address IP
+ explicitly, which will be useful when two kamailio is cascaded
+ where first kamailio is handling NAT and second kamailio
+ RTPEngine.
+ replace-origin - flags that IP from the origin description
(o=) should be also changed.
+ replace-session-connection - flags to change the session-level
Add receive-from option to flags
receive-from=1.2.3.4
required for managing rtpengine by a kamailio node behind a dispatcher
kamailio node
<!-- Kamailio Pull Request Template -->
UE behind NAT --------------->Dispatcher Kamailio--------> Location & Media managementKamailio ---------------> C5 SoftSwitch
| |
| V
| RTPENGINE
|
|---------------------------->Location & Media management Kamailio ---------------> C5 SoftSwitch
|
V
RTPENGINE
In this scenario when the Kamailio behind the Dispatcher will be getting the $Ri as dispatcher IP and by default that will be passed to RTP Engine for NAT negotiation which will fail.
In this pull merge requst, RTP engine module a new flag is added receive-from=IP which is supposed to be the received IP from the First node through P-Accessnetwork-Info header or the contact recived tag etc..
<!--
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/3230
-- Commit Summary --
* Add receive-from option
-- File Changes --
M src/modules/rtpengine/rtpengine.c (47)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3230.patchhttps://github.com/kamailio/kamailio/pull/3230.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3230
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3230(a)github.com>
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
When handling a `PUBLISH` we call [handle_publish()](https://kamailio.org/docs/modules/5.5.x/modules/presence.… and `NOTIFY`s are sent to all of the corresponding `active_watchers` (as expected). However, when `NOTIFY`s timeout (`408`), we're seeing that the corresponding entries in the `active_watchers` table are _not_ being deleted as expected. Furthermore, we've noticed that `NOTIFY`s are being sent to `active_watchers` which are expired (i.e. `expires < UNIX_TIMESTAMP()`) and when we run `kamcmd presence.cleanup`, no expired entries are removed from the `active_watchers` table.
We suspect that all of these things might be related--the common theme being that records aren't deleted when expected.
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
In our setup, we're using Kamailio as a "presence server" (via the [presence](https://kamailio.org/docs/modules/5.5.x/modules/presence.html), [presence_dialoginfo](https://kamailio.org/docs/modules/5.5.x/modules/presen…, and [presence_xml](https://kamailio.org/docs/modules/5.5.x/modules/presence_xml.… modules). We're using [`subs_db_mode`](https://kamailio.org/docs/modules/5.5.x/modules/presence.html#presence.p.subs_db_mode) `3` (DB-only scheme) and we have multiple Kamailio instances connected to a shared database (MySQL `8.0.27`).
Everything seems to be working as expected. However, as we accumulated stale entries in the `active_watchers` table we're finding that we're wasting more and more time on sending `NOTIFY`s to black holes. We're generating a _lot_ of traffic and waiting for the timeouts to hit is causing memory issues and backups.
Here are the relevant portions of our `kamailio.cfg` file:
```
# ----- presence params -----
modparam("presence", "db_table_lock_type", 0) # Disable locking; MySQL has issues with this is enabled.
modparam("presence", "db_update_period", -1) # Disable synchronization.
modparam("presence", "db_url", PRESENCE_DB_URL)
modparam("presence", "expires_offset", 60) # Force the client to send an UPDATE before the old PUBLISH expires.
modparam("presence", "max_expires", 1800)
modparam("presence", "min_expires", 1700)
modparam("presence", "publ_cache", 0) # Disable the PUBLISH cache since the database is shared.
modparam("presence", "server_address", "sip:$CLUSTER_DOMAIN_NAME:5060") # This becomes the value of the Contact header.
modparam("presence", "sip_uri_match", 1) # Use case insensitive URI matching.
modparam("presence", "subs_db_mode", 3) # Database-only scheme; everything is stored in the database.
modparam("presence", "notifier_processes", 0) # Caution! Under load a race condition can cause CSeq's to be reused.
modparam("presence", "timeout_rm_subs", 1)
# ----- presence_dialoginfo params -----
modparam("presence_dialoginfo", "force_single_dialog", 1) # Maybe not all phones support multiple "dialog" elements?
modparam("presence_dialoginfo", "force_dummy_dialog", 1) # Maybe not all phones support a null body?
# ----- presence_xml params -----
modparam("presence_xml", "db_url", PRESENCE_DB_URL)
modparam("presence_xml", "force_active", 1) # Skip permission/XCAP checks.
modparam("presence_xml", "force_dummy_presence", 1) # Default to a simple "open" status when presentity info is unavailable.
# ...
route[PRESENCE] {
if (!is_method("PUBLISH|SUBSCRIBE")) {
return;
}
if (!t_newtran()) {
sl_reply_error();
exit;
}
if (is_method("PUBLISH")) {
handle_publish();
t_release();
} else if (is_method("SUBSCRIBE")) {
handle_subscribe();
t_release();
}
exit;
}
```
#### 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).
-->
Here's a somewhat sanitized example (the message seems OK to us; however, the `Subscription-State: terminated; reason=timeout` does make us wonder--do we as the sender _know_ that the client is terminated/timed-out?):
```
2022/04/05 21:09:55.209846 10.21.3.12:5060 -> 10.31.0.226:6060
NOTIFY sip:SomeUser@192.168.86.24:54639;alias=123.21.125.232~54639~1 SIP/2.0
Via: SIP/2.0/UDP presence-w.staging.internal:5060;branch=z9hG4bK43ea.648a1952000000000000000000000000.0
To: <sip:SomeOtherUser@9bfadf66-a77b-6a69-25f3-02d96d4aa946>;tag=2607596073
From: <sip:SomeUser@9bfadf66-a77b-6a69-25f3-02d96d4aa946>;tag=69309ea83adcd977af8788878e9f31b3-42e32342
CSeq: 66 NOTIFY
Call-ID: 0_2607659559(a)192.168.86.24
Route: <sip:10.31.0.226:6060;r2=on;lr;ftag=2607596073>, <sip:55.8.122.110;r2=on;lr;ftag=2607596073>
Content-Length: 710
Max-Forwards: 70
Event: dialog
Contact: <sip:presence-w.staging.internal:5060>
Subscription-State: terminated;reason=timeout
Content-Type: application/dialog-info+xml
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="66" state="full" entity="sip:SomeUser@9bfadf66-a77b-6a69-25f3-02d96d4aa946">
<dialog id="0_1364146118(a)192.168.1.244" call-id="0_1364146118(a)192.168.1.244" direction="initiator">
<state>confirmed</state>
<remote>
<identity>sip:4355558565@9bfadf66-a77b-6a69-25f3-02d96d4aa945:5060</identity>
<target uri="sip:4355558565@9bfadf66-a77b-6a69-25f3-02d96d4aa946:5060"/>
</remote>
<local>
<identity>sip:SomeUser@9bfadf66-a77b-6a69-25f3-02d96d4aa946:5060</identity>
<target uri="sip:SomeUser@123.130.50.202:58872"/>
</local>
</dialog>
</dialog-info>
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
We didn't see any functions in the `presence` module that we could call directly to clean things up. One thought we had was to manually run some database commands from `event_route[presence:notify-reply]` (or in a `reply_route`). We've noticed that once the problematic entries are manually removed from the database that we no longer attempt to send `NOTIFY`s to the defunct destinations.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.5.4 (x86_64/linux)
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: unknown
compiled with gcc 10.2.1
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
$ uname -a
Linux ip-10-21-3-12 5.10.0-13-cloud-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3074
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3074(a)github.com>
### Description
While a INVITE is been processed the CANCEL of that transaction is been processed in other process almost at the same time
### Troubleshooting
#### Reproduction
Quite difficult to reproduce I would say
#### Debugging Data
```
Reading symbols from /usr/sbin/kamailio...
Reading symbols from /usr/lib/debug/.build-id/e3/9bd8ad0900c980149b00579cce26035c9cb118.debug...
warning: Can't open file /dev/zero (deleted) during file-backed mapping note processing
[New LWP 4136750]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -P /run/kamailio/kamailio.proxy.pid -f /etc/kamailio/proxy/k'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 atomic_dec_and_test_int (var=0x20) at ../../core/parser/../mem/../atomic/atomic_x86.h:222
222 ../../core/parser/../mem/../atomic/atomic_x86.h: No such file or directory.
(gdb) backtrace
#0 atomic_dec_and_test_int (var=0x20) at ../../core/parser/../mem/../atomic/atomic_x86.h:222
0000001 t_unref (p_msg=<optimized out>) at t_lookup.c:1514
#2 0x000055eee962d69b in exec_post_script_cb (msg=msg@entry=0x7f7e265822c8, type=type@entry=REQUEST_CB_TYPE)
at core/script_cb.c:182
0000003 0x000055eee95dfcbe in receive_msg (
buf=buf@entry=0x55eee9a00740 <buf> "INVITE sip:...@fake.dom:5060;transport=udp SIP/2.0\r\nRecord-
Route: <sip:X.X.X.X;r2=on;lr=on;ftag=1E7F0816-6299BCF10003883E-7FFFF700;ngcplb=yes;socket=udp:Y.Y.Y.Y:5060>\r
\nRe"..., len=<optimized out>, rcv_info=rcv_info@entry=0x7ffc96d12af0) at core/receive.c:520
#4 0x000055eee96d4c40 in udp_rcv_loop () at core/udp_server.c:543
#5 0x000055eee94db634 in main_loop () at main.c:1730
#6 0x000055eee94d2d2c in main (argc=<optimized out>, argv=<optimized out>) at main.c:3053
```
#### Log Messages
Notice that both messages came in the same second ( IPs and numbers have been changed )
```
Jun 3 09:49:05 sipwise2-prx03a proxy[4136750]: NOTICE: DEFAULT_ROUTE <script>: New request on proxy - M=INVITE R=«sip:+49......@X.X.X.X
:5060;transport=udp» F=«sip:+49...@fake.dom» T=«sip:+49...@Y.Y.Y.Z» IP=«Y.Y.Y.Z»:«5060» («Y.Y.Y.Y»:«5060»)
ID=«31668-TN-030322e6-0904f8ba1(a)fake.xn--dom_b2b-1-era UA='Cirpack/v4.88 (gw_sip)' DESTIP=«Y.Y.Y.G»:«5062»
```
```
Jun 3 09:49:05 sipwise2-prx03a proxy[4136755]: NOTICE: DEFAULT_ROUTE <script>: New request on proxy - M=CANCEL R=«sip:+49...@X.X.X.X
:5060;transport=udp» F=«sip:+49...@fake.dom» T=«sip:+49...@Y.Y.Y.Z» IP=«Y.Y.Y.Y»:«5060» («Y.Y.Y.Y»:«5060
») ID=«31668-TN-030322e6-0904f8ba1(a)fake.xn--dom_b2b-1-era UA='<null>' DESTIP=«Z.Z.Z.Z»:«5062»
Jun 3 09:49:05 sipwise2-prx03a proxy[4136755]: NOTICE: DEFAULT_ROUTE <script>: Sending reply S=100 Trying M=CANCEL fs='«Z.Z.Z.Z»:«5062»' du
='«Y.Y.Y.Y»:«5060»' - R=«sip:+49...@X.X.X.X:5060;transport=udp» ID=«31668-TN-030322e6-0904f8ba1(a)fake.xn--dom_b2b-1-era UA='<n
ull>'
```
### Additional Information
This is the Sipwise flavor 5.5.1-1+0~mr9.5.3.2
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3156
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3156(a)github.com>
Module: kamailio
Branch: master
Commit: f5c98a49c98aedcf6e1afec3c42dd862d0eeb9a3
URL: https://github.com/kamailio/kamailio/commit/f5c98a49c98aedcf6e1afec3c42dd86…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-09-02T13:15:35+02:00
core: support to specify options for load module
- prototypes:
loadmodule("path", "options")
loadmodulex("path", "options")
- options is a string with characters:
- 'g' or 'G' - open the module shared object file with RTLD_GLOBAL set,
wich can be used for modules related to external scripting languages
to avoid reloading
- example: loadmodule("app_lua", "g")
---
Modified: src/core/cfg.y
Modified: src/core/sr_module.c
Modified: src/core/sr_module.h
Modified: src/main.c
---
Diff: https://github.com/kamailio/kamailio/commit/f5c98a49c98aedcf6e1afec3c42dd86…
Patch: https://github.com/kamailio/kamailio/commit/f5c98a49c98aedcf6e1afec3c42dd86…
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.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.kamailio.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 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
Relevant modules and parameters in configuration:
```
loadmodule "presence.so"
loadmodule "dialog.so"
loadmodule "presence_xml.so"
loadmodule "pua.so"
loadmodule "presence_dialoginfo.so"
loadmodule "pua_dialoginfo.so"
modparam("dialog", "db_mode", 1)
modparam("presence", "subs_db_mode", 2)
modparam("presence", "db_table_lock_type", 0)
modparam("pua", "db_mode", 2)
modparam("pua", "db_table_lock_write", 0)
```
Using 2 UDP receiver processes.
User1 is watching (has` SUBSCRIBE`d to) User2, which is called by User3 (call1). User2 doesn't answer, phone is ringing. User1 now also calls User2 (call2), but we don't support receiving a second call so, for this `INVITE`, after 183, almost immediately, a 486 "Busy Here" message is sent and the call is cancelled (call2 finished). The 183 reply generates an "**early**" state on the UDP1 process, while 486 goes to "**terminated**" on the UDP2 process. The `PUBLISH` messages are processed almost concomitantly. The problem is that "**early**" state arrives to the subscriber (User1) after the "**terminated**" one (seen with `sngrep`) so the phone button keeps blinking for a while (... and the state cannot be changed by other call while the "**early**" event is still in the `presentity` table of the database).
I suspect a concurrency problem since I didn't reproduce it with only one UDP receiver process. Even if the "**terminated**" lifetime is much smaller (11s vs minutes), I strongly believe it is still there when the "**early**" state is written. Does the "**early**" event checks the database/memory for a "**terminated**" event for the same call ID? Is it because of the missing locks maybe (`db_table_lock_type`, `db_table_lock_write`) ?
### Troubleshooting
#### Reproduction
Using 2 UDP receiver processes.
User1 is watching (has `SUBSCRIBE`d to) User2, which is called by User3 (call1). User2 doesn't answer, phone is ringing. User1 now also calls User2 (call2), but we don't support receiving a second call so, for this `INVITE`, after 183, almost immediately, a 486 "Busy Here" message is sent and the call is cancelled (call2 finished).
I would not say that it is systematic, but easy enough to reproduce.
#### 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.
-->
#### 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).
-->
#### 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.5.4 (x86_64/linux)
flags: , EXTRA_DEBUGUSE_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
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 8.3.0
```
* **Operating System**:
Docker image around
```
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3192
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3192(a)github.com>
I’ve finally got confirmation that the SIP ALPN identifier is registered.
https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype…
For Kamailio, this could assist when we multiplex multiple protocols on the same port, like we do for HTTPs and SIP/TLS many times.
ALPN Is part of the TLS handshake, indicating what protocol comes after TLS is done.
For it to help, both phones and servers needs to support it. I do think it would be helpful.
Cheers,
/O
<!-- 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
- [ ] 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:
<!-- 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 #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Will you accept this? I find this extremely useful for troubleshooting. If accepted I'd like to add to most of the routing blocks.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3228
-- Commit Summary --
* Add More Logging Option
-- File Changes --
M etc/kamailio.cfg (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3228.patchhttps://github.com/kamailio/kamailio/pull/3228.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3228
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3228(a)github.com>
Module: kamailio
Branch: master
Commit: 294a00985b2cf4a397ffc81782f9ce6e4bc1ca15
URL: https://github.com/kamailio/kamailio/commit/294a00985b2cf4a397ffc81782f9ce6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-08-30T10:54:53+02:00
tmx: use t_unset() instead of t_unref() for pv_get_tm_reply_reason()
---
Modified: src/modules/tmx/t_var.c
---
Diff: https://github.com/kamailio/kamailio/commit/294a00985b2cf4a397ffc81782f9ce6…
Patch: https://github.com/kamailio/kamailio/commit/294a00985b2cf4a397ffc81782f9ce6…
---
diff --git a/src/modules/tmx/t_var.c b/src/modules/tmx/t_var.c
index 2fac9605a8..64a81e591b 100644
--- a/src/modules/tmx/t_var.c
+++ b/src/modules/tmx/t_var.c
@@ -587,7 +587,7 @@ int pv_get_tm_reply_reason(struct sip_msg *msg, pv_param_t *param,
/* t_find() above has the side effect of setting T and
REFerencing T => we must unref and unset it for the
main/core onreply_route. */
- _tmx_tmb.t_unref(msg);
+ _tmx_tmb.t_unset();
}
/* no break */
case TM_ONREPLY_ROUTE:
Module: kamailio
Branch: master
Commit: 07877fe6686139032d4d2f85b5f119b2cdf93cf6
URL: https://github.com/kamailio/kamailio/commit/07877fe6686139032d4d2f85b5f119b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-08-30T10:36:53+02:00
tmx: use t_find() for pv_get_tm_reply_reason()
---
Modified: src/modules/tmx/t_var.c
---
Diff: https://github.com/kamailio/kamailio/commit/07877fe6686139032d4d2f85b5f119b…
Patch: https://github.com/kamailio/kamailio/commit/07877fe6686139032d4d2f85b5f119b…
---
diff --git a/src/modules/tmx/t_var.c b/src/modules/tmx/t_var.c
index 3e977c98777..2fac9605a81 100644
--- a/src/modules/tmx/t_var.c
+++ b/src/modules/tmx/t_var.c
@@ -246,7 +246,7 @@ int pv_t_update_inv(struct sip_msg *msg)
return 1;
}
- if (_pv_tinv.label == t->label && _pv_tinv.index == t->hash_index)
+ if (_pv_tinv.label == t->label && _pv_tinv.index == t->hash_index)
goto done;
/* make a copy */
@@ -569,23 +569,26 @@ int pv_get_tm_reply_reason(struct sip_msg *msg, pv_param_t *param,
{
struct cell *t;
struct sip_msg *reply;
- int branch;
+ int branch = -1;
+ int vref = 0;
if(msg==NULL || res==NULL)
return -1;
/* first get the transaction */
- if (_tmx_tmb.t_check( msg , 0 )==-1) return -1;
- if ( (t=_tmx_tmb.t_gett())==0) {
+ t = _tmx_tmb.t_find(msg, &branch, &vref);
+ if (t==T_NULL_CELL || t==T_UNDEFINED) {
/* no T */
return pv_get_strempty(msg, param, res);
} else {
switch (get_route_type()) {
case CORE_ONREPLY_ROUTE:
- /* t_check() above has the side effect of setting T and
- REFerencing T => we must unref and unset it for the
- main/core onreply_route. */
- _tmx_tmb.t_unref(msg);
+ if(vref) {
+ /* t_find() above has the side effect of setting T and
+ REFerencing T => we must unref and unset it for the
+ main/core onreply_route. */
+ _tmx_tmb.t_unref(msg);
+ }
/* no break */
case TM_ONREPLY_ROUTE:
/* use the reason of the current reply */
<!-- 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, ...)
- [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
- [ 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 -->
- [ ] PR should be backported to stable branches
- [X ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Adjusted comments in kamailio.cfg - no code impact -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3227
-- Commit Summary --
* added rtpengine to comment
-- File Changes --
M etc/kamailio.cfg (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3227.patchhttps://github.com/kamailio/kamailio/pull/3227.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3227
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3227(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for feature requests.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.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.kamailio.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) 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
Looking for a mechanism to reload Location attributes at runtime.
Having both registered and permanent Contacts under AoR, with Attributes from `usrloc` to be used for various routing decisions.
This is about attributes of permanent Contacts. Registered ones have `xavp_contact` of `usrloc` to store attributes during registration.
**Problem:**
Only way to make it work is:
1. adding a permanent Contact using `rpc ul.add`
2. assigning attributes in DB `location_attr` per RUID (can't find an rpc function for attributes)
3. restart Kamailio
modparam("usrloc", "db_mode", 1)
modparam("usrloc", "db_load", 1)
This however is far from ideal, having to restart Kamailio for every change in attributes of a Contact.
### Expected behavior
#### Actual observed behavior
#### Debugging Data
```
(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 improvement.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
version: kamailio 5.3.3 (x86_64/linux) 44ccb9
* **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`)
-->
```
(paste your output 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/2299
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.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.kamailio.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 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
We are using xmlrpc to terminate the calls once customer balance reaches to zero. call got terminated but we will not be able to set the dialog variable related to hangup_reason. There should be a way during dlg.terminate_dlg xmlrpc request that if i mention the some parameter then it should set before sending bye to callee and caller.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### 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`
```
root@ip-172-31-4-160:/etc/kamailio# kamailio -version
version: kamailio 5.1.4 (x86_64/linux) 6ebfda
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: 6ebfda
compiled on 11:48:26 Sep 7 2018 with gcc 4.8.4
```
* **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# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
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/1737
This will allow us to point https://www.kamailio.org/wiki/features/new-in-devel to the file and "force" developers to update that file with the new features when they are introduced in the repository
Remaining developers to upgrade the wiki seems pointless and anyone can create a PR for changes
---
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/668
### Description
Consuming messages without message body fails due to a JSON parsing error:
```
ERROR: kazoo [kz_json.c:287]: kz_json_parse(): Error parsing json: unexpected end of data
ERROR: kazoo [kz_json.c:288]: kz_json_parse():
ERROR: kazoo [kz_amqp.c:2960]: kz_amqp_send_worker_event(): error parsing json body
```
This makes it unable to consume messages from RabbitMQ's event exchange plugin ( https://www.rabbitmq.com/event-exchange.html ), as the documentatin states: **"The message body is always blank."**
### Possible Solutions
As a possible fix I tried following change in kz_amqp.c:
```
void kz_amqp_send_worker_event(kz_amqp_server_ptr server_ptr, amqp_envelope_t* envelope, kz_amqp_bind_ptr bind)
{
char buffer[100];
kz_amqp_cmd_ptr cmd = NULL;
kz_amqp_consumer_delivery_ptr ptr = NULL;
json_obj_ptr json_obj = NULL;
json_object* JObj = NULL;
str* message_id = NULL;
int idx = envelope->channel-1;
int worker = 0;
int _kz_server_id = server_ptr->id;
int msg_size = envelope->message.body.len;
//begin of changes
int routingkey_size = envelope->routing_key.len;
if (msg_size == 0 && routingkey_size > 0 ) {
char *routingkey_data = pkg_malloc(routingkey_size + 1);
memset(routingkey_data, 0, routingkey_size + 1);
memcpy(routingkey_data, (char*)envelope->routing_key.bytes, routingkey_size);
LM_DBG("Message size: %d\n", msg_size);
LM_DBG("Routing Key: %s\n", routingkey_data);
char *pos = strchr(routingkey_data,'.');
while (pos){
*pos = '_';
pos = strchr(pos,'.');
}
LM_DBG("New Routing Key: %s\n", routingkey_data);
sprintf(buffer, "kazoo:%s", routingkey_data);
if(kz_amqp_consumer_fire_event(buffer) != 0) {
LM_ERR("kazoo:%s not found", routingkey_data);
}
pkg_free(routingkey_data);
return;
}
char *json_data = pkg_malloc(msg_size + 1);
if(!json_data) {
LM_ERR("no more package memory available. needed %d\n", msg_size + 1);
return;
}
char *json_data = pkg_malloc(msg_size + 1);
//end of changes
if(!json_data) {
LM_ERR("no more package memory available. needed %d\n", msg_size + 1);
return;
}
```
The change is rather simple: If there is no message-body supplied, the event-route _kazoo:<binding_key>_ is called (after replacing any '.' with '_' in the routing_key).
--
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
### Description
I use TCP transport to relay SIP messages.
When Kamailio cannot connect to another server then Kamailio generates response `408 Request Timeout`.
inside `event_route[dialog:failed]` route block I check error code `$rs` but this value is `null`.
This happens because Kamailio does not able to relay SIP messages and is not able to receive responses.
But `tm` module generates a response `408 Request Timeout` and will be fine to init `$rs` pseudo-variable using tm module response.
### Expected behavior
`$rs` pseudo-variable contains `tm` module response when kamailio does not receive a response from another server.
#### Actual observed behavior
`$rs` pseudo-variable contains `null` value when kamailio does not receive a response from another server.
To check you can use
```
event_route[dialog:failed]
{
$var(code_xxx) = $(rs{re.subst,/([0-9])[0-9]{2}/\1xx/});
xlog("L_INFO", "websocket|log|dialog failed $rs; $var(code_xxx)\n");
}
```
And relay SIP message to host that reachable.
--
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/2867
### Description
Larger SIP frames get dropped when sent over UDP and IPv6. The sending side has MTU 1500 and the receiving side has MTU 1492. This is an IPv6-only setup, so this is problematic. Also, pulling down the MTU of a general server for a tunneled peer would smear like an oil stain. The suggestion to fallback on TCP feels like a hack.
### Troubleshooting
#### Reproduction
Send a SIP message to a network interface with a lower MTU than the submitted frame size.
#### Debugging Data
None, transmission works fine.
#### Log Messages
None, transmission works fine.
#### SIP Traffic
Irrelevant.
#### Code Investigation
I explored the Kamailio source code for MTU handling.
https://github.com/kamailio/kamailio/blob/81265e41b52cfda9a284233c93683522a…
* This defaults to switching off the Don't Fragment bit on IPv4 frames, to allow them to be broken up downstream.
* This should check for an IPv4 socket, because (at least) Linux has a separate symbolic value `IPV6_MTU_DISCOVER`
* Note that IPv6 is never broken up by routers; they always return ICMPv6 message Packet Too Big
* Note that IPv6 Path MTU discovery by the kernel is automatic only for connected UDP sockets
* Since Kamailio uses unconnected UDP sockets, Path MTU issues cause packets to be dropped
* Note that such packet drops depend on a somewhat dynamic SIP message size, causing random behaviour
* I therefore suggest that Kamailio is lacking in some of its IPv6 logic
https://github.com/kamailio/kamailio/blob/81265e41b52cfda9a284233c93683522a…
* This enables the reporting of ICMP errors, including Path MTU but also other useful things like Host Not Found
* This should check for an IPv4 socket, because (at least) Linux has a separate symbolic value `IPV6_RECVERR`
* Note that the same behaviour is available on BSD, so it need not be specific to Linux
* Note that handling errors is done with `recvmsg()` with a flag `MSG_ERRQUEUE`, which is not used in Kamailio
* Note that the ancillary data from `recvmsg()` holds data to cleverly handle ICMP or ICMPv6 responses
* I therefore suggest that Kamailio is lacking a fair chunk of its ICMP and ICMPv6 logic
* I expect that this may bring efficiency gains due to faster closing of transactions
### Possible Solutions
I have been thinking about ways to lower MTU values only for some peers.
1. Using connected sockets might work, possibly as an alternative when Path MTU problems arise. It might not scale however.
2. Every socket could have an extra sending socket set to a lower MTU. The use of `SO_REUSEADDR` seems to allow for that.
3. Before falling back on an extra socket, the desired MTU could be set. Alternatively, as for IPv6, an MTU of 1280 might be considered in many cases:
- *If you can carry 6 out of 8 coffee mugs from the kitchen, you need to walk twice, and 4+4 is easier than 6+2*
- Anything over the MTU splits into at least 2 frames
- The headers added are 40 bytes IPv6 header and 8 bytes Fragment Extension Header
- 2 frames can hold a single frame of 2*1280-40-8 = 2512 bytes
- Up to 2512 bytes original MTU, breakup in 1280 byte frames will be fine
- 3 frames are going to be useful for larger frames, then a similar style can be used
- This might help to decide whether 1280 or a higher MTU is most desirable
### Additional Information
```
Kamailio 5.2.1 from Debian stable
```
* **Operating System**:
```
Linux Debian stable on kernel 4.19.0
```
(I don't suppose it matters, this code has been around for ages. I used permalinks for stable reference).
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3119
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3119(a)github.com>
### Description
I use TCP sockets to relay calls to backend servers.
Also, I have enabled `tcp_reuse_port` and enabled `socket` attribute in dispatcher settings.
INVITE messages to backend servers are now properly send from port 5060.
### Expected behavior
For all messages are used the same TCP socket and same source port for all messages (including OPTIONS).
#### Actual observed behavior
But initial OPTIONS (before the first call send) uses a random source port.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
used current c503d2bd31a580138a67f1d4a265ccde5791d271 with small customization.
* **Operating System**:
aarch64
```
[root@sbc-a0 ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="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/2853
set context iuid for CANCEL requests to let isflagset function return the right value in case a dialog flag was previously set on the call
<!-- 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
- [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 -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Using kamailio 5.4 version, we have seen that dlg_isflagset is not detecting a dialog flag set in the request route for the initial INVITE, when a CANCEL request arrives.
We have applied this change to set the dialog context unique ide for this request. Since it's done on dlg_onreply, dlg_onroute and dlg_ontimeout functions. This way, dlg_get_by_iuid(&dctx->iuid) in the function ki_dlg_isflagset is not NULL and dialog flags are detected.
Is this change correct? Or can it generate any kind of issues?
thanks a lot and regards
David
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3096
-- Commit Summary --
* dialog: set context iuid for CANCEL requests to let isflagset function return the right value in case a dialog flag was previously set on the call
-- File Changes --
M src/modules/dialog/dlg_handlers.c (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3096.patchhttps://github.com/kamailio/kamailio/pull/3096.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3096
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3096(a)github.com>
Module: kamailio
Branch: master
Commit: 654f22a03e874f86c4b2b2d29eb969a1be3bb25e
URL: https://github.com/kamailio/kamailio/commit/654f22a03e874f86c4b2b2d29eb969a…
Author: David Escartin <descartin(a)sonoc.io>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-08-26T09:49:42+02:00
dialog: set context iuid for CANCEL requests to let isflagset function return the right value in case a dialog flag was previously set on the call
---
Modified: src/modules/dialog/dlg_handlers.c
---
Diff: https://github.com/kamailio/kamailio/commit/654f22a03e874f86c4b2b2d29eb969a…
Patch: https://github.com/kamailio/kamailio/commit/654f22a03e874f86c4b2b2d29eb969a…
---
diff --git a/src/modules/dialog/dlg_handlers.c b/src/modules/dialog/dlg_handlers.c
index 39f1f83dd7..794aa7c7d2 100644
--- a/src/modules/dialog/dlg_handlers.c
+++ b/src/modules/dialog/dlg_handlers.c
@@ -1258,6 +1258,9 @@ dlg_cell_t *dlg_lookup_msg_dialog(sip_msg_t *msg, unsigned int *dir)
msg->callid->body.len, msg->callid->body.s);
return NULL;
}
+ if(msg->first_line.u.request.method_value == METHOD_CANCEL) {
+ dlg_set_ctx_iuid(dlg);
+ }
if(dir) *dir = vdir;
return dlg;
}
### Description
Right now, usrloc keepalive method use a somewhat static call-id, built with the prefix `ksrulka-` followed by the number of keepalives sent and the contact index of each AoR pinged.
This means that pings to different contacts from different processes (when using timer_procs in usrloc) or when you have multiple proxies each handling a subset of registrar requests, you can have duplicated call-ids.
Basically the following happens:
- user1 registers to proxy
- user2 registers to proxy
- different timer processes handles the keepalives
- call-ids are the same (it start always from `ksrulka-1.1`)
OR
- user1 registers to proxyA
- user2 registers to proxyB
- both proxies start sending keepalives
- call-ids are the same (it start always from `ksrulka-1.1`) from both proxies.
While this is not a routing problem, bug or whatever, it can be annoying if traffic is analyzed with tools like sngrep, which group messages by the Call-ID header, and if you run sngrep on the edge proxy you'll see both keepalive messages under the same call.
Can be also annoying if logs from all proxies are aggregated, making a bit problematic filtering by call-id.
### Expected behavior
Call-id should be somewhat random.
#### SIP Traffic
This is an example for same call-id used for pinging two different AoR on same proxy.
```
2022/08/23 08:53:35.717668 172.23.42.2:5060 -> 172.23.42.1:5060
OPTIONS sip:user1@192.168.10.123:23045;transport=udp SIP/2.0
Via: SIP/2.0/UDP 172.23.42.2:5060;branch=z9hG4bKx.323.1.0
Route: <sip:172.23.42.1;lr;received=sip:client.public.ip:23045;r2=on>,<sip:kamailio.public.ip;lr;received=sip:client.public.ip:23045;r2=on>
From: <sip:pinger@test.proxy>;tag=uloc-1-6304863f-61-2-8a27955a-6304958f-af2a3-143.1
To: <sip:user1@example.com>
Call-ID: ksrulka-323.1
CSeq: 80 OPTIONS
Content-Length: 0
```
and
```
2022/08/23 08:53:35.897076 172.23.42.2:5060 -> 172.23.42.1:5060
OPTIONS sip:user2@192.168.10.130:5060 SIP/2.0
Via: SIP/2.0/UDP 172.23.42.2:5060;branch=z9hG4bKx.323.1.0
Route: <sip:172.23.42.1;lr;received=sip:client.public.ip:60058;r2=on>,<sip:kamailio.public.ip;lr;received=sip:client.public.ip:60058;r2=on>
From: <sip:pinger@test.proxy>;tag=uloc-1-6304863f-61-1-86c70e53-6304958f-dafc7-143.1
To: <sip:user2@example.com>
Call-ID: ksrulka-323.1
CSeq: 80 OPTIONS
Content-Length: 0
```
### Possible Solutions
To be 100% honest I don't get why such method of generating call-ids has been chosen. The only useful thing I see is that you can have a clue of how many keepalives ping have been sent by each process / proxy while inspecting sip traces. I don't see any usage of the fixed call-id in handling responses. But I may be wrong, since I'm new to kamailio.
What could be done is to add a random string to the call-id, like nathelper does. If this is acceptable, I can try to create a PR for that.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.6.1 (x86_64/linux)
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: unknown
compiled with gcc 9.4.0
```
* **Operating System**:
Using official docker images of kamailio 5.6.1.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3225
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3225(a)github.com>
Module: kamailio
Branch: master
Commit: 03dffaad07952568bd40e22d5b23aaa4bcfe613a
URL: https://github.com/kamailio/kamailio/commit/03dffaad07952568bd40e22d5b23aaa…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-08-24T09:31:46+02:00
modules: readme files regenerated - pv ... [skip ci]
---
Modified: src/modules/pv/README
---
Diff: https://github.com/kamailio/kamailio/commit/03dffaad07952568bd40e22d5b23aaa…
Patch: https://github.com/kamailio/kamailio/commit/03dffaad07952568bd40e22d5b23aaa…
---
diff --git a/src/modules/pv/README b/src/modules/pv/README
index 28bc21c69a..4a1f805154 100644
--- a/src/modules/pv/README
+++ b/src/modules/pv/README
@@ -694,8 +694,11 @@ xavi_child_rm("WhatEver", "FoO");
at the index idx becomes the first and the ones before it are at the
end of the list.
- The first parameter has to be the name of XAVP in the root list. The
- second parameter is the index of the XAVP that becomes the first one.
+ The first parameter has to be the name of XAVP in the root list.
+
+ The second parameter is the index of the XAVP that becomes the first
+ one (if it is greater than the number of XAVPs, modulo operation is
+ done first; if it is negative, it counts from the end of the list).
The parameters can be with variables.
Module: kamailio
Branch: master
Commit: 1a33c8b7c70e7f629868d926965ec456bf2eecae
URL: https://github.com/kamailio/kamailio/commit/1a33c8b7c70e7f629868d926965ec45…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-08-24T09:18:08+02:00
pv: updated docs for xavp_lshift()
---
Modified: src/modules/pv/doc/pv_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/1a33c8b7c70e7f629868d926965ec45…
Patch: https://github.com/kamailio/kamailio/commit/1a33c8b7c70e7f629868d926965ec45…
---
diff --git a/src/modules/pv/doc/pv_admin.xml b/src/modules/pv/doc/pv_admin.xml
index 409ecaa4dac..30b09eab807 100644
--- a/src/modules/pv/doc/pv_admin.xml
+++ b/src/modules/pv/doc/pv_admin.xml
@@ -747,8 +747,12 @@ xavi_child_rm("WhatEver", "FoO");
</para>
<para>
The first parameter has to be the name of XAVP in the root list.
+ </para>
+ <para>
The second parameter is the index of the XAVP that becomes the
- first one.
+ first one (if it is greater than the number of XAVPs, modulo
+ operation is done first; if it is negative, it counts from the
+ end of the list).
</para>
<para>
The parameters can be with variables.
<!-- 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
- [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 -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
When I upgraded kamailio version to 5.6.1, some http requests hit msg headers control and failed.
I think ksr_sip_parser_mode check should be added here for backward compatibility.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3226
-- Commit Summary --
* core: added parser mode check
-- File Changes --
M src/core/parser/msg_parser.c (8)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3226.patchhttps://github.com/kamailio/kamailio/pull/3226.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3226
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3226(a)github.com>
<!-- 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
- [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 -->
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
When I upgraded kamailio version to 5.6.1, some http requests hit msg headers control and failed.
I think ksr_sip_parser_mode check should be added here for backward compatibility.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3224
-- Commit Summary --
* Merge pull request #1 from kamailio/master
* Merge pull request #2 from kamailio/master
* Merge pull request #3 from kamailio/master
* Merge branch 'kamailio:master' into master
* core: added parser mode check
-- File Changes --
M src/core/parser/msg_parser.c (8)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3224.patchhttps://github.com/kamailio/kamailio/pull/3224.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3224
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3224(a)github.com>
<!-- 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
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Sometime is helpful to have a monotonic timer to attach to events in order to discard out-of-order ones on receiving side. Current time values are not ideal since are subject to clock skews, adjustment and so on. Since we have system monotonic clock we can use that value to have a monotonic counter.
To be 100% fair CLOCK_MONOTONIC can still be skewed only by ntp adjustment, that's why we try to use CLOCK_MONOTONIC_RAW which is linux-only (afaik) that do not suffer from such adjustments.
The new pseudovariable is `$TV(Sm)`, which returns the monotonic counter as a string. Note that even if is based on clock, it starts from an unspecified point in time, so should really be treated as an always increasing counter.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3191
-- Commit Summary --
* pv: add monotonic clock to TimeVal pseudovariable
-- File Changes --
M src/modules/pv/pv_time.c (24)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3191.patchhttps://github.com/kamailio/kamailio/pull/3191.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3191
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3191(a)github.com>
Very minor change correcting a misspelled word in the main config file.
<!--
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
- [ 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 -->
- [ ] 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/3223
-- Commit Summary --
* Corrected a typo ("endabled")
-- File Changes --
M etc/kamailio.cfg (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3223.patchhttps://github.com/kamailio/kamailio/pull/3223.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3223
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3223(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.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.kamailio.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 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
the counting and values provides by $hfl and $hflc are wrong and imcomplete
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### 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.
-->
```
route {
$var(hname) = "Record-Route";
if (is_present_hf_pv("$var(hname)")){
$var(i) = 0;
$var(hdrc) = $hflc($var(hname));
xlog("there are $var(hdrc) values for $var(hname)\r\n");
xlog("------------------------------------------\r\n");
while ($var(i) < $var(hdrc)){
$var(val) = $(hfl($var(hname))[$var(i)]);
$var(sip_header_ip) = $(var(val){nameaddr.uri}{uri.host});
if ($var(sip_header_ip) != 0){
xlog("checking $var(sip_header_ip) in $var(hname) \r\n");
}
$var(i) = $var(i) + 1;
}
}
}
```
#### 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).
-->
```
0(3729) ERROR: <script>: there are 2 values for Record-Route
0(3729) ERROR: <script>: ------------------------------------------
0(3729) ERROR: <script>: checking 1.1.1.1 in Record-Route
0(3729) ERROR: <script>: checking 2.2.2.2 in Record-Route
```
#### Expected Results
```
0(3729) ERROR: <script>: there are 3 values for Record-Route
0(3729) ERROR: <script>: ------------------------------------------
0(3729) ERROR: <script>: checking 1.1.1.1 in Record-Route
0(3729) ERROR: <script>: checking 2.2.2.2 in Record-Route
0(3729) ERROR: <script>: checking 3.3.3.3 in Record-Route
```
#### 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).
-->
```
INVITE sip:+3226200866;trunk=PkGHOlui@127.0.0.1:5060;cid=EMDLfGdgrDD SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:3030;branch=z9hG4bK-3708-1-0
Record-Route: <sip:1.1.1.1;lr=on;nat=yes>
Record-Route: <sip:2.2.2.2:5060;lr;transport=udp>,<sip:3.3.3.3:22506;lr;transport=udp>
From: <sip:8325000000@127.0.0.1:5060>;tag=3708SIPpTag091
To: <sip:++212-94939-43433226200866@127.0.0.1:5060>
Call-ID: 1-3708(a)127.0.0.1
CSeq: 1 INVITE
Max-Forwards: 70
Content-Type: application/sdp
```
### 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.6.1 (x86_64/linux)
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: unknown
compiled with gcc 10.2.1
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3194
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3194(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.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.kamailio.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 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 found some failures in the stress test of MSRP messages and prompted the following error log:
DEBUG: msrp [msrp_netio.c:98]: msrp_relay(): To-Path has only one URI -- nowehere to forward;
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
After adding the log embedding point, it is found that there is a problem in the logic of adding the linked list of "_msrp_cmap_head - > cslots". The node with a smaller hash value will be added behind the node with a larger "citemid" value, so that the linked list is not arranged strictly in the ascending order of "citemid", resulting in the failure of subsequent queries such as "msrp_cmap_lookup", and thus the normal relay cannot be performed.
37(81) ERROR: msrp [msrp_cmap.c:291]: msrp_cmap_save(): _msrp_cmap_head->cslots[**492932**] item citemid is [**2183628164**], sessionid is [xxxxxxxx]
37(81) ERROR: msrp [msrp_cmap.c:291]: msrp_cmap_save(): _msrp_cmap_head->cslots[**492932**] item citemid is [**2174190980**], sessionid is [xxxxxxxx]
**2183628164>2174190980, out of order.**
### Troubleshooting
source code:
for(itb=_msrp_cmap_head->cslots[idx].first; itb; itb=itb->next)
{
if(itb->citemid>it->citemid || itb->next==NULL) {
**if(itb->next==NULL)** {
itb->next=it;
it->prev = itb;
} else {
it->next = itb;
if(itb->prev==NULL) {
_msrp_cmap_head->cslots[idx].first = it;
} else {
itb->prev->next = it;
}
it->prev = itb->prev;
itb->prev = it;
}
break;
}
}
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### 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
Tested against kamailio 5.4.x and actually all versions are affected`
```
fixed code:
for(itb=_msrp_cmap_head->cslots[idx].first; itb; itb=itb->next)
{
if(itb->citemid>it->citemid || itb->next==NULL) {
//modifed code
if(itb->next==NULL && (itb->citemid < it->citemid)) {
itb->next=it;
it->prev = itb;
} else {
it->next = itb;
if(itb->prev==NULL) {
_msrp_cmap_head->cslots[idx].first = it;
} else {
itb->prev->next = it;
}
it->prev = itb->prev;
itb->prev = it;
}
break;
}
}
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
Ubuntu 16.04
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3215
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3215(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for feature requests.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.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.kamailio.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) 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
Hello ,
i would like to have parameter in topos and topoh to disable comma separated values in one single **Via**, **Record-Route** or **Route** header.
some ua we are interacting with dont handle that (even if its rfc compliant).
and so most scenario calls fail with those particular ua.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Expected behavior
#### Actual observed behavior
#### Debugging Data
```
(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 improvement.
-->
### 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`)
-->
```
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3216
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3216(a)github.com>
Module: kamailio
Branch: master
Commit: 5dbee20d7d44bae21f3a225966808576285ef2eb
URL: https://github.com/kamailio/kamailio/commit/5dbee20d7d44bae21f3a22596680857…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2022-08-21T15:46:09+02:00
modules: readme files regenerated - topos ... [skip ci]
---
Modified: src/modules/topos/README
---
Diff: https://github.com/kamailio/kamailio/commit/5dbee20d7d44bae21f3a22596680857…
Patch: https://github.com/kamailio/kamailio/commit/5dbee20d7d44bae21f3a22596680857…
---
diff --git a/src/modules/topos/README b/src/modules/topos/README
index 774cc4f347..1f8e8c191d 100644
--- a/src/modules/topos/README
+++ b/src/modules/topos/README
@@ -500,11 +500,11 @@ modparam("topos", "methods_nocontact", "CANCEL,PRACK")
List of headers to disable multiple comma separated values inserted in
compact form. Altough compact form is RFC compliant this paramter gives
- possibilty to disable compact form header values for UA that dont
- support/handle it. The following options are available: (1) - disable
- multiple comma separated values for Via header (2) - disable multiple
- comma separated values for Record-Route header (4) - disable multiple
- comma separated values for Route header
+ possibilty to disable compact form header values for UA that don't
+ support or can't handle it. The following options are available: (1) -
+ disable multiple comma separated values for Via header (2) - disable
+ multiple comma separated values for Record-Route header (4) - disable
+ multiple comma separated values for Route header
Default value is “0”.
Module: kamailio
Branch: master
Commit: 7dd3658e248a6c64b1606ebebac76869a006b911
URL: https://github.com/kamailio/kamailio/commit/7dd3658e248a6c64b1606ebebac7686…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-08-21T13:31:51Z
topos: small doc improvements related to header_mode parameter
---
Modified: src/modules/topos/doc/topos_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/7dd3658e248a6c64b1606ebebac7686…
Patch: https://github.com/kamailio/kamailio/commit/7dd3658e248a6c64b1606ebebac7686…
---
diff --git a/src/modules/topos/doc/topos_admin.xml b/src/modules/topos/doc/topos_admin.xml
index c15fcf245e..dcf61a0fed 100644
--- a/src/modules/topos/doc/topos_admin.xml
+++ b/src/modules/topos/doc/topos_admin.xml
@@ -551,11 +551,11 @@ modparam("topos", "methods_nocontact", "CANCEL,PRACK")
<para>
List of headers to disable multiple comma separated values inserted in compact form.
Altough compact form is RFC compliant this paramter gives possibilty to disable
- compact form header values for UA that dont support/handle it.
+ compact form header values for UA that don't support or can't handle it.
The following options are available:
- (1) - disable multiple comma separated values for Via header
+ (1) - disable multiple comma separated values for Via header
(2) - disable multiple comma separated values for Record-Route header
(4) - disable multiple comma separated values for Route header
<!-- Kamailio Pull Request Template -->
Topos module always put a single Via header with multiple comma separated values.
Even if this behaviour is RFC compliant there should a possibilty to disable that behaviour four uas that dont support/handle that.
this pull request adds a new parameter topos module to disable that behaviour if needed otherwise the default topos compact form is used.
```
modparam("topos", "separate_via", 1)
```
<!--
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 -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #3216
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3220
-- Commit Summary --
* topos: enable multiple Via values in separate via header
-- File Changes --
M src/modules/topos/topos_mod.c (2)
M src/modules/topos/tps_msg.c (48)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3220.patchhttps://github.com/kamailio/kamailio/pull/3220.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3220
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3220(a)github.com>
Module: kamailio
Branch: master
Commit: 54fe9d29d15bd15b60950035ad348baacbb868fe
URL: https://github.com/kamailio/kamailio/commit/54fe9d29d15bd15b60950035ad348ba…
Author: Mvondo Eric <106535097+emvondo(a)users.noreply.github.com>
Committer: GitHub <noreply(a)github.com>
Date: 2022-08-21T15:19:51+02:00
topos: disable multiple comma separated values in One Single Via, Record-Route or Route header if needed (#3220)
* topos: enable multiple Via values in separate via header
* topos: disable multiple comma separated values in One Single Via, Record-Route or Route header
* topos: disable multiple comma separated values in One Single Via, Record-Route or Route header
* topos: disable multiple comma separated values in One Single Via, Record-Route or Route header
* change parameter name for disabling compact form values
---
Modified: src/modules/topos/doc/topos_admin.xml
Modified: src/modules/topos/topos_mod.c
Modified: src/modules/topos/tps_msg.c
Modified: src/modules/topos/tps_msg.h
---
Diff: https://github.com/kamailio/kamailio/commit/54fe9d29d15bd15b60950035ad348ba…
Patch: https://github.com/kamailio/kamailio/commit/54fe9d29d15bd15b60950035ad348ba…
#### 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)
- [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 (no, it is a requirement to use UDP/IPv6 with everyone)
- [X] Tested changes locally (same results as before with the Kamailio test framework)
- [ ] Related to issue #3119
#### Description
The IPv6 support for Path MTU discovery is absent, but IPv6 has no DF flag to allow downstream fragmentation. See Issue #3119 for my discovery / learning path. In short, unconnected UDP sockets do not learn Path MTU problems, so a message dropped once will be dropped again on resend. Using `IPV6_PMTUDISC_WANT`, any knowledge in the kernel can be used to fragment the message at sending time, as intended for IPv6.
These patches actually correct two IPv6-related things in the `core/udp_server.c`,
1. Benefit from any kernel knowledge about Path MTU for IPv6
2. The same option to learn from UDP_ERRORS is now available for IPv6
Do note that the last has not been implemented for IPv4 or IPv6. It is more useful for IPv6, allowing instant "tm" resends for Path MTU, but not "sl" I think. I cannot do that work, but this brings IPv6 to the same level as IPv4.
```
commit 0f90cff05c1a448eb2f85f83b4c087ab32ede11
Author: Rick van Rein <rick(a)openfortress.nl>
Date: Sat Jun 11 10:57:32 2022 +0000
core: Issue 3119. Handling ICMPv6 Packet too Big
- This was only defined for IPv4 under flag UDP_ERRORS
- IPv6 has no toggle DF to clear for en-route fragmentation
- Kamailio currently does not collect with recvmsg(...,MSG_ERRQUEUE)
- The benefits of adding that can be instant resends for "tm" messages
- Note that "sl" messages will have been forgotten at this point
commit 6b404b5f9807174177bee36eaf3543be0794f55e
Author: Rick van Rein <rick(a)openfortress.nl>
Date: Sat Jun 11 10:44:27 2022 +0000
core: Issue #3119. Path MTU kernel info for IPv6
- For IPv4, DF is an option; for IPv6 it is always active
- This makes pmtu_discover an IPv4-only option
- This means that we should set IPV6_MTU_DISCOVER to IPV6_PMTUDISC_WANT
- Unconnected UDP sockets can now learn from ICMPv6 "Packet too Big"
- As a result, hitting a Path MTU upper bound is a learning process
- This should stop consistent SIP packet drops due to Path MTU
```
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3141
-- Commit Summary --
* core: Issue #3119. Path MTU kernel info for IPv6
* core: Issue 3119. Handling ICMPv6 Packet too Big
-- File Changes --
M doc/misc/NEWS (2)
M src/core/udp_server.c (44)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3141.patchhttps://github.com/kamailio/kamailio/pull/3141.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3141
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3141(a)github.com>
Module: kamailio
Branch: master
Commit: a022dbd6b30d8301053950756cd30a2b478433e0
URL: https://github.com/kamailio/kamailio/commit/a022dbd6b30d8301053950756cd30a2…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-08-21T12:38:16Z
core: add pmtu_discovery=2 for IPv4 and IPv6 - set IP_PMTUDISC_WANT/IPV6_PMTUDISC_WANT (GH #3141)
- add pmtu_discovery=2 for IPv4 and IPv6 - set IP_PMTUDISC_WANT/IPV6_PMTUDISC_WANT
- related to GH #3141
- for IPv4: will fragment a datagram if needed according to the path MTU,
or will set the don't-fragment flag otherwise
- for IPv6: will fragment a datagram if needed according to the path MTU for IPv6
---
Modified: src/core/udp_server.c
---
Diff: https://github.com/kamailio/kamailio/commit/a022dbd6b30d8301053950756cd30a2…
Patch: https://github.com/kamailio/kamailio/commit/a022dbd6b30d8301053950756cd30a2…
---
diff --git a/src/core/udp_server.c b/src/core/udp_server.c
index 7c501f0dab..3edf485199 100644
--- a/src/core/udp_server.c
+++ b/src/core/udp_server.c
@@ -349,9 +349,19 @@ int udp_init(struct socket_info* sock_info)
#endif
#if defined (__OS_linux)
if (addr->s.sa_family==AF_INET){
- /* If pmtu_discovery=1 then set DF bit and do Path MTU discovery
- * disabled by default. Specific to IPv4. */
- optval= (pmtu_discovery) ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
+ /* If pmtu_discovery=1 then set DF bit and do Path MTU discovery,
+ * disabled by default. Specific to IPv4. If pmtu_discovery=2
+ * then the datagram will be fragmented if needed according to
+ * path MTU, or will set the don't-fragment flag otherwise */
+ switch (pmtu_discovery) {
+ case 1: optval=IP_PMTUDISC_DO;
+ break;
+ case 2: optval=IP_PMTUDISC_WANT;
+ break;
+ case 0:
+ default: optval=IP_PMTUDISC_DONT;
+ break;
+ }
if(setsockopt(sock_info->socket, IPPROTO_IP, IP_MTU_DISCOVER,
(void*)&optval, sizeof(optval)) ==-1){
LM_ERR("IPv4 setsockopt: %s\n", strerror(errno));
@@ -359,9 +369,19 @@ int udp_init(struct socket_info* sock_info)
}
} else if (addr->s.sa_family==AF_INET6){
/* IPv6 never fragments but sends ICMPv6 Packet too Big,
- * If pmtu_discovery=1 then set DF bit and do Path MTU discovery
- * disabled by default. Specific to IPv6. */
- optval= (pmtu_discovery) ? IPV6_PMTUDISC_DO : IPV6_PMTUDISC_DONT;
+ * If pmtu_discovery=1 then set DF bit and do Path MTU discovery,
+ * disabled by default. Specific to IPv6. If pmtu_discovery=2
+ * then the datagram will be fragmented if needed according to
+ * path MTU */
+ switch (pmtu_discovery) {
+ case 1: optval=IPV6_PMTUDISC_DO;
+ break;
+ case 2: optval=IPV6_PMTUDISC_WANT;
+ break;
+ case 0:
+ default: optval=IPV6_PMTUDISC_DONT;
+ break;
+ }
if(setsockopt(sock_info->socket, IPPROTO_IPV6,
IPV6_MTU_DISCOVER,
(void*)&optval, sizeof(optval)) ==-1){
Module: kamailio
Branch: master
Commit: 24cfce96a1e9e970ab7661a4e188dab2b3542fd0
URL: https://github.com/kamailio/kamailio/commit/24cfce96a1e9e970ab7661a4e188dab…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-08-19T14:02:16Z
tm: improve comment related to dns failover, add debug output in this case
---
Modified: src/modules/tm/timer.c
---
Diff: https://github.com/kamailio/kamailio/commit/24cfce96a1e9e970ab7661a4e188dab…
Patch: https://github.com/kamailio/kamailio/commit/24cfce96a1e9e970ab7661a4e188dab…
---
diff --git a/src/modules/tm/timer.c b/src/modules/tm/timer.c
index 4c821ba871..8437b4ed40 100644
--- a/src/modules/tm/timer.c
+++ b/src/modules/tm/timer.c
@@ -442,12 +442,14 @@ inline static void final_response_handler(
BLST_ERR_TIMEOUT, &r_buf->dst, r_buf->my_T->uas.request);
#endif
#ifdef USE_DNS_FAILOVER
- /* if this is an invite, the destination resolves to more ips, and
- * it still hasn't passed more than fr_inv_timeout since we
- * started, add another branch/uac */
+ /* if this is an request, the destination resolves to more IPs, and
+ * it still hasn't passed more than max_inv_lifetime or
+ * max_noninv_lifetimesince we started, add another branch/uac */
if(cfg_get(core, core_cfg, use_dns_failover)) {
now = get_ticks_raw();
if((s_ticks_t)(t->end_of_life - now) > 0) {
+ LM_DBG("send on branch %d failed, adding another branch\n",
+ r_buf->branch);
branch_ret = add_uac_dns_fallback(
t, t->uas.request, &t->uac[r_buf->branch], 0);
prev_branch = -1;
Module: kamailio
Branch: master
Commit: d6b1c20d3ad94d9136cf247e67b7fc0d32b18d3b
URL: https://github.com/kamailio/kamailio/commit/d6b1c20d3ad94d9136cf247e67b7fc0…
Author: Henning Westerholt <hw(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2022-08-09T14:11:59Z
tm: restore X/AVP values from initial transaction in DNS failover processing
- restore X/AVP values from initial transaction in DNS failover processing
- the X/AVP context gets lost, so we need to re-create it from the transaction
- otherwise modules that depends on the X/AVPs, e.g. topology hiding will not work
- tested with one load-balancer and two proxy servers
---
Modified: src/modules/tm/t_fwd.c
---
Diff: https://github.com/kamailio/kamailio/commit/d6b1c20d3ad94d9136cf247e67b7fc0…
Patch: https://github.com/kamailio/kamailio/commit/d6b1c20d3ad94d9136cf247e67b7fc0…
---
diff --git a/src/modules/tm/t_fwd.c b/src/modules/tm/t_fwd.c
index fbcf1b3e02..6b26f28f6a 100644
--- a/src/modules/tm/t_fwd.c
+++ b/src/modules/tm/t_fwd.c
@@ -1042,6 +1042,8 @@ int add_uac_dns_fallback(struct cell *t, struct sip_msg* msg,
t->uac[t->nr_of_outgoings].on_branch_failure = old_uac->on_branch_failure;
/* copy branch flags */
t->uac[t->nr_of_outgoings].branch_flags = old_uac->branch_flags;
+ /* restore X/AVP values from initial transaction */
+ tm_xdata_swap(t, 0, 0);
if (cfg_get(tm, tm_cfg, reparse_on_dns_failover)){
/* Reuse the old buffer and only replace the via header.