- len is first adjusted by the amount of chars consumed so far
- start pointer is then adjusted to begin new search
#### 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 -->
- [X] PR should be backported to stable branches
- [X] Tested changes locally
- [X] Related to issue #4229
#### Description
Small logic tweak — we adjust `len` by the amount of chars consumed first, then adjust the `start` pointer to begin the new search.
Existing:
```
start = space + 1;
len = len - (space - start + 1); // this is a no-op
// as the pointer was adjusted first
```
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4230
-- Commit Summary --
* core: sdp - update start pointer only after len adjustment
-- File Changes --
M src/core/parser/sdp/sdp_helpr_funcs.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4230.patchhttps://github.com/kamailio/kamailio/pull/4230.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4230
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4230(a)github.com>
Module: kamailio
Branch: master
Commit: 283270128427ba8c5cfe34dc0af338d976a3a8b7
URL: https://github.com/kamailio/kamailio/commit/283270128427ba8c5cfe34dc0af338d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-07-18T09:42:13+02:00
tm: docs for t_relay_to_proxy(...)
---
Modified: src/modules/tm/doc/functions.xml
---
Diff: https://github.com/kamailio/kamailio/commit/283270128427ba8c5cfe34dc0af338d…
Patch: https://github.com/kamailio/kamailio/commit/283270128427ba8c5cfe34dc0af338d…
---
diff --git a/src/modules/tm/doc/functions.xml b/src/modules/tm/doc/functions.xml
index 4cd7f36ba2d..715e564e9ed 100644
--- a/src/modules/tm/doc/functions.xml
+++ b/src/modules/tm/doc/functions.xml
@@ -1739,6 +1739,30 @@ t_relay_to("0x01");
</example>
</section>
+ <section id="tm.f.t_relay_to_proxy">
+ <title>
+ <function>t_relay_to_proxy(proxy)</function>
+ </title>
+ <para>
+ Alternative function to relay the SIP request to a specific address,
+ with the parameter supporting variables inside it.
+ </para>
+ <para>
+ The format of the parameter is: "proto:host:port" - any of proto or port
+ can be omitted, along with the semicolon after or before.
+ </para>
+ <para>
+ The function can be used in REQUEST_ROUTE and FAILURE_ROUTE.
+ </para>
+ <example>
+ <title><function>t_relay_to_proxy</function> usage</title>
+ <programlisting>
+...
+t_relay_to_proxy("udp:$var(addr):5060");
+...
+ </programlisting>
+ </example>
+ </section>
<section id="tm.f.t_set_no_e2e_cancel_reason">
<title>
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>
longchun4835 created an issue (kamailio/kamailio#4178)
<!--
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:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
Note that an issue report may be closed automatically after about 2 months
if there is no interest from developers or community users on pursuing it, being
considered expired. In such case, it can be reopened by writing a comment that includes
the token `/notexpired`. About two weeks before considered expired, the issue is
marked with the label `stale`, trying to notify the submitter and everyone else
that might be interested in it. To remove the label `stale`, write a comment that
includes the token `/notstale`. Also, any comment postpone the `expire` timeline,
being considered that there is interest in pursuing 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
Using function sip_trace_mode() with parameter d to enable dialog tracing mode logs:
```
BUG: siptrace [siptrace.c:1671]: add_info_xavp(): URI should be in raw format here
ERROR: siptrace [siptrace.c:888]: sip_trace_helper(): failed to serialize siptrace info! Won't trace dialog!
```
### Troubleshooting
#### Reproduction
my module parameters:
```
#!ifdef WITH_HOMER
loadmodule "siptrace.so"
modparam("siptrace", "duplicate_uri", HOMER_URL)
modparam("siptrace", "hep_mode_on", 1)
modparam("siptrace", "trace_to_database", 0)
modparam("siptrace", "trace_flag", 22)
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "hep_version", 3)
modparam("siptrace", "hep_capture_id", HOMER_HEP_ID)
#!endif
...
request_route {
...
if (is_method("INVITE")) {
sip_trace_mode("d");
}
}
```
### Possible Solutions
I checked the source code and found that the issue occurs when sip_trace_helper() is called inside the ki_sip_trace_mode() function, with the third parameter (duri) set to NULL. I don’t quite understand the logic behind passing NULL does this mean that the 'D' parameter will never working when calling sip_trace_mode()?
Additionally, I have another question: in the sip_trace_helper() function, why does it call trace_transaction() instead of trace_dialog() when strace_type == SIPTRACE_DIALOG?
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.6.4 (x86_64/linux) a004cf
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
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: a004cf
compiled on 09:14:30 Jan 23 2025 with gcc 8.3.1
```
* **Operating System**:
```
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4178
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4178(a)github.com>