[sr-dev] git:master:6c06e84d: textops: docs for replace_hdrs_str()

Daniel-Constantin Mierla miconda at gmail.com
Fri Jul 13 12:48:41 CEST 2018


Module: kamailio
Branch: master
Commit: 6c06e84db693698dde6b7cd50aeffc111073f1a3
URL: https://github.com/kamailio/kamailio/commit/6c06e84db693698dde6b7cd50aeffc111073f1a3

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-07-13T12:46:45+02:00

textops: docs for replace_hdrs_str()

---

Modified: src/modules/textops/doc/textops_admin.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/6c06e84db693698dde6b7cd50aeffc111073f1a3.diff
Patch: https://github.com/kamailio/kamailio/commit/6c06e84db693698dde6b7cd50aeffc111073f1a3.patch

---

diff --git a/src/modules/textops/doc/textops_admin.xml b/src/modules/textops/doc/textops_admin.xml
index 7d7f2d62ce..6be825efc9 100644
--- a/src/modules/textops/doc/textops_admin.xml
+++ b/src/modules/textops/doc/textops_admin.xml
@@ -476,6 +476,44 @@ replace_body_str("&kamailio;", "&kamailio; SIP Proxy", "a");
 		</example>
 	</section>
 
+	<section id="textops.f.replace_hdrs_str">
+		<title>
+		<function moreinfo="none">replace_hdrs_str(match, repl, mode)</function>
+		</title>
+		<para>
+		Replaces the first or all occurrence of 'match' with 'repl' by doing
+		string comparison for matching. It is applied over the part with headers
+		of the SIP message.
+		</para>
+		<para>Meaning of the parameters is as follows:</para>
+		<itemizedlist>
+		<listitem>
+			<para><emphasis>match</emphasis> - string to be matched.
+			</para>
+		</listitem>
+		<listitem>
+			<para><emphasis>repl</emphasis> - string to be used as replacement.
+			</para>
+		</listitem>
+		<listitem>
+			<para><emphasis>mode</emphasis> - 'f' - replace only first match;
+				'a' - replace all matches.
+			</para>
+		</listitem>
+		</itemizedlist>
+		<para>
+		This function can be used from ANY_ROUTE.
+		</para>
+		<example>
+		<title><function>replace_hdrs_str</function> usage</title>
+		<programlisting format="linespecific">
+...
+replace_hdrs_str("&kamailio;", "&kamailio; SIP Proxy", "a");
+...
+</programlisting>
+		</example>
+	</section>
+
 	<section id="textops.f.subst">
 		<title>
 		<function moreinfo="none">subst('/re/repl/flags')</function>




More information about the sr-dev mailing list