kamctl's dbtextdb.py fails to build in a Python3-only environment. Update dbtextdb to Python3.
--
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/1747
```
CC (gcc) [M db_redis.so] redis_table.o
CC (gcc) [M db_redis.so] db_redis_mod.o
CC (gcc) [M db_redis.so] redis_connection.o
In file included from ../../lib/srdb1/../../core/ut.h:42,
from ../../lib/srdb1/db_key.h:31,
from ../../lib/srdb1/db.h:43,
from db_redis_mod.h:26,
from redis_table.c:25:
redis_table.c: In function 'db_redis_parse_keys':
../../lib/srdb1/../../core/dprint.h:303:8: warning: 'table_name.len' may be used uninitialized in this function [-Wmaybe-uninitialized]
303 | fprintf(stderr, "%2d(%d) %s: %.*s%s" fmt, \
| ^~~~~~~
redis_table.c:494:9: note: 'table_name.len' was declared here
494 | str table_name;
| ^~~~~~~~~~
In file included from ../../lib/srdb1/../../core/ut.h:42,
from ../../lib/srdb1/db_key.h:31,
from ../../lib/srdb1/db.h:43,
from db_redis_mod.h:26,
from redis_table.c:25:
../../lib/srdb1/../../core/dprint.h:303:8: warning: 'table_name.s' may be used uninitialized in this function [-Wmaybe-uninitialized]
303 | fprintf(stderr, "%2d(%d) %s: %.*s%s" fmt, \
| ^~~~~~~
redis_table.c:494:9: note: 'table_name.s' was declared here
494 | str table_name;
| ^~~~~~~~~~
redis_table.c:581:38: warning: 'table' may be used uninitialized in this function [-Wmaybe-uninitialized]
581 | table->types = type_target = type;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
CC (gcc) [M db_redis.so] redis_dbase.o
make[3]: 'libsrdb2.so.1.0' is up to date.
make[3]: 'libsrdb1.so.1.0' is up to date.
```
--
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/2169
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
Ubuntu Bionic 18.04.02 LTS ships with "OpenSSL 1.1.1 11 Sep 2018" (0x1010100f), whereas the `kamailio-tls-modules` package is compiled with "OpenSSL 1.1.0g 2 Nov 2017" (0x1010007f).
I installed Kamailio from the Kamailio repositories (not from the Ubuntu repositories).
This leads to Kamailio being unable to start as it complains about the OpenSSL versions being too different from each other.
Overriding the OpenSSl version check by enabling `tls_force_run` does not solve the issue, instead, it leads to Kamailio emitting multiple errors.
<!-- ### Troubleshooting -->
#### Reproduction
I installed Kamailio from the official Kamailio apt sources (nightly build, the same occurs for the latest stable version 5.2).
```
deb http://deb.kamailio.org/kamailiodev-nightly bionic main
deb-src http://deb.kamailio.org/kamailiodev-nightly bionic main
```
I enabled TLS and edited the configuration files accordingly.
<!--
If the issue can be reproduced, describe how it can be done.
-->
<!-- #### Debugging Data -->
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
```
#### Log Messages
```
CRITICAL: tls [tls_init.c:677]: init_tls_h(): installed openssl library version is too different from the library the kamailio tls module was compiled with: installed "OpenSSL 1.1.1 11 Sep 2018" (0x1010100f), compiled "OpenSSL 1.1.0g 2 Nov 2017" (0x1010007f).#012 Please make sure a compatible version is used (tls_force_run in kamailio.cfg will override this check)
```
<!-- #### SIP Traffic -->
### Possible Solutions
Recompile and publish the `kamailio-tls-modules` package compiled with OpenSSL 1.1.1b.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.3.0-dev6 (x86_64/linux)
flags: STATS: Off, 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_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: unknown
compiled with gcc 7.3.0
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
Linux hostname 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Description: Ubuntu 18.04.2 LTS
Release: 18.04
```
--
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/2018
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [X] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [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 -->
192.0.0.0/29 is a reserved subnet for NATtin IPv4 across an IPv6 netwerk. For example Dual Stack Lite carrier grade NAT.
This is small change and updates the subnets used for NAT according to https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-speci…
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1488
-- Commit Summary --
* Support for
-- File Changes --
M src/modules/ipops/detailed_ip_type.c (1)
M src/modules/ipops/detailed_ip_type.h (2)
M src/modules/nat_traversal/nat_traversal.c (3)
M src/modules/nathelper/nathelper.c (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1488.patchhttps://github.com/kamailio/kamailio/pull/1488.diff
--
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/pull/1488
Tracking here the issue exposed by @linuxmaniac via PR #924, as it was merged and then reverted (by #1248), so anyone can be aware of as well as comment/propose solutions for it.
> Add "-fno-strict-aliasing" to compilation flags
>
> Fixes a slew of:
> "dereferencing type-punned pointer will break strict-aliasing rules"
> warnings from GCC for lines of the form:
> Py_INCREF(Py_True);
> and
> Py_INCREF(Py_False);
>
> due to the cast from PyIntObject* to PyObject*
>
> GCC is technically correct here; see:
> http://www.python.org/dev/peps/pep-3123/
> though this is unlikely to lead to non-working machine code.
The initial proposed patch for `src/modules/app_python/Makefile` is:
```
@@ -22,6 +22,8 @@ ifeq ($(OS), freebsd)
LIBS+=-pthread
endif
+# python2 https://www.python.org/dev/peps/pep-3123/
+DEFS+=-fno-strict-aliasing
DEFS+=-I${PYTHON_INCDIR}
DEFS+=-DKAMAILIO_MOD_INTERFACE
```
--
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/1249
Hello,
I got this message under some circumstances (the number called)
Jun 12 15:15:01 proxy1 /usr/sbin/kamailio[16096]: ERROR: <core> [core/parser/sdp/sdp.c:228]: set_sdp_payload_fmtp(): Invalid payload location
What means "Payload location" ?
SDP Debug from the callee:
Jun 12 15:15:01 proxy1 /usr/sbin/kamailio[16096]: DEBUG: sdpops [sdpops_mod.c:1626]: sdp_get_helper(): Found SDP v=0#015#012o=- 5793 1 IN IP4 192.168.50.50#015#012s=-#015#012t=0 0#015#012m=audio 24734 RTP/AVP 8 101#015#012c=IN IP4 217.112.190.117#015#012a=rtpmap:101 telephone-event/8000#015#012a=fmtp:18 annexa=yes#015#012a=fmtp:101 0-15#015#012a=ptime:30#015#012a=silenceSupp:off - - - -#015#012a=sendrecv#015#012
SDP Debug called pbx:
Jun 12 15:15:01 proxy1 /usr/sbin/kamailio[16097]: DEBUG: sdpops [sdpops_mod.c:1626]: sdp_get_helper(): Found SDP v=0#015#012o=root 1673681431 1673681431 IN IP4 217.112.180.5#015#012s=Asterisk PBX 11.25.1#015#012c=IN IP4 217.112.180.5#015#012t=0 0#015#012m=audio 10884 RTP/AVP 8 101#015#012a=rtpmap:8 PCMA/8000#015#012a=rtpmap:101 telephone-event/8000#015#012a=fmtp:101 0-16#015#012a=ptime:20#015#012a=sendrecv#015#012
--
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/1983
### Description
When relaying an `INVITE` from a Kamailio proxy to an interconnect we are using DNS SRV records for load-balancing and failover. The proxy is listening on both a private interface and a public interface with an rfc1918 (ie. `10.0.0.14`) and a public IP address (ie. `185.0.0.34`) respectively.
The first branch (before DNS SRV failover) is working as expected. The message will be relayed from the received socket (`185.0.0.34`) to the interconnect. When this branch results in a timeout, the proxy will try to do DNS SRV failover. This new branch and any subsequent branches will no longer use the initial received socket as source. In our case we see that the private address (`10.0.0.14`) is now being used as source address.
### Troubleshooting
#### Reproduction
DNS SRV:
```
_sip._udp.transit.net. SRV 10 10 5060 transit1.net.
_sip._udp.transit.net. SRV 20 10 5060 transit2.net.
transit1.net. A 185.10.20.30
transit2.net. A 185.10.20.31
```
Kamailio:
```
$du = "sip:transit.net;transport=udp";
xinfo("Relaying [$rm] request: [$ru] with Call-ID [$ci]");
t_set_fr(0, 1000);
if (not t_relay()) {
sl_reply_error();
}
```
Network flow:
```
12:30:00 INVITE udp:10.0.0.18:5060 => udp:185.0.0.34:5060 (internal request to proxy)
12:30:00 INVITE udp:185.0.0.34:5060 => udp:185.10.20.30:5060 (relaying from proxy to interconnect)
^^^^^^^^^^
(request times out after 1 second, proxy will do a failover to the next endpoint)
12:30:01 INVITE udp:10.0.0.14:5060 => udp:185.10.20.31:5060 (relaying to next interconnect address)
^^^^^^^^^
```
#### Log Messages
Attempt to see where it goes wrong:
```
onsend_route {
xinfo("[$RAut] [$Rut] [$sas]\n");
xinfo("$snd(buf)\n");
}
```
```
INFO: [sip:185.0.0.34:5060;transport=udp] [sip:185.0.0.34:5060;transport=udp] [udp:10.0.0.18:5060]
INFO: INVITE sip:+1234567890@transit.net;user=phone SIP/2.0#015#012Record-Route: <sip:185.0.0.34;lr;ftag=tDr7m6erX1N3D>#015#012Via: SIP/2.0/UDP 10.0.0.14;branch=z9hG4bKafe7.7fb590e263fa44677514193a6a1156ce.1#015#012Via: SIP/2.0/UDP 10.0.0.18;received=10.0.0.18;rport=5060;branch=z9hG4bK6t59a17N60FcB ...
```
So the `Record-Route` seems to be correct, but the top most `Via` header shows the private IP address. The message is being sent from the private IP address as well and never reaches the second address from the interconnect.
### Possible Solutions
A workaround to add `$fs = "udp:185.0.0.34:5060"` in the `onsend_route` seems to be effective.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.2.3 (x86_64/linux)
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: unknown
compiled with gcc 7.4.0
```
* **Operating System**:
```
Ubuntu 18.04 LTS
Linux proxy4 4.15.0-64-generic #73-Ubuntu SMP Thu Sep 12 13:16:13 UTC 2019 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/2152
### Description
Kamailio fails to forward in-dialog request over TCP/TLS/WS/WSS connection.
### Troubleshooting
kamailio 5.2 branch has a commit
09ac3e47ef79dbd599b7dec5b84ae3b792f025ed cherry picked from master branch.
It makes sense for master because get_send_socket2() behavior has
changed and function became smarter and also there were some patches to
propagate connection it to the uac structure.
After applying this patch to 5.2.x kamailio searches for an outgoing socket, receives the first one due to limitations of get_send_socket2() and SND_F_FORCE_SOCKET flag. Then it fails to find an existing TCP connection by destination ip:port since it searches for a connection associated with a wrong socket.
#### 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).
-->
```
Dec 11 21:33:49 kamailio[17999]: WARNING: <core> [core/msg_translator.c:2832]: via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be found
Dec 11 21:33:49 kamailio[17999]: ERROR: tm [t_msgbuilder.c:1372]: assemble_via(): via building failed
Dec 11 21:33:49 kamailio[17999]: ERROR: tm [t_msgbuilder.c:1540]: build_uac_req(): error while assembling Via
Dec 11 21:33:49 kamailio[17999]: ERROR: tm [uac.c:517]: t_uac_prepare(): Error while building message
Dec 11 21:33:49 kamailio[17999]: ERROR: presence [notify.c:1798]: send_notify_request(): in function tmb.t_request_within
Dec 11 21:33:49 kamailio[17999]: ERROR: presence [notify.c:1897]: notify(): sending Notify not successful
Dec 11 21:33:49 kamailio[17999]: ERROR: presence [notify.c:1491]: publ_notify(): Could not send notify for message-summary
```
### Possible Solutions
Delete mentioned commit from the 5.2 branch.
<!--
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`
```
5.2.5
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
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/2181
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
These commits create a CDR addressed engine, similar to the one that acc module exports for acc message accounting. Such an engine made an extension module like acc_json possible. This CDR engine is then used in acc_json to write the functionality for logging CDRs in JSON format.
I have added functions to the API exported by acc module instead of creating another separate CDR API, as I thought this is cleaner.
I only implemented the acc_json logging to syslog (no message queue support yet).
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2107
-- Commit Summary --
* acc: adding CDR engine functionality
* acc_json: adding CDR as JSON functionality
-- File Changes --
M src/modules/acc/acc_api.h (38)
M src/modules/acc/acc_cdr.c (41)
M src/modules/acc/acc_cdr.h (6)
M src/modules/acc/acc_logic.c (10)
M src/modules/acc/acc_logic.h (2)
M src/modules/acc/acc_mod.c (93)
M src/modules/acc_json/acc_json_mod.c (131)
M src/modules/acc_json/acc_json_mod.h (4)
M src/modules/acc_json/doc/acc_json_admin.xml (54)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2107.patchhttps://github.com/kamailio/kamailio/pull/2107.diff
--
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/pull/2107