Module: kamailio
Branch: master
Commit: c6ce384e479ed21aae803a78fc5835e774fe521d
URL:
https://github.com/kamailio/kamailio/commit/c6ce384e479ed21aae803a78fc5835e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-05-26T15:43:50+02:00
textops: docs for remove_hf_idx() function
---
Modified: src/modules/textops/doc/textops_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/c6ce384e479ed21aae803a78fc5835e…
Patch:
https://github.com/kamailio/kamailio/commit/c6ce384e479ed21aae803a78fc5835e…
---
diff --git a/src/modules/textops/doc/textops_admin.xml
b/src/modules/textops/doc/textops_admin.xml
index 6f3ab09f9a..4427ee1e00 100644
--- a/src/modules/textops/doc/textops_admin.xml
+++ b/src/modules/textops/doc/textops_admin.xml
@@ -1497,6 +1497,44 @@ if(remove_hf_exp_pv("^$var(match)",
"^$var(keep)"))
</example>
</section>
+ <section id="textops.f.remove_hf_idx">
+ <title>
+ <function moreinfo="none">remove_hf_idx(hname, idx)</function>
+ </title>
+ <para>
+ Remove from message the headers matching by name 'hname' with
+ the index 'idx'.
+ </para>
+ <para>
+ Returns true if the header is removed.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>hname</emphasis> - header name.</para>
+ </listitem>
+ <listitem>
+ <para><emphasis>idx</emphasis> - index of the header, starting
+ from 0 with first header; negative values count from the end of
+ the headers, -1 being the last header matching the name.</para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The parameters can be config variables.
+ </para>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>remove_hf_idx</function> usage</title>
+ <programlisting format="linespecific">
+...
+remove_hf_idx("X-My-Header", "-1");
+...
+</programlisting>
+ </example>
+ </section>
+
<section id="textops.f.has_body">
<title>
<function moreinfo="none">has_body()</function>,