tsearle created an issue (kamailio/kamailio#4249)
### Description
I'm trying to make a SIP Rec callflow using t_uac_send to Generate the INVITE and BYE. This automatically generates the ACK in response to the 200 OK. I want to be able to use tm:local-request to do 2 things.
* Add a Contact header to the ACK
* Save Route/Callid/CSeq etc so I can generate an in-dialog bye afterwards.
### Expected behavior
tm:local-request gets called so I can save the relevant headers & modify the outgoing ack
#### Actual observed behavior
tm:local-request does not get called
### Possible Solutions
the associated PR adds this functionality
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 6.0.1 (aarch64/linux)
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-NOSMP, 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: unknown
compiled on 06:24:22 May 22 2025 with gcc 12.2.0
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4249
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4249(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 -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #4247
<!--Describe your changes in detail -->
- Add debug log when trying to ping a node.
Do not ping manually disabled nodes!
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4248
-- Commit Summary --
* rtpengine: Add check for skipping pings on manually disabled nodes.
-- File Changes --
M src/modules/rtpengine/rtpengine.c (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4248.patchhttps://github.com/kamailio/kamailio/pull/4248.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4248
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4248(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
#### Description
When the `presence` module attempts to clean up records in the `presentity` table, it replaces the `etag` with a static, hardcoded string:
```
"*#-OFFLINE-#*"
```
However, the `presentity` table enforces a uniqueness constraint on the following combination of fields:
```
MariaDB [kamailio]> show create table presentity;
| presentity | CREATE TABLE `presentity` (
...
UNIQUE KEY `presentity_idx` (`username`,`domain`,`event`,`etag`),
```
This approach breaks the uniqueness of etag, which is intended to differentiate records , especially in cases such as parallel calls, or when using kamailio as a forking proxy.
Instead of overwriting the etag with the static offline marker, this patch appends the marker to the existing etag value. This ensures the offline flag is retained while preserving the uniqueness of the etag.
The deletion query was also updated accordingly: it now identifies offline records using a LIKE '%*#-OFFLINE-#*' clause.
Based on testing, the duplicate key errors no longer occur, and the cleanup logic now behaves as expected. This patch improves the reliability of presentity cleanup without requiring schema or index changes.
Please consider merging into master.
Thanks!
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4275
-- Commit Summary --
* presence: preserve etag uniqueness when marking presentity for removal
-- File Changes --
M src/modules/presence/presentity.c (90)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4275.patchhttps://github.com/kamailio/kamailio/pull/4275.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4275
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4275(a)github.com>