sergey-safarov created an issue (kamailio/kamailio#4439)
```
[ 0%] Building C object src/modules/ctl/CMakeFiles/ctl.dir/ctrl_socks.c.o
cd /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/redhat-linux-build/src/modules/ctl && /usr/bin/gcc -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DARCH=\"x86_64\" -DCC_GCC_LIKE_ASM -DCFG_DIR=\"/etc/kamailio/\" -DCOMPILER="\"gcc 14.3.1\"" -DCTL_SYSTEM_MALLOC -DDBG_SR_MEMORY -DDISABLE_NAGLE -DDNS_IP_HACK -DFAST_LOCK -DF_MALLOC -DHAVE_ALLOCA_H -DHAVE_EPOLL -DHAVE_GETHOSTBYNAME2 -DHAVE_IP_MREQN -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_MSG_NOSIGNAL -DHAVE_RESOLV_RES -DHAVE_SCHED_SETSCHEDULER -DHAVE_SCHED_YIELD -DHAVE_SELECT -DHAVE_SIGIO_RT -DHAVE_TIMEGM -DHAVE_UNION_SEMUN -DKSR_PTHREAD_MUTEX_SHARED -DMALLOC_STATS -DMEM_JOIN_FREE -DMOD_NAME=\"ctl\" -DMOD_NAMEID=ctl -DNAME=\"kamailio\" -DOS=Linux -DOS_QUOTED=\"Linux\" -DPKG_MALLOC -DQ_MALLOC -DRUN_DIR=\"/run/kamailio\" -DSHARE_DIR=\"/usr/share/kamailio/\" -DSHM_MMAP -DSIGINFO64_WORKAROUND -DSTATISTICS -DTLSF_MALLOC -DTLS_HOOKS -DUSE_CORE_STATS -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLOCKLIST -DUSE_FIFO -DUSE_FUTEX -DUSE_MCAST -DUSE_NAPTR -DUSE_RAW_SOCKS -DUSE_SCTP -DUSE_TCP -DUSE_TLS -DVERSION=\"6.1.0-dev1\" -DVERSIONVAL=6001000 -D__CPU_x86_64 -D__OS_linux -Dctl_EXPORTS -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v3 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -DNDEBUG -std=gnu11 -fPIC -ffile-prefix-map=/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/= -fPIC -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=generic -MD -MT src/modules/ctl/CMakeFiles/ctl.dir/ctrl_socks.c.o -MF CMakeFiles/ctl.dir/ctrl_socks.c.o.d -o CMakeFiles/ctl.dir/ctrl_socks.c.o -c /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/ctrl_socks.c
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 16 bytes into a region of size 8 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [2, 10] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [42, 2147483628] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset 10 into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [42, 2147483628] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset 10 into destination object ‘hdr.5’ of size 10
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [43, 2147483629] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [11, 13] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [43, 2147483629] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [11, 13] into destination object ‘hdr.5’ of size 10
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [44, 2147483630] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [12, 14] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [44, 2147483630] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [12, 14] into destination object ‘hdr.5’ of size 10
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [45, 2147483631] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [13, 15] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [45, 2147483631] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [13, 15] into destination object ‘hdr.5’ of size 10
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [46, 2147483632] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [14, 16] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [46, 2147483632] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [14, 16] into destination object ‘hdr.5’ of size 10
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [47, 2147483633] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [15, 17] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [47, 2147483633] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [15, 17] into destination object ‘hdr.5’ of size 10
In function ‘binrpc_build_hdr’,
inlined from ‘rpc_send’ at /root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:592:18:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc.h:335:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
335 | *p = (unsigned char)(body_len >> ((len_len - 1) * 8));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c: In function ‘rpc_send’:
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [48, 2147483634] into destination object ‘hdr.5’ of size 10
575 | static unsigned char hdr[BINRPC_MAX_HDR_SIZE];
| ^~~
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [16, 18] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [48, 2147483634] into destination object ‘hdr.5’ of size 10
/root/rpmbuild/BUILD/kamailio-6.1.0-dev1/src/modules/ctl/binrpc_run.c:575:30: note: at offset [16, 18] into destination object ‘hdr.5’ of size 10
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4439
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4439(a)github.com>
therikb31 created an issue (kamailio/kamailio#4296)
For network-initiated UE de-registration, `ims_registrar_scscf` is populating the `Subscription-State` header of the `NOTIFY` message as `active;expires=3581` instead of `terminated`.
### Description
We are simulating a network-initiated UE de-registration by sending a **Registration-Termination Request** from the HSS to the S-CSCF for a registered IMSI.
**Call Flow**:
1. UE registers to the IMS core
2. S-CSCF performs third-party registration with the Application Server on behalf of the UE
3. Application Server subscribes to `Event: reg` for the registered IMSI
4. HSS sends a Registration-Termination Request for network-initiated UE de-registration
5. S-CSCF sends a `NOTIFY` to subscribers for the `IMS_REGISTRAR_CONTACT_DEREGISTERED` event (issue with the `NOTIFY` SIP message)
**Observation**:
1. `NOTIFY` messages are initiated to subscribers of `Event: reg`, but instead of having the `Subscription-State` header set to **terminated**, we observe the value **active;expires=3581**.
(Image for the `NOTIFY` SIP message packet is attached below)

### Troubleshooting
#### Reproduction
To reproduce this, we are performing the following steps:
1. Performing SIP registration of the UE with the target S-CSCF node
2. Sending `SUBSCRIBE` requests from a third-party Application Server and the UE with `Event: reg` to get notified of registration events
3. HSS sends a `Registration-Termination Request` to the target S-CSCF for the registered IMSI (network-initiated de-registration)
#### Debugging Data
#### Log Messages
While going through the logs, we find that this header is being populated based on the expiry timer and a comparison with the current timestamp:
```
2025-06-20 12:45:20 | 19(56) DEBUG: ims_registrar_scscf [registrar_notify.c:1716]: create_notifications(): Expires is greater than current time! Subscription state: [active;expires=3581]
```
#### SIP Traffic
### Possible Solutions
**Workaround**:
In the `create_notifications()` method of `src/modules/ims_registrar_scscf/registrar_notify.c`,
when populating the `Subscription-State` header, if the `event_type` is `10` (`IMS_REGISTRAR_CONTACT_DEREGISTERED`), we can populate `Subscription-State` as `terminated`.
### Additional Information
---
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4296
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4296(a)github.com>
linuxmaniac created an issue (kamailio/kamailio#4235)
Finally I had the time and patience to address the last issues in our deb environment. Now build flow is by _distribution/architecture_ so errors doesn't interfere in a healthy _distribution/architecture_ combination.
> Follow up: same situation
>
> - **bookworm**: https://kamailio.sipwise.com/view/kamailiodev/job/kamailiodev-nightly-binar…
> ```
> /usr/bin/make every-module group_include="kerlang" quiet=verbose
> make[1]: Entering directory '/build/kamailio-6.1.0~dev1+bpo12.20250509084438.1'
> /usr/bin/make -C src/ every-module
> make[2]: Entering directory '/build/kamailio-6.1.0~dev1+bpo12.20250509084438.1/src'
> config.mak loaded
> Makefile.defs defs skipped
> Makefile.defs defs skipped
> qemu: uncaught target signal 11 (Segmentation fault) - core dumped
> Segmentation fault
> qemu: uncaught target signal 11 (Segmentation fault) - core dumped
> Segmentation fault
> Makefile:16: *** Not found Erlang. Stop.
> make[2]: *** [Makefile:509: modules] Error 1
> make[2]: Leaving directory '/build/kamailio-6.1.0~dev1+bpo12.20250509084438.1/src'
> make[1]: *** [Makefile:34: every-module] Error 2
> make[1]: Leaving directory '/build/kamailio-6.1.0~dev1+bpo12.20250509084438.1'
> make: *** [debian/rules:134: build_erlang] Error 2
> make: *** Waiting for unfinished jobs....
> ```
>
> - **bionic**: https://kamailio.sipwise.com/view/kamailiodev/job/kamailiodev-nightly-binar…
> ```
> gcc -shared -g -pthread -Wl,-O2 -Wl,-E -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic "-ldl" -Wl,-Bsymbolic-functions tls_domain.o tls_init.o tls_verify.o tls_locking.o tls_select.o tls_dump_vf.o tls_bio.o tlsa_mod.o tls_server.o tls_rpc.o tls_ct_wrq.o tls_rand.o tls_util.o tls_cfg.o tls_config.o -lm /usr/lib/aarch64-linux-gnu/libssl.a /usr/lib/aarch64-linux-gnu/libcrypto.a -o tlsa.so
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): In function `sha1_block_armv8':
> (.text+0x1240): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o):(.text+0x20): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): In function `poly1305_emit_neon':
> (.text+0x9a0): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): In function `sha256_block_data_order':
> (.text+0xf88): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): In function `sha512_block_data_order':
> (.text+0x10c8): dangerous relocation: unsupported relocation
> collect2: error: ld returned 1 exit status
> ../../Makefile.rules:191: recipe for target 'tlsa.so' failed
> make[3]: *** [tlsa.so] Error 1
> ```
>
> - **focal**: https://kamailio.sipwise.com/view/kamailiodev/job/kamailiodev-nightly-binar…
> ```
> gcc -shared -g -pthread -Wl,-O2 -Wl,-E -Wl,-Bsymbolic-functions -Wl,-z,relro -rdynamic "-ldl" -Wl,-Bsymbolic-functions tls_domain.o tls_init.o tls_verify.o tls_locking.o tls_select.o tls_dump_vf.o tls_bio.o tlsa_mod.o tls_server.o tls_rpc.o tls_ct_wrq.o tls_rand.o tls_util.o tls_cfg.o tls_config.o -lm /usr/lib/aarch64-linux-gnu/libssl.a /usr/lib/aarch64-linux-gnu/libcrypto.a -o tlsa.so
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(sha1-armv8.o): in function `sha1_block_armv8':
> (.text+0x1240): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(chacha-armv8.o):(.text+0x20): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(poly1305-armv8.o): in function `poly1305_emit_neon':
> (.text+0x9a0): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(sha256-armv8.o): in function `sha256_block_data_order':
> (.text+0xf88): dangerous relocation: unsupported relocation
> /usr/bin/ld: /usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): relocation R_AARCH64_PREL64 against symbol `OPENSSL_armcap_P' which may bind externally can not be used when making a shared object; recompile with -fPIC
> /usr/lib/aarch64-linux-gnu/libcrypto.a(sha512-armv8.o): in function `sha512_block_data_order':
> (.text+0x1108): dangerous relocation: unsupported relocation
> collect2: error: ld returned 1 exit status
> ```
>
_Originally posted by @linuxmaniac in [#13](https://github.com/sipwise/kamailio-deb-jenkins/issues/13#issuecomment-2866741862)_
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4235
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4235(a)github.com>
sergey-safarov created an issue (kamailio/kamailio#4333)
### Description
I want to compile Kamailio sources on `ppc64le` arch.
During compilation, I see an error
```sh
[ 0%] Building C object src/CMakeFiles/kamailio.dir/main.c.o
In file included from /tmp/kamailio/src/core/parser/../mem/../lock_ops.h:92,
from /tmp/kamailio/src/core/parser/../mem/shm.h:44,
from /tmp/kamailio/src/core/parser/../mem/shm_mem.h:32,
from /tmp/kamailio/src/core/parser/../ut.h:46,
from /tmp/kamailio/src/core/parser/../ip_addr.h:41,
from /tmp/kamailio/src/core/parser/msg_parser.h:39,
from /tmp/kamailio/src/core/select.h:36,
from /tmp/kamailio/src/core/route_struct.h:35,
from /tmp/kamailio/src/core/route.h:39,
from /tmp/kamailio/src/main.c:79:
/tmp/kamailio/src/core/parser/../mem/../fastlock.h:130:2: error: #error "unknown architecture"
130 | #error "unknown architecture"
| ^~~~~
/tmp/kamailio/src/core/parser/../mem/../fastlock.h: In function ‘tsl’:
/tmp/kamailio/src/core/parser/../mem/../fastlock.h:294:2: error: #error "unknown architecture"
294 | #error "unknown architecture"
| ^~~~~
/tmp/kamailio/src/core/parser/../mem/../fastlock.h: In function ‘get_lock’:
/tmp/kamailio/src/core/parser/../mem/../fastlock.h:317:9: error: implicit declaration of function ‘membar_getlock’ [-Wimplicit-function-declaration]
317 | membar_getlock();
| ^~~~~~~~~~~~~~
/tmp/kamailio/src/core/parser/../mem/../fastlock.h: In function ‘release_lock’:
/tmp/kamailio/src/core/parser/../mem/../fastlock.h:436:2: error: #error "unknown architecture"
436 | #error "unknown architecture"
| ^~~~~
In file included from /tmp/kamailio/src/core/atomic_ops.h:180,
from /tmp/kamailio/src/core/locking.h:74,
from /tmp/kamailio/src/core/rpc.h:36,
from /tmp/kamailio/src/core/sr_module.h:38,
from /tmp/kamailio/src/main.c:85:
/tmp/kamailio/src/core/atomic/atomic_unknown.h: At top level:
/tmp/kamailio/src/core/atomic/atomic_unknown.h:53:2: warning: #warning no native memory barrier implementations, falling back to slow lock based workaround [-Wcpp]
53 | #warning no native memory barrier implementations, falling back to slow lock \
| ^~~~~~~
gmake[2]: *** [src/CMakeFiles/kamailio.dir/build.make:76: src/CMakeFiles/kamailio.dir/main.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:3359: src/CMakeFiles/kamailio.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
```
### Expected behavior
Sources compiled without error messages.
#### Actual observed behavior
Build failed be error described above.
### Reproduction
```sh
git clone https://github.com/kamailio/kamailio.git
docker run -it \
--platform linux/ppc64le \
-v ./kamailio:/usr/src/kamailio \
ghcr.io/sergey-safarov/kamailio-builder:centos-10
cd /usr/src/kamailio
cmake -S . -B build
cmake --build build
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4333
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4333(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 #4415
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4425
-- Commit Summary --
* topos_htable: remove smethod from transaction key
-- File Changes --
M src/modules/topos_htable/topos_htable_storage.c (44)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4425.patchhttps://github.com/kamailio/kamailio/pull/4425.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4425
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4425(a)github.com>
SipSeb created an issue (kamailio/kamailio#4445)
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
After a small outage, where a large number of TLS clients had to reconnect, we see this error on some of our Kamailio proxies. The Kamailio processes were not restarted. See log messages below. These errors did not occur before the outage. And on some hosts we still don't see them.
It can also be reproduced with running openssl manually, and our monitoring script registering through each proxy is also affected. A pcap trace shows that Kamailio sends its Server Hello, Change Cipher Spec message and some application data and then the client drops the connection with a "Decrypt Error". The next monitoring check run mostly works.
Below is a graph showing the log volume of lines containing "decrypt error" in the time before and after the outage.
<img width="1385" height="223" alt="Image" src="https://github.com/user-attachments/assets/f9522986-ef10-4798-bd8c-5dd51abd…" />
#### 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).
-->
```
ERROR: tls [tls_server.c:1312]: tls_h_read_f(): protocol level error
ERROR: tls [tls_util.h:49]: tls_err_ret(): TLS accept:error:0A00041B:SSL routines::tlsv1 alert decrypt error (sni: unknown)
ERROR: tls [tls_server.c:1316]: tls_h_read_f(): src addr: 2a05:d014:85b:a080:f1e7:affe:affe:cc1e:35604
ERROR: tls [tls_server.c:1319]: tls_h_read_f(): dst addr: 2a05:d014:cda:9301:81e5:affe:affe:251a:5061
ERROR: <core> [core/tcp_read.c:1524]: tcp_read_req(): error reading - c: 0x784904a5bfa0 r: 0x784904a5c0c8 (-1)
ERROR: tls [tls_server.c:1312]: tls_h_read_f(): protocol level error
ERROR: tls [tls_util.h:49]: tls_err_ret(): TLS accept:error:0A00041B:SSL routines::tlsv1 alert decrypt error (sni: unknown)
ERROR: tls [tls_server.c:1316]: tls_h_read_f(): src addr: 192.0.2.42:33278
ERROR: tls [tls_server.c:1319]: tls_h_read_f(): dst addr: 100.68.1.13:5061
ERROR: <core> [core/tcp_read.c:1524]: tcp_read_req(): error reading - c: 0x784904a5bfa0 r: 0x784904a5c0c8 (-1)
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
root@sipproxy:/WORKSPACE/sipproxy-container# kamailio -V
version: kamailio 5.8.6 (x86_64/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, 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 with gcc 13.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 `lsb_release -a` and `uname -a`)
-->
Running in a podman container. Underlying system is Ubuntu Noble as well.
```
root@sipproxy:/WORKSPACE/sipproxy-container# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.3 LTS
Release: 24.04
Codename: noble
root@sipproxy:/WORKSPACE/sipproxy-container# uname -a
Linux sipproxy 6.8.0-83-generic #83-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 5 21:46:54 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4445
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4445(a)github.com>
nicthenothing created an issue (kamailio/kamailio#4436)
Description
When using Kamailio IMS (from docker_open5gs setup) as the P-CSCF, SIP calls fail to initiate when the UE’s signaling (“ear” channel) and media (“mouth” channel) are bound to different ports or sockets.
In the captured logs, the Request-URI and the Destination-URI differ in both port and alias parameters, resulting in the INVITE not being routed properly through the IPSec tunnel.
It seems that Kamailio does not correctly resolve the IPSec tunnel when the UE’s contact and destination information differ (possibly due to alias handling or flag configuration).
This issue may relate to improper handling of the alias parameter or flag mismatch between use_dst_uri and use_contact.
---
Troubleshooting
Reproduction
1. Deploy the default IMS setup from herlesupreeth/docker_open5gs (Kamailio + Open5GS).
2. Attach a UE over IPSec where its signaling and media sockets differ (e.g., TCP vs UDP port mismatch).
3. Initiate a SIP INVITE from UE-A to UE-B.
4. Observe that INVITE fails to reach the destination.
Debugging Data
N/A (default Docker config used)
Log Messages
2025-10-15T13:21:33.638305291Z Destination URI: sip:10.20.7.216:42602;transport=tcp
2025-10-15T13:21:33.638307845Z Request URI: sip:3c7a3414-8cf7-458e-a674-9181ea0ccd15@10.20.7.216:42078
---
SIP Traffic
Request-Line: INVITE sip:578da559-1f6e-430f-a953-8e4dfc99918e@10.20.7.228:40404;alias=10.20.7.228~43426~2 SIP/2.0
Request-URI: sip:578da559-1f6e-430f-a953-8e4dfc99918e@10.20.7.228:40404;alias=10.20.7.228~43426~2
Request-URI User Part: 578da559-1f6e-430f-a953-8e4dfc99918e
Request-URI Host Part: 10.20.7.228
Request-URI Host Port: 40404
---
Possible Solutions
Validate handling of alias parameter in IPSec tunnel search logic.
Verify if flag 4 (Use destination URI for IPSec tunnel search) or flag 8 (Use new R-URI for IPSec tunnel search) needs adjustment in modparam("ipsec", "flag", X) for correct behavior.
Potential fix may involve extending alias resolution to new R-URI before tunnel lookup.
---
Additional Information
Kamailio Version:
version: kamailio 5.7.x (from docker_open5gs)
Operating System:
Ubuntu 22.04 (containerized)
Linux 5.15.0-122-generic
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4436
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4436(a)github.com>
Pandi1981 created an issue (kamailio/kamailio#4208)
We are facing an issue while using TOPOS in Kamailio P-CSCF (running under Docker).
Kamailio version: 6.0.0
operating system: "10 (buster)"
**Call Flow & Issue Description:**
Note: Public IP and Private IP mapping using the below configuration.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
listen=udp:LOCAL_IP:5060 name "internal"
listen=udp:LOCAL_IP:6080 advertise PUBLIC_IP:6080 name "external"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
**Call Flow (INVITE):**
A-Party --> Kamailio P-CSCF (Public IP) --> Kamailio P-CSCF (Private IP) --> Kamailio S-CSCF (Private IP)
B-Party <-- Kamailio P-CSCF (Public IP) <-- Kamailio P-CSCF (Private IP) <-- Kamailio S-CSCF (Private IP)
Everything works correctly up to the point where the 200 OK is received by the A-Party. However, when the A-Party sends the ACK, it is received by the Kamailio P-CSCF but is not forwarded to the B-Party.
Upon investigation, we found that when Kamailio receives the ACK from the A-Party, the rr (Record-Route) module fails to recognize its own Route header and thus falls back to strict routing instead of performing loose routing. This results in an incorrect rewrite of the Request-URI of the ACK, causing it to fail to reach the B-Party. Essentially, the Route header is not popped as expected and the ACK routing breaks.
TOPOS module is configured as follows:
loadmodule "topos_redis.so"
loadmodule "ndb_redis.so"
loadmodule "topos.so"
modparam("ndb_redis", "server", "name=tps;addr=127.0.0.1;port=6379;db=0")
modparam("topos", "storage", "redis")
modparam("topos_redis", "serverid", "tps")
modparam("topos", "rr_update", 1)
modparam("topos", "contact_mode", 1)
modparam("topos", "xavu_field_a_contact", "a_contact")
modparam("topos", "xavu_field_b_contact", "b_contact")
modparam("topos", "xavu_cfg", "tps")
Please guide us how to achieve and what we are doing wrong.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4208
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4208(a)github.com>