[sr-dev] git:master:c593d749: textops: documentation for remove_hf_exp(...)
Daniel-Constantin Mierla
miconda at gmail.com
Fri Jul 7 14:10:43 CEST 2017
Module: kamailio
Branch: master
Commit: c593d7492ddb957a862dd31b5ce9e09fdf54a8e5
URL: https://github.com/kamailio/kamailio/commit/c593d7492ddb957a862dd31b5ce9e09fdf54a8e5
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-07-07T14:10:04+02:00
textops: documentation for remove_hf_exp(...)
---
Modified: src/modules/textops/doc/textops_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/c593d7492ddb957a862dd31b5ce9e09fdf54a8e5.diff
Patch: https://github.com/kamailio/kamailio/commit/c593d7492ddb957a862dd31b5ce9e09fdf54a8e5.patch
---
diff --git a/src/modules/textops/doc/textops_admin.xml b/src/modules/textops/doc/textops_admin.xml
index 539697fced..68b3676703 100644
--- a/src/modules/textops/doc/textops_admin.xml
+++ b/src/modules/textops/doc/textops_admin.xml
@@ -10,9 +10,9 @@
<!-- Module User's Guide -->
<chapter>
-
+
<title>&adminguide;</title>
-
+
<section>
<title>Overview</title>
<para>
@@ -32,11 +32,11 @@
processing in &kamailio; script.
</para>
<para>
- Search ignores folded lines. For example,
+ Search ignores folded lines. For example,
search(<quote>(From|f):.*@foo.bar</quote>)
doesn't match the following From header field:
<programlisting format="linespecific">
-From: medabeda
+From: medabeda
<sip:medameda at foo.bar>;tag=1234
</programlisting>
</para>
@@ -1154,8 +1154,7 @@ remove_hf("m")
</listitem>
</itemizedlist>
<para>
- This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
- FAILURE_ROUTE and BRANCH_ROUTE.
+ This function can be used from ANY_ROUTE.
</para>
<example>
<title><function>remove_hf_re</function> usage</title>
@@ -1170,6 +1169,48 @@ if(remove_hf_re("^P-"))
</example>
</section>
+ <section id="textops.f.remove_hf_exp">
+ <title>
+ <function moreinfo="none">remove_hf_exp(expmatch, expskip)</function>
+ </title>
+ <para>
+ Remove from message all headers with name matching regular
+ expression <quote>expmatch</quote>, but not matching regular
+ expression <quote>expskip</quote>.
+ </para>
+ <para>
+ Returns true if at least one header is found and removed.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>expmatch</emphasis> - regular expression to match
+ the header name to be removed.
+ </para>
+ </listitem>
+ <listitem>
+ <para><emphasis>expskip</emphasis> - regular expression to match
+ the header name to be skipped from removal.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>remove_hf_exp</function> usage</title>
+ <programlisting format="linespecific">
+...
+if(remove_hf_exp("^P-", "^P-Keep-"))
+{
+ # All headers starting with "P-" removed,
+ # except the ones starting with "P-Keep-"
+}
+...
+</programlisting>
+ </example>
+ </section>
+
<section id="textops.f.has_body">
<title>
<function moreinfo="none">has_body()</function>,
@@ -1177,7 +1218,7 @@ if(remove_hf_re("^P-"))
</title>
<para>
The function returns <emphasis>true</emphasis> if the SIP message
- has a body attached. The checked includes also the
+ has a body attached. The checked includes also the
<quote>Content-Length</quote> header presence and value.
</para>
<para>
@@ -1187,7 +1228,7 @@ if(remove_hf_re("^P-"))
<para>Meaning of the parameters is as follows:</para>
<itemizedlist>
<listitem>
- <para><emphasis>mime</emphasis> - mime to be checked against the
+ <para><emphasis>mime</emphasis> - mime to be checked against the
<quote>Content-Type</quote> header. If not present or 0, this
check will be disabled.
</para>
More information about the sr-dev
mailing list