<!--
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.
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.
-->
### Troubleshooting
#### Reproduction
<!--
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
<!--
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).
-->
```
in $mb from xlog shows path header as Path: <sip:xx.xxx.xx.xx
suffix header part is not getting appended creating malformed packet
```
#### SIP Traffic
<!--
REGISTER sip:xx.xxxx.xx.xxxx.xx SIP/2.0
From: "+914962207321"<sip:+91111111111@xx.xxxx.xx.xxxx.xx>;tag=786f78-a7504e5-13c4-590628-2b088c7a-590628
To: "+914962207321"<sip:+911111111111@xx.xxxx.xx.xxxx.xx>
P-Access-Network-Info: ADSL;ue-ip=10.117.x.xxx;ue-port=5060;transport=udp;nat=no
Call-ID: 790930-a7504e5-13c4-590628-aede83e-590628
CSeq: 2 REGISTER
Via: SIP/2.0/UDP 127.0.0.1;branch=z9hG4bK1af.96eb50fa0163b0488a72566a78846e9f.0
Via: SIP/2.0/UDP 10.117.x.xxx:5060;rport=5060;branch=z9hG4bK-590628-5bc00f10-3253a7b8
Max-Forwards: 69
Supported: 100rel,replaces,timer
Contact: <sip:+911111111111@10.117.x.xxx:5060>
Expires: 3600
Authorization: Digest username="+911111111111",realm="xx.xxxx.xx.xxxx.xx",nonce="eqvZt86/W0Pt/0bN+SZKLw==",uri="sip:xx.xxxx.xx.xxxx.xx",response="3213963a37bd59cf4b16a5d4080da415",algorithm=MD5,cnonce="5bc00f1a",qop=auth,nc=00000001
Content-Length: 0
Path: <sip:127.0.1.1
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
reverted to pre "use snprintf() instead of sprintf()" merge for patch.c it works fine
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.8.0-dev1 (x86_64/linux) 99eb1b
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: 99eb1b
compiled on 10:38:25 Sep 8 2023 with gcc 11.4.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`)
-->
```
Ubuntu 22.04
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3560
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3560(a)github.com>
Module: kamailio
Branch: master
Commit: 06b1a35c727155974eb3c10971eaac2606b430ea
URL: https://github.com/kamailio/kamailio/commit/06b1a35c727155974eb3c10971eaac2…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2023-09-11T14:46:24+02:00
modules: readme files regenerated - textops ... [skip ci]
---
Modified: src/modules/textops/README
---
Diff: https://github.com/kamailio/kamailio/commit/06b1a35c727155974eb3c10971eaac2…
Patch: https://github.com/kamailio/kamailio/commit/06b1a35c727155974eb3c10971eaac2…
---
diff --git a/src/modules/textops/README b/src/modules/textops/README
index fa73e19ea32..3979dfdf185 100644
--- a/src/modules/textops/README
+++ b/src/modules/textops/README
@@ -104,6 +104,7 @@ Ovidiu Sas
4.59. get_body_part_raw(content_type, opv)
4.60. remove_body_part(content_type)
4.61. regex_substring(itext, regexp, mindex, mcount, dpv)
+ 4.62. via_param_rm(name, idx)
2. Developer Guide
@@ -175,6 +176,7 @@ Ovidiu Sas
1.60. get_body_part_raw usage
1.61. remove_body_part usage
1.62. _regex_substring usage
+ 1.63. via_param_rm usage
Chapter 1. Admin Guide
@@ -252,6 +254,7 @@ Chapter 1. Admin Guide
4.59. get_body_part_raw(content_type, opv)
4.60. remove_body_part(content_type)
4.61. regex_substring(itext, regexp, mindex, mcount, dpv)
+ 4.62. via_param_rm(name, idx)
1. Overview
@@ -355,6 +358,7 @@ From: medabeda
4.59. get_body_part_raw(content_type, opv)
4.60. remove_body_part(content_type)
4.61. regex_substring(itext, regexp, mindex, mcount, dpv)
+ 4.62. via_param_rm(name, idx)
4.1. search(re)
@@ -1621,6 +1625,25 @@ msg_apply_changes();
----
...
+4.62. via_param_rm(name, idx)
+
+ Remove parameter matching by name from Via body at the specified index.
+ The index starts from 0 (first Via body). Negative index counts from
+ the end of the list for Via header bodies (-1 is the last Via body).
+
+ Meaning of the parameters is as follows:
+ * name - name of the parameter
+ * idx - index of the Via body.
+
+ The parameters can also be variables.
+
+ This function can be used from ANY_ROUTE.
+
+ Example 1.63. via_param_rm usage
+...
+via_param_rm("p1", "0");
+...
+
Chapter 2. Developer Guide
Table of Contents
Module: kamailio
Branch: master
Commit: fb2be3855c5971d312bad52ffc3c4cb99aeb63d8
URL: https://github.com/kamailio/kamailio/commit/fb2be3855c5971d312bad52ffc3c4cb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-09-11T14:32:58+02:00
textops: docs for via_param_rm(...)
---
Modified: src/modules/textops/doc/textops_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/fb2be3855c5971d312bad52ffc3c4cb…
Patch: https://github.com/kamailio/kamailio/commit/fb2be3855c5971d312bad52ffc3c4cb…
---
diff --git a/src/modules/textops/doc/textops_admin.xml b/src/modules/textops/doc/textops_admin.xml
index 4af7a8bb805..9c121e51c70 100644
--- a/src/modules/textops/doc/textops_admin.xml
+++ b/src/modules/textops/doc/textops_admin.xml
@@ -2303,5 +2303,40 @@ msg_apply_changes();
</example>
</section>
+ <section id="textops.f.via_param_rm">
+ <title>
+ <function moreinfo="none">via_param_rm(name, idx)</function>
+ </title>
+ <para>
+ Remove parameter matching by name from Via body at the specified index.
+ The index starts from 0 (first Via body). Negative index counts from the
+ end of the list for Via header bodies (-1 is the last Via body).
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>name</emphasis> - name of the parameter
+ </para>
+ </listitem>
+ <listitem>
+ <para><emphasis>idx</emphasis> - index of the Via body.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>The parameters can also be variables.</para>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+
+ <example>
+ <title><function>via_param_rm</function> usage</title>
+ <programlisting format="linespecific">
+...
+via_param_rm("p1", "0");
+...
+</programlisting>
+ </example>
+ </section>
+
</section>
</chapter>