### Description
Unable to upgrade Kamailio 5.7 on CentOS7
Error:
```
tls_mod.c: In function ‘fork_child’:
tls_mod.c:348:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
for(int k = 0; k < 16; k++) {
^
tls_mod.c:348:2: note: use option -std=c99 or -std=gnu99 to compile your code
make[2]: *** [tls_mod.o] Error 1
make[1]: *** [modules] Error 1
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
Current installed version:
```
version: kamailio 5.7.4 (x86_64/linux) 2e6e87
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3796
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3796(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 #3796 (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
This PR fixes the compiles error regarding initial declarations in `for` loops
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3797
-- Commit Summary --
* tls: Fix ‘for’ loop initial declarations error
* file_out: FIx ‘for’ loop initial declarations error
-- File Changes --
M src/modules/file_out/file_out.c (11)
M src/modules/tls/tls_mod.c (3)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3797.patchhttps://github.com/kamailio/kamailio/pull/3797.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3797
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3797(a)github.com>
### Description
Kamailio v5.5.6 with topos module and postgres DB.
UAC (A) -> Kamailio Registrar (B) -> Kamailio PSTN GW (C) -> PSTN (D)
Call goes from A to D, PSTN sends UPDATE, UPDATE is routed from C to A instead to B and then to A.
#### Reproduction
Caller calls callee and receives an UPDATE from callee.
In my case it was when the call was routed to voicemail.
#### Log Messages
```
Kamailio takes the wrong route in UPDATE (upstream) case.
May 3 15:23:12 sipproxy /usr/sbin/kamailio[263013]: DEBUG: topos [tps_msg.c:882]: tps_request_received(): r-uri updated to: [sip:1234@<UAC-IP>;uniq=B0EB9A84A278626DA07219E2AE01C]
May 3 15:23:12 sipproxy /usr/sbin/kamailio[263013]: DEBUG: topos [tps_msg.c:187]: tps_add_headers(): adding to headers(0) - [Route: sip:<<KamailioPSTNgwIP>>;lr=on;ftag=9945501E2B94B883;did=1fc.42f;nat=yes#015#012]
May 3 15:23:12 sipproxy /usr/sbin/kamailio[263013]: DEBUG: topos [tps_msg.c:187]: tps_add_headers(): adding to headers(0) - [P-SR-XUID: atpsh-64527b0a-40362-1#015#012]
The right one would be the x_rr (a_rr), but it takes only the s_rr:
May 3 15:23:12 sipproxy /usr/sbin/kamailio[263013]: DEBUG: db_postgres [km_res.c:234]: db_postgres_convert_rows(): PQgetvalue(0x7fcb4893db50,0,7)=[sip:<KamailioRegistrarIP>;lr=on;ftag=9945501E2B94B883;did=1fc.7b92]
May 3 15:23:12 sipproxy /usr/sbin/kamailio[263013]: DEBUG: db_postgres [km_res.c:242]: db_postgres_convert_rows(): [0][7] Column[x_rr]=[sip:<KamailioRegistrarIP>;lr=on;ftag=9945501E2B94B883;did=1fc.7b92]
May 3 15:23:12 sipproxy /usr/sbin/kamailio[263013]: DEBUG: db_postgres [km_res.c:234]: db_postgres_convert_rows(): PQgetvalue(0x7fcb4893db50,0,8)=[sip:<PSTNgw>:5060;transport=udp;lr;Hpt=8ef8_116;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=18614]
May 3 15:23:12 sipproxy /usr/sbin/kamailio[263013]: DEBUG: db_postgres [km_res.c:242]: db_postgres_convert_rows(): [0][8] Column[y_rr]=[sip:<PSTNgw>:5060;transport=udp;lr;Hpt=8ef8_116;CxtId=3;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=18614]
May 3 15:23:12 sipproxy /usr/sbin/kamailio[263013]: DEBUG: db_postgres [km_res.c:234]: db_postgres_convert_rows(): PQgetvalue(0x7fcb4893db50,0,9)=[sip:<<KamailioPSTNgwIP>>;lr=on;ftag=9945501E2B94B883;did=1fc.42f;nat=yes]
May 3 15:23:12 sipproxy /usr/sbin/kamailio[263013]: DEBUG: db_postgres [km_res.c:242]: db_postgres_convert_rows(): [0][9] Column[s_rr]=[sip:<<KamailioPSTNgwIP>>;lr=on;ftag=9945501E2B94B883;did=1fc.42f;nat=yes]
May 3 15:23:12 sipproxy /usr/sbin/kamailio[263019]: DEBUG: db_postgres [km_res.c:242]: db_postgres_convert_rows(): [0][10] Column[a_rr]=[sip:<KamailioRegistrarIP>;lr=on;ftag=9945501E2B94B883;did=1fc.7b92]
May 3 15:23:12 sipproxy /usr/sbin/kamailio[263019]: DEBUG: db_postgres [km_res.c:234]: db_postgres_convert_rows(): PQgetvalue(0x7fcb4893dbd8,0,11)=[]
```
### Possible Solutions
Respect Route headers for UPDATE messages.
### Additional Information
Current running kamailio 5.5.6 but tried also latest 5.6.4 with same behavior.
```
version: kamailio 5.5.6 (x86_64/linux) 72dbb0
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: 72dbb0
compiled on 05:48:21 Apr 27 2023 with gcc 11.3.0
```
* **Operating System**:
```
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
Linux sipproxy 5.15.0-70-generic #77-Ubuntu SMP Tue Mar 21 14:02:37 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
```
Possibly related bug: https://github.com/kamailio/kamailio/issues/3090
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3437
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3437(a)github.com>
Hi,
I would like to move app_lua_sr to kamailio-archive but I would like to hear if anyone out there has a solid reason not to do it. Since we have app_lua as KEMI for a long time I think is time to retire the old remains of app_lua
Cheers
--
-----------------------------------------------------------------
| ,''`. Victor Seva |
| : :' : linuxmaniac(a)torreviejawireless.org |
| `. `' PGP: 8F19 CADC D42A 42D4 5563 730C 51A0 9B18 CF5A 5068 |
| `- Debian Developer |
-----------------------------------------------------------------