[sr-dev] git:master:001e07dd: textopsx: docs for hf_iterator_append()

Daniel-Constantin Mierla miconda at gmail.com
Mon Jul 26 17:16:45 CEST 2021


Module: kamailio
Branch: master
Commit: 001e07ddaff30153ee9bc9beb5cb2430007173e5
URL: https://github.com/kamailio/kamailio/commit/001e07ddaff30153ee9bc9beb5cb2430007173e5

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-07-26T17:15:38+02:00

textopsx: docs for hf_iterator_append()

---

Modified: src/modules/textopsx/doc/functions.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/001e07ddaff30153ee9bc9beb5cb2430007173e5.diff
Patch: https://github.com/kamailio/kamailio/commit/001e07ddaff30153ee9bc9beb5cb2430007173e5.patch

---

diff --git a/src/modules/textopsx/doc/functions.xml b/src/modules/textopsx/doc/functions.xml
index c1c5fd5f64..b43a0d4bb8 100644
--- a/src/modules/textopsx/doc/functions.xml
+++ b/src/modules/textopsx/doc/functions.xml
@@ -589,6 +589,35 @@ hf_iterator_end("i1");
     }
     hf_iterator_end("i1");
 ...
+</programlisting>
+		</example>
+	</section>
+	<section id="textopsx.f.hf_iterator_append">
+		<title>
+		<function moreinfo="none">hf_iterator_append(iname, htext)</function>
+		</title>
+		<para>
+			Add headers after the one at the current iterator possition.
+		</para>
+		<para>
+			The parameters can be dynamic strings with variables.
+		</para>
+		<para>
+			This function can be used from ANY_ROUTE.
+		</para>
+		<example>
+		<title><function>hf_iterator_append</function> usage</title>
+		<programlisting format="linespecific">
+...
+    hf_iterator_start("i1");
+    while(hf_iterator_next("i1")) {
+        if($hfitname(i1)=="My-Header") {
+            hf_iterator_append("i1", "My-New-Header: abc\r\n");
+            break;
+        }
+    }
+    hf_iterator_end("i1");
+...
 </programlisting>
 		</example>
 	</section>




More information about the sr-dev mailing list