### Description
I used sip_p_charging_vector() function of siputils with flag f (remove + generate).
This function works fine if call is received without a P-Charging-Vector and only generate needs to be done.
But if the INVITE already contains a P-Charging-Vector and this vector needs to be removed and replaced by a new generated P-Charging-Vector the output is messed up.
The sip_p_charging_vector() function with flag r (remove) works fine too. P-Charging-Vector is removed if INVITE contains one. So for me this looks like an issue with the combination of remove + generate.
See SIP Traffic attached. The "old" P-Charging-Vector is not deleted and additionaly instead of a new P-Charging-Vector the "old" P-Charging-Vector is added again above SDP. Also some part of the next line "Session-Exp" is added and "TH: dih".
-----
TH: dih
icid-value=0d702d06-5700-103e-00-00-00-10-6b-03-dd-04;icid-generated-at=213.xxx.xxx.xxx
Session-Exp
-----
### Troubleshooting
#### Reproduction
It looks like the issue is triggered always a p-charging-vector is received by kamailio and sip_p_charging_vector() with flag f is called.
#### 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
```
**This message is received by kamailio (Incoming):**
INVITE sip:+49xxxxxxxx;npdi;rn=+49xxxxxxxx@bob.com:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP 213.xxx.xxx.xxx:5060;branch=z9hG4bK08Bf3722bac16f3e05b
From: <sip:+43xxxxxxxx@alice.com;user=phone>;tag=gK085abca7
To: <sip:+49xxxxxxxx0@92.xxx.xxx.xxx:5060;user=phone>
Call-ID: 168341746_132086108(a)213.xxx.xxx.xxx
CSeq: 373279 INVITE
Max-Forwards: 67
Allow: INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed
Contact: <sip:+43xxxxxxxx@213.xxx.xxx.xxx:5060>
P-Asserted-Identity: <sip:+43xxxxxxxx@alice.com:5060;user=phone>
Supported: timer,100rel,histinfo
P-Charging-Vector: icid-value=0d702d06-5700-103e-00-00-00-10-6b-03-dd-04;icid-generated-at=213.xxx.xxx.xxx
Session-Expires: 1800
Min-SE: 90
Content-Length: 236
Content-Disposition: session; handling=required
Content-Type: application/sdp
v=0
o=Sonus_UAC 278609 22801 IN IP4 213.xxx.xxx.xxx
s=SIP Media Capabilities
c=IN IP4 213.xxx.xxx.xxx
t=0 0
m=audio 29020 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=ptime:20
**This message is send out by kamailio (outgoing):**
INVITE sip:+49xxxxxxxx;npdi;rn=+49xxxxxxxx@bob.com:5060;user=phone SIP/2.0
Record-Route: <sip:172.xxx.xxx.xxx;r2=on;lr=on;ftag=gK085abca7>
Record-Route: <sip:92.xxx.xxx.xxx9;r2=on;lr=on;ftag=gK085abca7>
Via: SIP/2.0/UDP 172.xxx.xxx.xxx;branch=z9hG4bKc451.940fa2c220f96c1ef968de3c156db262.0
Via: SIP/2.0/UDP 213.xxx.xxx.xxx:5060;TH=div;branch=z9hG4bK08Bf3722bac16f3e05b
From: <sip:+43xxxxxxxx@alice.com;user=phone>;tag=gK085abca7
To: <sip:+49xxxxxxxx@92.xxx.xxx.xxx:5060;user=phone>
Call-ID: 168341746_132086108(a)213.xxx.xxx.xxx
CSeq: 373279 INVITE
Max-Forwards: 66
Allow: INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed
Contact: <sip:+43xxxxxxxx@213.xxx.xxx.xxx:5060>
P-Asserted-Identity: <sip:+43xxxxxxxx@alice.com:5060;user=phone>
Supported: timer,100rel,histinfo
P-Charging-Vector: icid-value=0d702d06-5700-103e-00-00-00-10-6b-03-dd-04;icid-generated-at=213.xxx.xxx.xxx
Session-Expires: 1800
Min-SE: 90
Content-Length: 252
Content-Disposition: session; handling=required
Content-Type: application/sdp
**_TH: dih
icid-value=0d702d06-5700-103e-00-00-00-10-6b-03-dd-04;icid-generated-at=213.xxx.xxx.xxx
Session-Exp_**
v=0
o=Sonus_UAC 278609 22801 IN IP4 92.xxx.xxx.xxx
s=SIP Media Capabilities
c=IN IP4 92.xxx.xxx.xxx
t=0 0
m=audio 34622 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=rtcp:34623
a=ptime:20
```
### Additional Information
```
version: kamailio 5.8.2 (x86_64/linux) 3fa5f4
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_SEND_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: 3fa5f4
compiled on 15:54:29 Jul 22 2024 with gcc 10.2.1
```
* **Operating System**:
```
Debian GNU/Linux 11
5.10.0-26-amd64 #1 SMP Debian 5.10.197-1 (2023-09-29) x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3929
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3929(a)github.com>
Hi,
we had strange behavior with kamailio when some rtpengines were
unreachable, so we looked into the the source code and found this in
select_rtpp_node_new():
3323 /* Try to enable if it's time to try. */
3324 if(node->rn_disabled && node->rn_recheck_ticks <= get_ticks()) {
3325 node->rn_disabled = rtpp_test(node, 1, 0);
3326 }
Does this mean that a ping will be done during rtpengine manage?
Is this wise? I mean there are dedicated pings in the background. Doing
this in rtpengine manage will only periodically delay the processing of
a SIP message. We fear that in high traffic situations this could occupy
all threads. Is this a bug?
As a workaround we think setting rtpengine_tout_ms to a lower value
might help as it shortens the amount of time the module delays the
processing of the SIP message.
What do you think?
Best wishes
Christian Berger
--
Christian Berger - berger(a)sipgate.de
Telefon: +49 (0)211-63 55 55-0
Telefax: +49 (0)211-63 55 55-22
sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391
www.sipgate.de - www.sipgate.co.uk
<!-- 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
- [x] Related to issue #3823
#### Description
<!-- Describe your changes in detail -->
This PR aims to implement what was discussed in [mailing list](https://lists.kamailio.org/mailman3/hyperkitty/list/sr-dev@lists.kama… regarding some `tls.reload` and increasing memory usage.
It adds a new parameter `enable_shared_ctx` in `tls` module that if set to 0, preserves the old behavior and if set to 1 (other than 0 tbh), it creates a single SSL context that is being shared. This have the effect of using way less memory when initialized as well, but also minimizes (can't say it fixes the problem) the `tls.reload` memory increase.
I have also added a small markdown (comparison.md) file, where some comparisons where made between enabled/disabled shared context and with/without CA file (where the initial problem was occurring by the reporter).
Feedback would be necessary to verify whether this patch, acts as expected and kamailio works as intented.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3972
-- Commit Summary --
* tls: Add parameter for shared contexts
* tls: Comparison for enable_shared_ctx
-- File Changes --
A comparison.md (15)
M src/modules/tls/tls_domain.c (172)
M src/modules/tls/tls_mod.c (11)
M src/modules/tls/tls_mod.h (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3972.patchhttps://github.com/kamailio/kamailio/pull/3972.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3972
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3972(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:
* 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.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in pursuing 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
Hello, I am trying to setup db_redis with TLS and redis-cluster support, I get the following errors during installation.
### Troubleshooting
#### Reproduction
Install hiredis(v1.2.0) and hiredis-cluster(v0.13.0) from source, both with ssl support.
Then install kamailio 5.8.1 from source with db_redis module
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### 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).
-->
```
37.77 CC (gcc) [M db_redis.so] db_redis_mod.o
37.85 CC (gcc) [M db_redis.so] redis_connection.o
37.90 redis_connection.c: In function 'db_redis_connect':
37.90 redis_connection.c:129:9: error: unknown type name 'redisSSLContext'; did you mean 'redisContext'?
37.90 129 | redisSSLContext *ssl = NULL;
37.90 | ^~~~~~~~~~~~~~~
37.90 | redisContext
37.90 redis_connection.c:166:17: warning: implicit declaration of function 'redisInitOpenSSL' [-Wimplicit-function-declaration]
37.90 166 | redisInitOpenSSL();
37.90 | ^~~~~~~~~~~~~~~~
37.90 redis_connection.c:167:23: warning: implicit declaration of function 'redisCreateSSLContext' [-Wimplicit-function-declaration]
37.90 167 | ssl = redisCreateSSLContext(
37.90 | ^~~~~~~~~~~~~~~~~~~~~
37.90 redis_connection.c:167:21: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
37.90 167 | ssl = redisCreateSSLContext(
37.90 | ^
37.91 redis_connection.c:196:17: warning: implicit declaration of function 'redisClusterSetOptionEnableSSL'; did you mean 'redisClusterSetOptionMaxRetry'? [-Wimplicit-function-declaration]
37.91 196 | redisClusterSetOptionEnableSSL(con->con, ssl);
37.91 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37.91 | redisClusterSetOptionMaxRetry
37.93 make[2]: *** [../../Makefile.rules:100: redis_connection.o] Error 1
37.93 make[1]: *** [Makefile:508: modules] Error 1
37.93 make[1]: Leaving directory '/root/build/kamailio/src'
37.93 make: *** [Makefile:34: all] Error 2
```
### Additional Information
* **Kamailio Version**:
```
Kamailio 5.8.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`)
-->
```
Debian 12
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3893
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3893(a)github.com>