<!-- 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
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
kamctl now sources the kamctlrc from only one location if available in this order:
1. same folder as kamctl,
2. {intstall_prefix}/etc/kamailio/,
3. ~/.kamctlrc
4. /etc/kamailio/.
If no kamctlrc is found, it continues just like before. Should it stop?
#### Issue description
`kamctl` uses env variables from all the config files above, and retains the env value of the latest config that declares it.
Let's say we have 3 kamctlrc files right now:
```
# first config file (same folder that kamctl resides)
# {prefix_install}/sbin/kamctlrc
...
SIP_DOMAIN=kamailio.org
DBENGINE is commented
...
```
```
# second config file
# /etc/kamailio/kamctlrc
...
SIP_DOMAIN=kam02.tst.nbg.gilawa.net
DBENGINE=MYSQL
...
```
```
# third config file
# {prefix_install}/etc/kamailio/kamctlrc
...
SIP_DOMAIN is commented
DBENGINE=MYSQL
...
```
Running `{install_prefix}/sbin/kamctl` (before changes in order) it prints :
```
Loading config file /home/xenofon/kamailio-source-install/sbin/kamctlrc
Loading config file /etc/kamailio/kamctlrc
Loading config file /home/xenofon/kamailio-source-install/etc/kamailio//kamctlrc
SIP_DOMAIN env var is kam02.tst.nbg.gilawa.net
DBENGINE env var is MYSQL
```
suggesting that env variables from multiple sources are gathered and overwritten in cases.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3594
-- Commit Summary --
* kamctl: Source only one kamctlrc
-- File Changes --
M utils/kamctl/kamctl (23)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3594.patchhttps://github.com/kamailio/kamailio/pull/3594.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3594
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3594(a)github.com>
Hello,
during the Kamailio Developers Meeting 2023 in Dusseldorf that took
place last week, it was proposed to obsolete modules that seem to be
unmaintained and no activity about them was noticed during the past
years. It is quite some overhead in packaging them and trying to keep
them compiling when they have external dependencies, therefore such step
should spare some resources in the future.
The list (see below) was built based on the options of those present at
the meeting, now we want to discuss it on the larger communities of
developers and users. If you are using any of these modules or you think
any of them worth keeping, reply with the names of the modules that you
want to be kept.
The proposed action is to relocate the obsoleted modules to a new git
repository "kamailio-obsolete" to still keep some visibility to them and
in the eventually of future interest on any of them, it can be
reintroduced in the main repository.
Next is the initial list of modules proposed to be considered obsolete:
- app_java
- app_lua_sr
- app_mono
- app_python
- app_sqlang
- auth_identity
- call_control
- db2_ldap
- db2_ops
- db_cassandra
- db_perldvdb
- dnssec
- domainpolicy
- h350
- mediaproxy
- osp
- peering
- print
- print_lib
- pua_xmpp
- ratelimit
- uid_auth_db
- uid_avp_db
- uid_domain
- uid_gflags
- uid_uri_db
- uri_db
- xmpp
- xprint
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Kamailio Advanced Training -- asipto.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:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
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
When having Kamailio listen for TLS on some alternative port other than 5061 - the `myself` condition doesn't match.
<!--
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.
-->
`kamailio.cfg`
enable_tls=yes
tls_port_no=9061
listen=192.168.2.2:9061 advertise "mydomain.com":9061
```
request_route {
if (uri==myself)
xlog("L_INFO", "myself matched\n");
else
xlog("L_INFO", "myself didn't match\n");
}
```
Send a SIP request to Kamailio over TLS on port 9061 but RURI like `192.168.2.2;transport=tls` and observe the log output.
#### 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).
-->
```
OPTIONS sip:192.168.2.2;transport=tls SIP/2.0
Via:SIP/2.0/TLS 10.10.10.10:8934;branch=z9hG4bKfhsdjh2478sdfh256
From:<sip:10.10.10.10>;tag=834848136-1699739
To:<sip:192.168.2.2>
Call-ID:SSE2150339541111236507
CSeq:100 OPTIONS
Max-Forwards:0
Content-Length:0
```
### 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.4 (x86_64/linux) 239d0a
```
* **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 GNU/Linux 11 (bullseye)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3638
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3638(a)github.com>
Module: kamailio
Branch: 5.6
Commit: b230a4621c4fa4a19860c6e909bc06da3d4633c5
URL: https://github.com/kamailio/kamailio/commit/b230a4621c4fa4a19860c6e909bc06d…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2023-11-13T16:56:16+01:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/db_text/README
Modified: src/modules/ldap/README
Modified: src/modules/snmpstats/README
Modified: src/modules/sst/README
---
Diff: https://github.com/kamailio/kamailio/commit/b230a4621c4fa4a19860c6e909bc06d…
Patch: https://github.com/kamailio/kamailio/commit/b230a4621c4fa4a19860c6e909bc06d…
---
diff --git a/src/modules/db_text/README b/src/modules/db_text/README
index a43bf8087ca..be34a3dc2dc 100644
--- a/src/modules/db_text/README
+++ b/src/modules/db_text/README
@@ -426,7 +426,7 @@ loadmodule "modules/auth_db/auth_db.so"
# use dbtext database for persistent storage
modparam("usrloc", "db_mode", 2)
-modparam("usrloc|auth_db", "db_url", "db_text:///tmp/kamailiodb")
+modparam("usrloc|auth_db", "db_url", "text:///tmp/kamailiodb")
# -- auth params --
#
diff --git a/src/modules/ldap/README b/src/modules/ldap/README
index c7555ca3c60..921f45822f1 100644
--- a/src/modules/ldap/README
+++ b/src/modules/ldap/README
@@ -533,7 +533,7 @@ ldap_result("telephoneNumber/$avp(s:tel_number)");
AVP. It can be either str for string, or int for integer. If avp_type
is specified as int then ldap_result tries to convert the LDAP
attribute values to integer. In this case, the values are only stored
- as AVP if the conversion to integer is succesfull.
+ as AVP if the conversion to integer is successful.
Function Parameters:
diff --git a/src/modules/snmpstats/README b/src/modules/snmpstats/README
index e22b2485130..047bb275189 100644
--- a/src/modules/snmpstats/README
+++ b/src/modules/snmpstats/README
@@ -340,7 +340,7 @@ modparam("snmpstats", "sipEntityType", "proxyServer")
The SNMPStats module monitors the number of bytes waiting to be
consumed by Kamailio. If the number of bytes waiting to be consumed
- exceeds a minor threshold, the SNMPStats module will send out an
+ exceeds a minor threshold, the SNMPStats module will send out a
kamailioMsgQueueDepthMinorEvent trap to signal that an alarm condition
has occurred. The minor threshold is set with the
MsgQueueMinorThreshold parameter.
@@ -357,7 +357,7 @@ modparam("snmpstats", "MsgQueueMinorThreshold", 2000)
The SNMPStats module monitors the number of bytes waiting to be
consumed by Kamailio. If the number of bytes waiting to be consumed
- exceeds a major threshold, the SNMPStats module will send out an
+ exceeds a major threshold, the SNMPStats module will send out a
kamailioMsgQueueDepthMajorEvent trap to signal that an alarm condition
has occurred. The major threshold is set with the
MsgQueueMajorThreshold parameter.
diff --git a/src/modules/sst/README b/src/modules/sst/README
index ed31b933133..3444863563d 100644
--- a/src/modules/sst/README
+++ b/src/modules/sst/README
@@ -90,7 +90,7 @@ Chapter 1. Admin Guide
The sst module provides a way to update the dialog expiry timer based
on the SIP INVITE/200 OK Session-Expires header value. You can use the
- sst module in a Kamailio proxy to allow freeing of local resources of
+ sst module in an Kamailio proxy to allow freeing of local resources of
dead calls.
You can also use the sst module to validate the MIN_SE header value and
Hello,
while couple of developers are at Kamailio project meeting in
Dusseldorf, it was somehow agreed here that it would be easier to
backport fixes from master to branch 5.7 if the code in that stable
branch is going to be formatted using clang like it was done for master.
Should anyone has any remarks against it, let's discuss. If not,
probably it is going to be done in couple of days, then plan to release
5.7.3.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Use tcp_send_timeout config option also on listening socket to timeout outbound messages sent on passive inbound connections.
#### 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 -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #3443
#### Description
Based on the description of core parameter "tcp_send_timeout" the timeout should also work for sending on forked incoming tcp connections. But sending on a broken connection causes the kernel to use the default values of `tcp_retries1` and `tcp_retries2` , leading to try to send a SIP message for 15 minutes. This makes absolutely no sense in a real time kamailio application.
Following man 7 tcp TCP_USER_TIMEOUT can be used on recent Linux kernels to utilize tcp_send_timeout:
TCP_USER_TIMEOUT (since Linux 2.6.37)
This option takes an unsigned int as an argument. When the value is greater than 0, it specifies the maximum
amount of time in milliseconds that transmitted data may remain unacknowledged before TCP will forcibly close the
corresponding connection and return ETIMEDOUT to the application. If the option value is specified as 0, TCP will
use the system default.
Increasing user timeouts allows a TCP connection to survive extended periods without end-to-end connectivity. De‐
creasing user timeouts allows applications to "fail fast", if so desired. Otherwise, failure may take up to 20
minutes with the current system defaults in a normal WAN environment.
This option can be set during any state of a TCP connection, but is effective only during the synchronized states
of a connection (ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, and LAST-ACK). Moreover, when used
with the TCP keepalive (SO_KEEPALIVE) option, TCP_USER_TIMEOUT will override keepalive to determine when to close
a connection due to keepalive failure.
The option has no effect on when TCP retransmits a packet, nor when a keepalive probe is sent.
This option, like many others, will be inherited by the socket returned by accept(2), if it was set on the listen‐
ing socket.
Further details on the user timeout feature can be found in RFC 793 and RFC 5482 ("TCP User Timeout Option").
Having a tcp connection break by firewall or network breakdown the retransmits to this destination are now aborted after `tcp_send_timeout` seconds with a
NOTICE: <core> [core/tcp_read.c:267]: tcp_read_data(): error reading: Connection timed out (110) ([1.2.3.4]:51151 ->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3528
-- Commit Summary --
* core: Add TCP_USER_TIMEOUT socket option on listening socket.
-- File Changes --
M src/core/tcp_main.c (13)
M src/core/tcp_options.h (7)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3528.patchhttps://github.com/kamailio/kamailio/pull/3528.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3528
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3528(a)github.com>
>From http://lists.kamailio.org/pipermail/sr-dev/2016-August/036231.html
On 24/08/16 10:17, Andreas Granig wrote:
> Hi,
>
> When translating strings with the dialplan module, you sometimes end up
> with very complex patterns for sanitizing the target string and
> performing some replacements, since for a given dialplan id, processing
> stops on the first match within the dialplan entries for a given dpid.
>
> The idea is to introduce a "continue" flag (default 0) in the dialplan
> table indicating to proceed with processing further dialplan entries
> within the given dpid after a match. The use case is to have a sanitize
> rule with highest priority which e.g. removes any spaces, dashes and
> parentheses from the target string, then with a lower priority do
> further processing with the cleaned up string, e.g. stripping leading
> double-zeroes or a plus when normalizing to E164 numbers, or replacing a
> single leading zero with the country code and so on.
>
> This is particularly useful when a user dials a number from an address
> book of some sort (e.g. on a mobile app) where number formats are stored
> with country-specific formating characters like "+1-(234)-567 890", and
> catching all of that in one rule results in really messy match/replace
> patterns.
--
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/764
Module: kamailio
Branch: 5.7
Commit: 60abd912f0fc2e237fb833d63250c184e7401ae5
URL: https://github.com/kamailio/kamailio/commit/60abd912f0fc2e237fb833d63250c18…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2023-11-13T13:32:50+01:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/http_client/README
Modified: src/modules/tls/README
---
Diff: https://github.com/kamailio/kamailio/commit/60abd912f0fc2e237fb833d63250c18…
Patch: https://github.com/kamailio/kamailio/commit/60abd912f0fc2e237fb833d63250c18…
---
diff --git a/src/modules/http_client/README b/src/modules/http_client/README
index c3788a1c2cc..bb11b1a1d24 100644
--- a/src/modules/http_client/README
+++ b/src/modules/http_client/README
@@ -262,6 +262,13 @@ Chapter 1. Admin Guide
3.19. config_file (string)
3.20. netinterface (string)
+ The parameters are loaded in order. That can lead to unexpected
+ behavior: If httpcon is set at first, the default values for all other
+ parameters are used, and not the values that might be set after
+ httpcon. For example, if setting verify_peer=0 or verify_host=0 after
+ httpcon, the certificates are checked and self-signed certificates are
+ rejected nevertheless.
+
3.1. httpredirect (int)
If set to 1, enabled, http_client will follow HTTP 302 Redirects. If
diff --git a/src/modules/tls/README b/src/modules/tls/README
index ed3c2908030..a5897da4f88 100644
--- a/src/modules/tls/README
+++ b/src/modules/tls/README
@@ -245,6 +245,10 @@ Chapter 1. Admin Guide
memory. For example, such case has been reported for Ubuntu 20.04 or
RedHat 8.
+ Note: with some particular combination of OS, openssl and mysql-client
+ libraries, there were reports of random crashes, in such case try to
+ set the db_mysql module parameter opt_ssl_mode to 1.
+
2. Quick Start
The default kamailio.cfg file has basic tls support included, it has to
- URL: https://github.com/kamailio/kamailio/commit/9081a586b32095b1d98ac9fef232816…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T12:06:00+01:00
core: dns cache - warnings on put for unlinked items
(cherry picked from commit 1bb1ba60992ffa35e8d36ed1dab98fdc36a2ea30)
- URL: https://github.com/kamailio/kamailio/commit/259812f03ec26d49776050ca5eb657f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T12:07:08+01:00
kamctl: check if kamctlrc is readable
- related to GH #3594
(cherry picked from commit a3fd3b12ca9b1c3688255e9d645085947052bc6d)
- URL: https://github.com/kamailio/kamailio/commit/b503b95a2a62a2e51a5cff20caaa302…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T12:07:21+01:00
kamdbctl: check if kamctlrc is readable
(cherry picked from commit f16ec35fa448d03613e6bbbff4c354012f56073e)
- URL: https://github.com/kamailio/kamailio/commit/1be68f52c4b2065c7a7da0c917e9c06…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T12:35:20+01:00
core: tcp - set limit for reading a message
- default 10sec - if message is not read, close connection
- cleanup is done on timer, it can take an additional 10sec to clean up
connection
(cherry picked from commit f5b46efc3a97aa45d090f46990a40bcc9dd91390)
- URL: https://github.com/kamailio/kamailio/commit/e18ed857576ed682ee620184c8c1053…
Author: Nikolay Ivanuschak <ivanuschak.nikolay(a)gmail.com>
Date: 2023-11-13T12:36:58+01:00
core: fixed wrong network interface selection.
fixed incorrect source IP address selection for the SIP
messages sending procedure when TCP transport is used or
for UDP with the 'mhomed' setting set as 'mhomed=1'.
(cherry picked from commit d4e16520a06344ce2bfd07eda4447d68a2c3fce8)
- URL: https://github.com/kamailio/kamailio/commit/68f5f43963511dec19eaed2300d8ba1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T12:39:08+01:00
core: tcp - close connection without data traffic at all
- default timeout: 20sec
- cleanup is done on timer, it can take another 10sec
(cherry picked from commit ef86402d2397ff7b0416bc17ab0a2ba906402215)
- URL: https://github.com/kamailio/kamailio/commit/e21c8180cb8a676e48cea84427247c4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T12:39:19+01:00
core: tcp - exclude crlf ping from data exchage state
(cherry picked from commit ddfe15f860555048f1ad6884727d4eb52f11910f)
- URL: https://github.com/kamailio/kamailio/commit/25d50b8977290d53da60a0f5800f762…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T12:51:23+01:00
core: tcp - limit number of accepted connections per src ip
- default 1024
(cherry picked from commit a902e4a032a85a7755de32eeadac800a1312e64f)
- URL: https://github.com/kamailio/kamailio/commit/07c61363a9c1065cf5754672b6ef78c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T12:55:34+01:00
core: added msg_recv_max_size global parameter
- set limit for max size of received tcp or upd messages
(cherry picked from commit b56037fab181037d48bfc90802f25b85ae8bee04)
- URL: https://github.com/kamailio/kamailio/commit/0d890ed6fd7afd351ba84933da1f90a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:01:02+01:00
core: added tcp_msg_read_timeout parameter
- specify read timeout for tcp messages
(cherry picked from commit 92feec4fa026a153d1f9ed79e5893bf1086db909)
- URL: https://github.com/kamailio/kamailio/commit/5bedf8c17a6309f3c17c69cfc6dacd9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:01:18+01:00
core: added tcp_check_timer parameter
- set the check interval (in seconds) for tcp connections
- default 10
(cherry picked from commit 1acede64041307b783ed90736ca114917bafbc14)
- URL: https://github.com/kamailio/kamailio/commit/a86a46474bf53103155ee4e4dac200c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:01:45+01:00
core: added tcp_msg_data_timeout parameter
- duration in seconds for how long to wait till data is received on a
new tcp connection
- default 20
(cherry picked from commit 213e19108699ed4ea5c962caf673b0a60ce41480)
- URL: https://github.com/kamailio/kamailio/commit/6fbabb1fc2d93bd1983ad40d0d122ed…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:03:04+01:00
core: added tcp_accept_iplimit parameter
- set limit for accepted connections from the same ip address
- default 1024
(cherry picked from commit 241127c5f0820614a3e2ac1467e9f8cb8a0eeb23)
- URL: https://github.com/kamailio/kamailio/commit/acd47ad9a175684548dd3fb9c45d18c…
Author: VoIPNuggets.com <akash(a)voipnuggets.com>
Date: 2023-11-13T13:04:23+01:00
tools: route_graph - added README file and updated reference URL [skip ci]
(cherry picked from commit 976da8c72e9a056b724f584a803a4a8114f70d30)
- URL: https://github.com/kamailio/kamailio/commit/2481ccd984ac0b9896def8b36458a34…
Author: Juha Heinanen <jh(a)tutpro.com>
Date: 2023-11-13T13:04:34+01:00
core: change tcp_check_timer initialization
- make tcp_check_timer default to depend on tcp_msg_data_timeout and
ksr_tcp_msg_read_timeout values, set to half of the minimum of the
two, it is not explicitely set
- GH #3608
(cherry picked from commit 5077127b0fe1a2d803e42abe19cfcd93339f0519)
- URL: https://github.com/kamailio/kamailio/commit/97a37f7b9ad89a409e3a03bb63f0784…
Author: Xenofon Karamanos <xk(a)gilawa.com>
Date: 2023-11-13T13:04:48+01:00
tls: Add and apply tls_openssl_clear_errors function
(cherry picked from commit 110ebbafadcc225f4e88749287f06ae29a6cfa2e)
- URL: https://github.com/kamailio/kamailio/commit/84a6b3f59165372400340a7f0496531…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-11-13T13:05:31+01:00
presence: active_watcher cleanup timer
related #3074
(cherry picked from commit f27eda6fe3d99d1352d4df86d79e4646b0a4c17a)
- URL: https://github.com/kamailio/kamailio/commit/c9c0b12efc7031ee894a62c6a148fec…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:06:07+01:00
tls: include file to fix warning about tls_openssl_clear_errors()
(cherry picked from commit fe8eafd31327c14e7b081cd8f4a6532953e0a1c6)
- URL: https://github.com/kamailio/kamailio/commit/d93d8b882b584ef41721f7c6d9fb221…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:06:38+01:00
topos: remove check of th_param_mask_callid() for api callid masking
- functions are not for topoh internal usage, but for intermodule API
- reported as part of GH #3606
(cherry picked from commit e5ecb666abd24433b0de030980f79e2521439524)
- URL: https://github.com/kamailio/kamailio/commit/5ddfa0b2f29dbbe30e1933edf0110f8…
Author: Konstantin Tumalevich <userad(a)gmail.com>
Date: 2023-11-13T13:07:05+01:00
app_ruby: Fix rpc documentation typo
(cherry picked from commit 111d9f70cf55eca08b78e21213f3452fa8622d21)
- URL: https://github.com/kamailio/kamailio/commit/ba19a8f30d6c9f7757ef0c8d55e2139…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:07:47+01:00
dmq_usrloc: avoid needless second local socket search
- remove overwriting local socket string value with received item
(cherry picked from commit f97149aec9da71085df9dcf4541abba7b756939c)
- URL: https://github.com/kamailio/kamailio/commit/ab7cf4e57ee800c60ec171f801a76f1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:07:58+01:00
usrloc: reformat exported structures to be more readable
(cherry picked from commit 9a50e380216b7557b53a2e8a0e4068f81ecf635e)
- URL: https://github.com/kamailio/kamailio/commit/6d0d39311fdf09007aaae6ac0e4e034…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:08:33+01:00
secsipid_proc: Makefile - look for secsipid include and libs in localbase
- done when pkg-config cannot find libsecsipid install details
(cherry picked from commit a2468e66f530822094569cf847796d91b17d4be9)
- URL: https://github.com/kamailio/kamailio/commit/1bd0c64845e5eb90492cfa107bb4afd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:09:03+01:00
core: error - better message for E_OUT_OF_MEM
(cherry picked from commit 1e4bf66d37afcded52fcaa2a0dd61a87bb1f2c67)
- URL: https://github.com/kamailio/kamailio/commit/dd034befebc2bed440979bce51c04d8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:09:12+01:00
tls: note about db_mysql module parameter opt_ssl_mode
(cherry picked from commit d157aed3fc69d3584cb9e6ca0112e47ab917e88e)
- URL: https://github.com/kamailio/kamailio/commit/98e2b05e29716d60789aadac59b372c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:09:27+01:00
core: new code for internal processing error
(cherry picked from commit e34d41557e3a88cfb76571fb3f2793d85d264710)
- URL: https://github.com/kamailio/kamailio/commit/3dee1d598957cb092608e987b1d4f8a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:09:36+01:00
tm: update return code for EoH check failure
(cherry picked from commit c76444da502325c90eb7ac0cbcc24e7bf16dd5d1)
- URL: https://github.com/kamailio/kamailio/commit/6aec4f79d0cd4af1639df981cfe0877…
Author: Benjamin <92934023+tietzsg(a)users.noreply.github.com>
Date: 2023-11-13T13:10:28+01:00
http_client: add information about parameter loading (#3619)
* http_client: add information about parameter loading
- Inform that the order of the parameters is important when httpcon is loaded first
* http_client: docs - typos from previous commit
---------
Co-authored-by: Daniel-Constantin Mierla <miconda(a)gmail.com>
(cherry picked from commit 02dd4e2c883585601f4dbcea0b63b858b4dd24d6)
- URL: https://github.com/kamailio/kamailio/commit/d015ee9c06a8cb6644101d08e4b54f8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:11:26+01:00
db_redis: init allocated redis table structure
(cherry picked from commit e24df12d10d8b88582907481d161c6a2db5cf8f1)
- URL: https://github.com/kamailio/kamailio/commit/6df7569d6cb54b5057b708120c66db8…
Author: Morten Tryfoss <morten(a)tryfoss.no>
Date: 2023-11-13T13:12:49+01:00
tm: T_ASYNC_SUSPENDED flag not removed when cancelling a suspension
(cherry picked from commit 70ecd99e3d8069d0f89444a5b893f61dd1edd1b3)
- URL: https://github.com/kamailio/kamailio/commit/6fca96d1fe87a8216098304f2b64622…
Author: Christian Marangi <ansuelsmth(a)gmail.com>
Date: 2023-11-13T13:13:28+01:00
kamcmd: Makefile - use CUSTOM_NAME for specifying custom binary name
- previous use of NAME can clash with environment variable NAME that
could be set by OS or by Kamailio modules installation
- GH #3628
(cherry picked from commit b141f267ce1fe1068de1541d8bd5b5dc53c1d6d9)
- URL: https://github.com/kamailio/kamailio/commit/20d8546e0055c43709e77bd8e61377f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:13:47+01:00
topos: update headers for stateless cancel and non-2xx ack
(cherry picked from commit 8f84f6681570d5eb1018e6fe45f280173451bf62)
- URL: https://github.com/kamailio/kamailio/commit/7f1ec26fbf59edc6c771da6104344d6…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-11-13T13:14:05+01:00
dialog: reformat exported structures more human friendly
revert to the format it had before 783a416f1a5
(cherry picked from commit f0cf082effe6a0fd8893299e49a519d90bfc6151)
- URL: https://github.com/kamailio/kamailio/commit/c7290d0ef8f030ae851581ba436a101…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:14:19+01:00
core: utils/srjson - use snprintf() for silenting analyzers
(cherry picked from commit a62d7118a2f86a82fd080ed4a89a0833e8c4d1a2)
- URL: https://github.com/kamailio/kamailio/commit/88ad50d71fe7da01ae4619cdb14d511…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-11-13T13:14:29+01:00
debugger: reformat exported structures more human friendly
revert to the format it had before 656e147c470
(cherry picked from commit 4642a12c109939f71f91ba7807ded1491e241e26)
- URL: https://github.com/kamailio/kamailio/commit/42aae6920883e9633ba36b41b235ce2…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-11-13T13:14:39+01:00
dialplan: reformat exported structures more human friendly
revert to the format it had before 01d0d1de2c8
(cherry picked from commit 6aa940f7acbc565545ae9199b288d16a50bafcab)
- URL: https://github.com/kamailio/kamailio/commit/9f417ee284fd1829c849061aae6b4d0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:15:38+01:00
imc: coverted some static global str variables to macros
(cherry picked from commit 36806bea261f7a29dc1d2a8aedac837a06043968)
- URL: https://github.com/kamailio/kamailio/commit/64f28c7f1fd83719270d914e5368bff…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:15:50+01:00
dialog: use memcpy to fill profile uid
(cherry picked from commit 7bdd7fb4aa666b5f56ae3e554770126ad5b68c2e)
- URL: https://github.com/kamailio/kamailio/commit/40f5343d4ca2b4c1cf76eaf168a9b1a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-13T13:16:08+01:00
app_python3: enable error log mode for some of missing callback functions
- tm-specific callbacks should trigger error log messages if not found
(cherry picked from commit 695dc54dc1547fdee18b00cfa8e4d15f047834a5)
- URL: https://github.com/kamailio/kamailio/commit/94a6bc8fe6fb4dc5599584de1128dbb…
Author: Henning Westerholt <hw(a)gilawa.com>
Date: 2023-11-13T13:16:24+01:00
kamailio.cfg: use xalert instead of old format for xlog, similar as done in other cfg places
(cherry picked from commit 2b9666445a9fd31f75bf86b9924658daffb7ac85)
<!-- 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)
- [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
If an endpoint responds with a CEA (Capabilities-Exchange Answer) indicating support for relaying (application-id 0xffffffff), let this endpoint be used for any application. The DRA will then be responsible for routing the request to the correct destination.
To fully support this, there might be a need for additional changes in some of the modules. That is to make sure subsequent requests for a given session is always routed to the same destination, indicated by Origin-Host in answers from a diameter server. Destination-Host of the new request should then be filled with this value.
A change for the ims_charging module is on the way.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3633
-- Commit Summary --
* cdp: Support for diameter routing agent (DRA) / relay
-- File Changes --
M src/modules/cdp/diameter.h (2)
M src/modules/cdp/routing.c (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3633.patchhttps://github.com/kamailio/kamailio/pull/3633.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3633
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3633(a)github.com>
### Description
Hello,
When there is an error in my ruby script, app_ruby prints exception message without a stack trace, like this:
```
Dec 14 16:25:17 servername /usr/sbin/kamailio[24313]: ERROR: app_ruby [app_ruby_api.c:105]: app_ruby_print_last_exception(): exception: wrong number of arguments (1 for 2..3)
Dec 14 16:25:17 servername /usr/sbin/kamailio[24313]: ERROR: app_ruby [app_ruby_api.c:1078]: app_ruby_run_ex(): ruby exception (6) on callback for: ksr_request_route (res type: 17)
```
Altough this message tells what is the error, it doesn't tell **where** the error happened, so it's hard to find the source of the problem.
In ruby, exceptions have _backtrace()_ method returning stack trace as an array of strings. It would be really helpful if app_ruby also call this method and append its result to error message.
### Reproduction
in kamailio.cfg
```
loadmodule "app_ruby.so"
modparam("app_ruby", "load", "/etc/kamailio/ruby/routes.rb")
cfgengine "ruby"
```
in /etc/kamailio/ruby/routes.rb
```
def some_method(param1, param2)
end
def ksr_request_route
some_method(1)
end
```
### Expected behavior
```
Dec 14 16:46:24 servername /usr/sbin/kamailio[24314]: ERROR: <core> [core/kemi.c:87]: sr_kemi_core_err(): wrong number of arguments (1 for 2): /etc/kamailio/ruby/routes.rb:1:in `some_method'
/etc/kamailio/ruby/routes.rb:4:in `ksr_request_route'
```
#### Actual observed behavior
```
Dec 14 16:45:42 servername /usr/sbin/kamailio[24311]: ERROR: app_ruby [app_ruby_api.c:105]: app_ruby_print_last_exception(): exception: wrong number of arguments (1 for 2)
```
### Possible Solutions
Relevant code seem to be here: https://github.com/kamailio/kamailio/blob/master/src/modules/app_ruby/app_r…
I found example C code to print stack trace here but couldn't figure out how to integrate to app_ruby: http://zoo-project.org/svn/trunk/zoo-project/zoo-kernel/service_internal_ru…
Equivalent ruby code would be (this code is not idiomatic, my aim is to provide C-like ruby code):
```
def some_error_generating_method
method_taking_two_params(1)
rescue => exception
message = exception.to_s() + "\n"
stack_trace = exception.backtrace()
for line in stack_trace
message = message + line + "\n"
end
print(message)
end
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.2.0 (x86_64/linux) 535e13
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 535e13
compiled on 10:26:34 Nov 28 2018 with gcc 4.8.5
```
* **Operating System**:
Centos 7.2 64bit
```
Linux servername 3.10.0-327.28.2.el7.x86_64 #1 SMP Wed Aug 3 11:11:39 UTC 2016 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/1766
Hello,
following the Kamailio Developers Meeting discussions and provided that
GNU/Linux malloc() aligns allocated memory to 16 bytes on x86_64 (64b
CPUs), I just updated the native Kamailio qm (quick malloc - the default
one) and fm (fast malloc) memory managers to also align to 16 bytes:
-
https://www.gnu.org/software/libc/manual/html_node/Aligned-Memory-Blocks.ht…
By default they do it to 16 also for 32b CPUs, the overhead at startup
with default config was rather insignificant (like 5000 bytes for
private memory set to 8MB), so I didn't want to bother that much (that's
also because some 32b CPUs could require larger alignment that the size
of the pointer address), but for flexibility I added the an option to
set the alignment size at compile time with KSR_MEMORY_ALIGN define
(e.g., -DKSR_MEMORY_ALIGN=8UL).
The main benefit at this moment is that Kamailio should be able to use
the OS distribution (e.g., Debian) packaged libwolfssl instead of
bundling and building the library inside it to compile with custom
flags, like it is done now. Also, it is safe for the future to use other
libraries that leverage internally the OS memory alignment size for
specific optimizations.
I also increased the optimize factor to 15, which should speed up a bit
dealing with larger chunks of memory (now up to 32KB, previously was up
to 16KB). Considering that it is more and more common to deal with
larger SIP messages (e.g., a webrtc invite can easily be like 20KB) as
well as tls/encryption needs addition space that the unencrypted udp/tcp.
Hopefully these updates don't have side effects, it was nothing
consistent changed, a few defines and fields to match the new alignment
constraints. But testing is important, try to play with the master and
your configs whenever you have any chance.
Unfortunately the tlsf memory manager seems to be specifically designed
for aligning to 8 bytes, a rather old related issue in that project is
not concluded:
- https://github.com/mattconte/tlsf/issues/16
That means the tls_wolfssl module linked with the officially packaged
libwolfssl has to be used with qm or fm malloc from now on. Or it has to
be built like so far to use tlsf memory manager. The tls/tlsa module can
still be used with tlsf memory manager.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
```
CC (gcc) [M ping_endpoint.so] t_cancel.o
CC (gcc) [M ping_endpoint.so] t_fifo.o
In file included from ../../core/ut.h:42,
from t_fifo.c:38:
t_fifo.c: In function 'append2buf':
../../core/dprint.h:321:73: warning: format '%i' expects argument of type 'int', but argument 11 has type 'long int' [-Wformat=]
321 | fprintf(stderr, "%2d(%d) %s: %.*s%s%s%s" fmt, \
| ^~~~~~~~~~~~~~~~~~~~~~~~
../../core/dprint.h:345:25: note: in expansion of macro 'LOG_FX'
345 | LOG_FX(facility, level, lname, prefix, _FUNC_NAME_, fmt, ## args)
| ^~~~~~
../../core/dprint.h:351:25: note: in expansion of macro 'LOG_FL'
351 | LOG_FL(facility, level, NULL, prefix, fmt, ## args)
| ^~~~~~
../../core/dprint.h:354:25: note: in expansion of macro 'LOG_FP'
354 | LOG_FP(DEFAULT_FACILITY, (level), LOC_INFO, fmt, ## args)
| ^~~~~~
../../core/dprint.h:401:45: note: in expansion of macro 'LOG'
401 | # define DBG(fmt, args...) LOG(L_DBG, fmt , ## args)
| ^~~
../../core/dprint.h:405:36: note: in expansion of macro 'DBG'
405 | # define DEBUG(fmt, args...) DBG(fmt , ## args)
| ^~~
../../core/dprint.h:422:16: note: in expansion of macro 'DEBUG'
422 | #define LM_DBG DEBUG
| ^~~~~
t_fifo.c:576:33: note: in expansion of macro 'LM_DBG'
576 | LM_DBG("AVP <%i>: %p\n",avp_name.n,avp);
| ^~~~~~
CC (gcc) [M ping_endpoint.so] t_funcs.o
CC (gcc) [M ping_endpoint.so] t_fwd.o
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3637
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3637(a)github.com>
Hello,
during the Kamailio Developers Meeting 2023 in Dusseldorf early this
week, Victor Seva shared how one can setup own development environment
for facilitating the automatic checks for clang-format and few other
useful bits (e.g., training white spaces) using pre-commit tool. So I
thought it would be useful to shared further to both developers and
users communities (as the later can make patches and pull requests as well).
If I forgot something, Victor should amend me, but the main steps are:
- install pre-commit package (either via apt or via pip3)
- install clang-format (debian/ubuntu should have it as a package)
- go to the folder with git clone of Kamailio source and run:
pre-commit install
The above command can take some time, but it is needed only once.
After that, on evey commit, the checks should be performed a summary
should be presented on screen, like:
$ git commit src/
check yaml...........................................(no files to
check)Skipped
check xml............................................(no files to
check)Skipped
fix end of
files.........................................................Passed
trim trailing
whitespace.................................................Passed
check for merge
conflicts................................................Passed
mixed line
ending........................................................Passed
clang-format.............................................................Passed
If the check of clang-format results in "Failed", like:
clang-format.............................................................Failed
the pre-commit hooks will correct it, so you can just run again the
commit command and the 2nd time should be good to go.
If for whatsoever reasons pre-commit is installed but you need to
ignore/skip the pre-commit hooks, just provide -n or --no-verify to the
commit command, like:
$ git commit -n src/
By using pre-commit hooks, one could easily avoid making pull requests
that are failing to meet the code formatting checks on github portal as
well as ensure that as developer one does no forget to run clang-format
before commit.
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Module: kamailio
Branch: master
Commit: 80d1f10507190ae1a42c25f0c173188b8326b5b9
URL: https://github.com/kamailio/kamailio/commit/80d1f10507190ae1a42c25f0c173188…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-11-10T14:08:09+01:00
core: qm/fm memory align size can be set with define KSR_MEMORY_ALIGN
- flexibility to be set at compile time via make or compiler parameter
---
Modified: src/core/mem/f_malloc.h
Modified: src/core/mem/q_malloc.h
---
Diff: https://github.com/kamailio/kamailio/commit/80d1f10507190ae1a42c25f0c173188…
Patch: https://github.com/kamailio/kamailio/commit/80d1f10507190ae1a42c25f0c173188…
---
diff --git a/src/core/mem/f_malloc.h b/src/core/mem/f_malloc.h
index c05a243af6f..5a9d28ece42 100644
--- a/src/core/mem/f_malloc.h
+++ b/src/core/mem/f_malloc.h
@@ -46,10 +46,15 @@
* can be 32 bits aligned => malloc should return multiple of long long
* aligned memory
* - malloc() on gnu/linux: multiple of 8 or 16 on 64-bit systems
- * - for simplicity settle for 16 always
+ * - for simplicity settle for 16 by default
* - sizeof(fm_frag) must be multiple of ROUNDTO!
*/
+#ifndef KSR_MEMORY_ALIGN
#define ROUNDTO 16UL
+#else
+#define ROUNDTO KSR_MEMORY_ALIGN
+#endif
+
#define MIN_FRAG_SIZE ROUNDTO
diff --git a/src/core/mem/q_malloc.h b/src/core/mem/q_malloc.h
index b3bfaab3689..5b440688af3 100644
--- a/src/core/mem/q_malloc.h
+++ b/src/core/mem/q_malloc.h
@@ -39,10 +39,14 @@
* can be 32 bits aligned => malloc should return multiple of long long
* aligned memory
* - malloc() on gnu/linux: multiple of 8 or 16 on 64-bit systems
- * - for simplicity settle for 16 always
+ * - for simplicity settle for 16 by default
* - sizeof(qm_frag) and sizeof(qm_frag_end) must be multiple of ROUNDTO!
*/
+#ifndef KSR_MEMORY_ALIGN
#define ROUNDTO 16UL
+#else
+#define ROUNDTO KSR_MEMORY_ALIGN
+#endif
#define MIN_FRAG_SIZE ROUNDTO
### Description
I migrate one of our old project on native to KEMI on app_python3 and get strange behavior - after some time kamailio stops processing requests/replies wit message "ksr_request_route/ksr_reply_route not found or is not callable"
### Troubleshooting
After some research with debug=3 and reading debug logs i found, that some of routes i forgot to rename in calls t_on_reply() and t_on_failure() - because they generates "not found or is not callable" in logs too. Also i check all event routes and found that some event_callbacks point to wrong KEMI functions.
Events of the form (which gave me the idea that it was the wrong names)
DEBUG: 887937087 INVITE app_python3 [python_exec.c:93]: apy_exec(): ksr_onrl_MANAGE not found or is not callable
DEBUG: app_python3 [python_exec.c:93]: apy_exec(): ksr_dialog_event not found or is not callable
presents in logs very rarely (I saw them only after hours of debugging) even after restart.
For me its look like that nonexisted routes completly stops interpretator and block all subsequent processing in the fork and kamailio very rarely has time to log it.
When i use right names of functions it works well and no "ksr_request_route/ksr_reply_route not found or is not callable"
PS: KSR.tm.t_on_branch() with wrong route generates normal exception and nonblock execution
#### Reproduction
Just use wrong names in KSR.tm.t_on_reply()/KSR.tm.t_on_failure() or modparam event_callback in any module (i got it with dispatcher and dialog)
#### Log Messages
Exception that generates by wrong function in KSR.tm.t_on_branch()
ERROR: 63586697 BYE app_python3 [python_support.c:156]: python_handle_exception(): apy_exec: ksr_request_route((null)): Unhandled exception in the Python code:
AttributeError: 'kamailio' object has no attribute 'ksr_br_MANAGE'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/etc/kamailio(a)REGION/python/request_route.py", line 38, in ksr_request_route
if self.ksr_WITHINDLG() == -255:
File "/etc/kamailio(a)REGION/python/ksr_WITHINDLG.py", line 27, in ksr_WITHINDLG
return self.ksr_RELAY()
File "/etc/kamailio(a)REGION/python/ksr_RELAY.py", line 17, in ksr_RELAY
if KSR.tm.t_relay() < 0:
SystemError: <built-in function t_relay> returned a result with an error set
### Possible Solutions
Use rigth names
### Additional Information
version: kamailio 5.7.1 (x86_64/linux) 4238e4
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, 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: 4238e4
compiled on 00:00:00 Sep 13 2022 with gcc 11.3.1
version: kamailio 5.6.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**:
PRETTY_NAME="Oracle Linux Server 9.2"
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3572
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3572(a)github.com>
Module: kamailio
Branch: master
Commit: 8269b719775ce704eade4a832ae8abb56af08841
URL: https://github.com/kamailio/kamailio/commit/8269b719775ce704eade4a832ae8abb…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2023-11-09T09:32:21+01:00
modules: readme files regenerated - rtpengine ... [skip ci]
---
Modified: src/modules/rtpengine/README
---
Diff: https://github.com/kamailio/kamailio/commit/8269b719775ce704eade4a832ae8abb…
Patch: https://github.com/kamailio/kamailio/commit/8269b719775ce704eade4a832ae8abb…
---
diff --git a/src/modules/rtpengine/README b/src/modules/rtpengine/README
index b4e71c7eafa..96693dcd018 100644
--- a/src/modules/rtpengine/README
+++ b/src/modules/rtpengine/README
@@ -463,8 +463,8 @@ Chapter 1. Admin Guide
would specify the weight 2 for this server, for example.
The selection of the set is done from script prior using
- rtpengine_delete(), rtpengine_offer() or rtpengine_answer() functions -
- see the set_rtpengine_set() function.
+ rtpengine_delete(), rtpengine_offer(), rtpengine_answer() or
+ rtpengine_manage() functions - see the set_rtpengine_set() function.
Another way to select the set is to define setid_avp module parameter
and assign setid to the defined avp before calling rtpengine_offer() or
@@ -2150,7 +2150,6 @@ modparam("rtpengine", "dtmf_events_sock", "127.0.0.1:2223")
sends it back to the module to be placed back into the SIP message.
This is useful if you have a set of RTP proxies that the caller must
use, and another distinct set of RTP proxies that the callee must use.
- This is supported by all rtpengine commands except rtpengine_manage().
This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
BRANCH_ROUTE.