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'.
<!-- 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
- [x] Related to issue #3486(replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
The current service behavior is as follows: if OS contains several network interfaces and the service has a listening TCP socket (or UDP with 'mhomed=1' setting) on the second (third, fourth and so on) interface, then the outbound SIP messages will be always sent from the first (default) interface.
These changes make the outbound SIP messages always going through the network_interface/address, which is taken for listening by service.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3490
-- Commit Summary --
* core: fixed wrong network interface selection.
-- File Changes --
M src/core/forward.c (7)
M src/core/udp_server.c (37)
M src/core/udp_server.h (6)
M src/main.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3490.patchhttps://github.com/kamailio/kamailio/pull/3490.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3490
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3490(a)github.com>
The code from src/modules/tls/utils/openssl_mutex_shared/openssl_mutex_shared.c is in src/main.c .
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3519
-- Commit Summary --
* tls: remove openssl_mutex_shared
-- File Changes --
M pkg/kamailio/obs/kamailio.spec (2)
M src/modules/tls/Makefile (2)
M src/modules/tls/doc/tls.xml (5)
D src/modules/tls/utils/openssl_mutex_shared/Makefile (26)
D src/modules/tls/utils/openssl_mutex_shared/README.md (63)
D src/modules/tls/utils/openssl_mutex_shared/openssl_mutex_shared.c (49)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3519.patchhttps://github.com/kamailio/kamailio/pull/3519.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3519
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3519(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 -->
- [x] 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 -->
Adding TLS capability to connections between Kamailio and configured peers. Configuration done via kamailio.cfg.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3548
-- Commit Summary --
* cdp: adding TLS capability to peer connections
* cdp: documenting TLS capability related parameters
-- File Changes --
M src/modules/cdp/Makefile (2)
M src/modules/cdp/cdp_mod.c (27)
A src/modules/cdp/cdp_tls.c (196)
A src/modules/cdp/cdp_tls.h (51)
M src/modules/cdp/doc/cdp_admin.xml (97)
M src/modules/cdp/receiver.c (73)
M src/modules/cdp/receiver.h (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3548.patchhttps://github.com/kamailio/kamailio/pull/3548.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3548
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3548(a)github.com>
### Description
In python (using module app_python3), in the xhttp module event callback (ksr_xhttp_event):
```
KSR.xhttp.xhttp_reply(400, "Bad Request", "", "")
return 1
```
When this code is processed, Kamailio logs the following errors:
```
6(247453) ERROR: <core> [core/parser/parse_fline.c:272]: parse_first_line(): parse_first_line: bad message (offset: 16)
6(247453) ERROR: <core> [core/parser/msg_parser.c:749]: parse_msg(): ERROR: parse_msg: message=<HTTP/1.1 400 Bad Request
Sia: SIP/2.0/TCP 127.0.0.1:41706
Server: kamailio (5.7.1 (x86_64/linux))
Content-Length: 0
>
6(247453) ERROR: <core> [core/msg_translator.c:3256]: build_sip_msg_from_buf(): parsing failed
```
(The correct HTTP reply is sent back to the client, so the issue is only with these logs.)
<br>
In kamailio script, in event_route[xhttp:request]:
```
xhttp_reply("400", "Bad Request", "", "");
exit;
```
In this case, there are no errors in Kamailio logs.
The two should be equivalent, but when using python we get errors when trying to send a specific HTTP reply.
<br>
When using python, if calling "KSR.jsonrpcs.dispatch()" for an unknown method, we get the same errors in Kamailio logs:
```
6(253511) ERROR: <core> [core/parser/parse_fline.c:272]: parse_first_line(): parse_first_line: bad message (offset: 19)
6(253511) ERROR: <core> [core/parser/msg_parser.c:749]: parse_msg(): ERROR: parse_msg: message=<HTTP/1.1 500 Method Not Found
Sia: SIP/2.0/TCP 127.0.0.1:59048
Content-Type: application/json
Server: kamailio (5.7.1 (x86_64/linux))
Content-Length: 84
{
"jsonrpc": "2.0",
"error": {
"code": 500,
"message": "Method Not Found"
}
}>
6(253511) ERROR: <core> [core/msg_translator.c:3256]: build_sip_msg_from_buf(): parsing failed
```
When the method is correct (client receives a HTTP 200), there are no errors in Kamailio logs.
<br>
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
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 16:52:41 Aug 24 2023 with gcc 8.5.0
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3549
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3549(a)github.com>
Hello,
The Problem is that SDP body is rewritten, but Content-Length isn't updated.
Attached a trace from PCSCF.
Event 207
Incoming INVITE: Content length of SDP body is 313.
[cid:image001.png@01D9C520.8D438CA0]
Event 218
Outgoing INVITE: SDP body is rewritten triggered by "rtpengine_manage".
[cid:image002.png@01D9C521.F9C28DD0]
Content length of SDP body isn't updated. It should be 242.
Event 212: Received from RTP Proxy
[cid:image003.png@01D9C521.F9C28DD0]
Kamailio Version 5.5.X
LOGs from rtpengine.c:
Changed File according Logs attached..
2023-08-01T10:25:41.118366+02:00 172.29.21.25 vict-pcscf-rhel8[1170319] - [logSDID@20306 resource="rtpengine"] ERROR: rtpengine [rtpengine.c:4070]: newbody 'v=0#015#012o=- 3863667612 3863667612 IN IP4 172.23.12.62#015#012s=pjmedia#015#012b=AS:84#015#012t=0 0#015#012a=X-nat:0#015#012m=audio 30444 RTP/AVP 8 101#015#012c=IN IP4 172.29.21.32#015#012b=TIAS:64000#015#012a=sendrecv#015#012a=rtpmap:8 PCMA/8000#015#012a=rtpmap:101 telephone-event/8000#015#012a=fmtp:101 0-16#015#012'
2023-08-01T10:25:41.118730+02:00 172.29.21.25 vict-pcscf-rhel8[1170319] - [logSDID@20306 resource="rtpengine"] ERROR: rtpengine [rtpengine.c:4071]: newbody.len [242]
2023-08-01T10:25:41.119049+02:00 172.29.21.25 vict-pcscf-rhel8[1170319] - [logSDID@20306 resource="rtpengine"] ERROR: rtpengine [rtpengine.c:4110]: rtpengine_offer_answer-03
Any suggestions on how to solve this problem?
Thanks!
BR
Theo
GH #
#### 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:
<!-- 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 #3210
#### Description
Added 'always_log_missed_content_length' mode for sanity module.
If 'always_log_missed_content_length' is 1 then the SIP message
with no 'Content-Length' header will cause warning message in
the logs. Otherwise warning message is not generated for cases
when SIP message with no 'Content-Length' header is sent over UDP.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3359
-- Commit Summary --
* No warning generated when UDP and no Content-Length header
-- File Changes --
M src/modules/sanity/doc/sanity_admin.xml (21)
M src/modules/sanity/sanity.c (4)
M src/modules/sanity/sanity_mod.c (12)
M src/modules/sanity/sanity_mod.h (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3359.patchhttps://github.com/kamailio/kamailio/pull/3359.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3359
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3359(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
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
some kemi exports for ims_qos and ims_dialog. Currently testing them, will add comment afterwards.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3544
-- Commit Summary --
* ims_qos: kemi export
* ims_dialog: kemi export some functions
-- File Changes --
M src/modules/ims_dialog/ims_dialog.c (96)
M src/modules/ims_qos/ims_qos_mod.c (72)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3544.patchhttps://github.com/kamailio/kamailio/pull/3544.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3544
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3544(a)github.com>
A user reached me to add a way to add the custom labels into the statsd
module, so a better way to report metrics to the observability platform.
I keep the same old functions and add a new parameter to the statsd
modules to both interfaces cfg and kemi.
The full documentation can be found here:
https://docs.datadoghq.com/developers/dogstatsd/datagram_shell/?tab=metrics
So, each function can be used like this: ``` statsd_set("fooo", 1,
"inbound"); statsd_gauge("NotFound", "+1", "outbound,carrierFoo");
statsd_gauge("AuthFailed", "+1", "carrier=foo,priority=10"); ```
Signed-off-by: Eloy Coto <eloy.coto(a)acalustra.com>
Tested-by: Alex Antonevych <alex.antonevych(a)replicant.ai>
<!-- Kamailio Pull Request Template -->
#### 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:
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
I'm waiting until first review on function arguments to create the docs
changes.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3529
-- Commit Summary --
* statsd: Add labels to metrics.
-- File Changes --
M src/modules/statsd/lib_statsd.c (102)
M src/modules/statsd/lib_statsd.h (10)
M src/modules/statsd/statsd.c (129)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3529.patchhttps://github.com/kamailio/kamailio/pull/3529.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3529
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3529(a)github.com>
- the function call will suceed even if the prefix being inserted already exists in the tree
<!-- 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 -->
PDT module initialization currently fails if you try to insert a prefix multiple times. We use kamailio as a loadbalancer and have had this change out in the field for quite some time now as our database often contains a prefix multiple times (associated with the same domain). Would it make sense to change the behavior in this case ?
Thanks,
Vladimir.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3485
-- Commit Summary --
* pdt: make add_to_tree() idempotent
-- File Changes --
M src/modules/pdt/pdtree.c (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3485.patchhttps://github.com/kamailio/kamailio/pull/3485.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3485
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3485(a)github.com>