Module: kamailio
Branch: master
Commit: b18995265685517af446d54979668b6240193f32
URL:
https://github.com/kamailio/kamailio/commit/b18995265685517af446d54979668b6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-03-03T17:44:46+01:00
topos: docs for search_str() function
---
Modified: src/modules/textops/doc/textops_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/b18995265685517af446d54979668b6…
Patch:
https://github.com/kamailio/kamailio/commit/b18995265685517af446d54979668b6…
---
diff --git a/src/modules/textops/doc/textops_admin.xml
b/src/modules/textops/doc/textops_admin.xml
index e9acba3869..c05522e037 100644
--- a/src/modules/textops/doc/textops_admin.xml
+++ b/src/modules/textops/doc/textops_admin.xml
@@ -128,6 +128,42 @@ if ( search("[Ss][Ii][Pp]") ) { /*....*/ };
...
if ( search_body("[Ss][Ii][Pp]") ) { /*....*/ };
...
+</programlisting>
+ </example>
+ </section>
+
+ <section id="textops.f.search_str">
+ <title>
+ <function moreinfo="none">search_str(text. re)</function>
+ </title>
+ <para>
+ Searches for the re in the body of the message.
+ </para>
+ <para>Meaning of the parameters is as follows:</para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>text</emphasis> - text to perform regex searching
+ over it.
+ </para>
+ </listitem>
+ <listitem>
+ <para><emphasis>re</emphasis> - regular expression to match over
+ the 'text' parameter.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Both parameters can contain variables.
+ </para>
+ <para>
+ This function can be used from ANY_ROUTE.
+ </para>
+ <example>
+ <title><function>search_str</function> usage</title>
+ <programlisting format="linespecific">
+...
+if ( search_str("$ru", ";transport=tcp") ) { /*....*/ };
+...
</programlisting>
</example>
</section>