src/modules/textopsx/doc/functions.xml
a4e0d017
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <section id="textopsx.functions" xmlns:xi="http://www.w3.org/2001/XInclude">
     <title>Functions</title>
 
647a99bd
 	<section id="textopsx.f.msg_apply_changes">
a4e0d017
 		<title>
 		<function moreinfo="none">msg_apply_changes()</function>
 		</title>
 		<para>
647a99bd
 		Use this function to apply changes performed on SIP message content. Be
b495e34e
 		careful when using this function;  due to special handling of changes
f9ab2303
 		to the SIP message buffer so far, using this function might change
b495e34e
 		the behaviour of your config.  Do test your config properly!
a4e0d017
 		</para>
    		<para>
1257d683
 		The function returns true (1) on success. If it is failure before the
 		new content is build, the function returns false (-1), the old content
 		is still in place. If parsing of the new content is failing, the
 		function stops executions of the config file (the internal structure
 		is no longer valid for config processing, like it happens when a
 		broken message is received from network).
 		</para>
 		<para>
474ab228
 			This function can be used from REQUEST_ROUTE or core REPLY_ROUTE.
 		</para>
 		<para>
 		Note: It must be used before the transaction is created in
 		request_route and not inside the onreply_route[name] executed by tm
8443b3e2
 		module. Also, do not use after resuming a suspended request or reply,
474ab228
 		at that moment the transaction is already created.
a4e0d017
 		</para>
 		<example>
 		<title><function>msg_apply_changes()</function> usage</title>
 		<programlisting format="linespecific">
 ...
 append_hf("My-Header: yes\r\n");
 if(msg_apply_changes())
 {
     # msg buffer has a new content
     if(is_present_hf("My-Header"))
     {
         # will get here always
     }
 }
 ...
 </programlisting>
 		</example>
 	</section>
 
647a99bd
     <section id="textopsx.f.change_reply_status">
a4e0d017
 	<title>
 	    <function>change_reply_status(code, reason)</function>
 	</title>
 	<para>
b495e34e
 		Intercept a SIP reply (in an onreply_route) and change its status code 
f9ab2303
 		and reason phrase prior to forwarding it.
a4e0d017
 	</para>
 	<para>Meaning of the parameters is as follows:</para>
 	<itemizedlist>
 	    <listitem>
 		<para><emphasis>code</emphasis> - Status code.
 		</para>
 	    </listitem>
 	    <listitem>
 		<para><emphasis>reason</emphasis> - Reason phrase.
 		</para>
 	    </listitem>
 	</itemizedlist>
    		<para>
 		This function can be used from ONREPLY_ROUTE.
 		</para>
 	<example>
 	    <title><function>change_reply_status</function> usage</title>
 	    <programlisting>
 ...
6e1e7fe3
 reply_route {
     if (status == "603") {
a4e0d017
         change_reply_status(404, "Not Found");
         exit;
     }
 }
dfa16778
 ...
 	    </programlisting>
 	</example>
     </section>
 
     <section id="textopsx.f.change_reply_status_code">
 	<title>
 	    <function>change_reply_status_code(vcode)</function>
 	</title>
 	<para>
 		Change the status code for a SIP reply .
 	</para>
 	<para>Meaning of the parameters is as follows:</para>
 	<itemizedlist>
 	    <listitem>
 		<para><emphasis>vcode</emphasis> - the new status code.
 		</para>
 	    </listitem>
 	</itemizedlist>
    		<para>
 		This function can be used from ONREPLY_ROUTE.
 		</para>
 	<example>
 	    <title><function>change_reply_status_code</function> usage</title>
 	    <programlisting>
 ...
 reply_route {
     if (status == "604") {
         change_reply_status_code("404");
         exit;
     }
 }
a4e0d017
 ...
 	    </programlisting>
 	</example>
     </section>
 
647a99bd
 	<section id="textopsx.f.remove_body">
af13a070
 		<title>
 		<function moreinfo="none">remove_body()</function>
 		</title>
 		<para>
f9ab2303
 		Use this function to remove the body of SIP requests or replies.
af13a070
 		</para>
 		<para>
 		This function can be used from ANY_ROUTE.
 		</para>
 		<example>
 		<title><function>remove_body()</function> usage</title>
 		<programlisting format="linespecific">
 ...
 remove_body();
 ...
 </programlisting>
 		</example>
 	</section>
 
647a99bd
 	<section id="textopsx.f.keep_hf">
d05746ee
 		<title>
be18e641
 		<function moreinfo="none">keep_hf([regexp])</function>
d05746ee
 		</title>
 		<para>
 			Remove headers that don't match the regular expression regexp.
 			Several header are ignored always (thus not removed): Via, From,
1c276452
 			To, Call-ID, CSeq, Content-Length, Content-Type, Max-Forwards,
d05746ee
 			Contact, Route, Record-Route -- these can be removed one by one
be18e641
 			with remove_hf(). If regexp is missing, then only the headers
 			listed above are kept, the rest are removed.
d05746ee
 		</para>
 		<para>
 		This function can be used from ANY_ROUTE.
 		</para>
 		<example>
 		<title><function>keep_hf()</function> usage</title>
 		<programlisting format="linespecific">
 ...
 keep_hf("User-Agent");
 ...
0c830402
 </programlisting>
 		</example>
 	</section>
 
647a99bd
 	<section id="textopsx.f.fnmatch">
0c830402
 		<title>
 		<function moreinfo="none">fnmatch(value, expr [, flags])</function>
 		</title>
 		<para>
f9ab2303
 			Match the value against the expr using shell-style pattern
0c830402
 			for file name matching (see man page for C function fnmatch()).
f9ab2303
 			It is known to be faster and use less-memory than regular expressions.
0c830402
 		</para>
 		<para>
f9ab2303
 			Parameter 'flags' is optional and can be 'i' to do case insensitive
0c830402
 			matching.
 		</para>
 		<para>
 		This function can be used from ANY_ROUTE.
 		</para>
 		<example>
 		<title><function>fnmatch()</function> usage</title>
 		<programlisting format="linespecific">
 ...
 if(fnmatch("$rU", "123*"))
 {
     ...
 }
 ...
d05746ee
 </programlisting>
 		</example>
 	</section>
af13a070
 
647a99bd
     <section id="textopsx.f.append_hf_value">
ba6119e3
 	<title>
 	    <function>append_hf_value(hf, hvalue)</function>
 	</title>
 	<para>
 		Append new header value after an existing header, if no index acquired append at the end of
 		list. Note that a header may consist of comma delimited list of values.
 	</para>
 	<para>Meaning of the parameters is as follows:</para>
 	<itemizedlist>
 	    <listitem>
 		<para><emphasis>hf</emphasis> - Header field to be appended. Format: HFNAME [ [IDX] ].
6379f128
 		If index is not specified new header is inserted at the end of message. The index 1
 		correxponds to the first header.
ba6119e3
 		</para>
 	    </listitem>
 	    <listitem>
 		<para><emphasis>hvalue</emphasis> - Value to be added, config var formatting supported.
 		</para>
 	    </listitem>
 	</itemizedlist>
 	<example>
 	    <title><function>append_hf_value</function> usage</title>
 	    <programlisting>
 ...
 append_hf_value("foo", "gogo;stamp=$Ts")   # add new header
 append_hf_value("foo[1]", "gogo")  # add new value behind first value
 append_hf_value("foo[-1]", "$var(Bar)") # try add value to the last header, if not exists add new header
 ...
 	    </programlisting>
 	</example>
     </section>
 
647a99bd
     <section id="textopsx.f.insert_hf_value">
ba6119e3
 	<title>
 	    <function>insert_hf_value(hf, hvalue)</function>
 	</title>
 	<para>
 		Insert new header value before an existing header, if no index acquired insert before first
 		hf header. Note that a header may consist of comma delimited list of values.
53ccb420
 		To insert a value behind the last value use <function>append_hf_value</function>.
ba6119e3
 	</para>
 	<para>Meaning of the parameters is as follows:</para>
 	<itemizedlist>
 	    <listitem>
 		<para><emphasis>hf</emphasis> - Header field to be appended. Format: HFNAME [ [IDX] ].
6379f128
 		If index is not specified new header is inserted at the top of message. The index 1
 		correxponds to the first header.
ba6119e3
 		</para>
 	    </listitem>
 	    <listitem>
 		<para><emphasis>hvalue</emphasis> - Value to be added, config var formatting supported.
 		</para>
 	    </listitem>
 	</itemizedlist>
 	<example>
 	    <title><function>insert_hf_value</function> usage</title>
 	    <programlisting>
 ...
 insert_hf_value("foo[2]", "gogo")
 insert_hf_value("foo", "$avp(foo)")   # add new header at the top of list
 insert_hf_value("foo[1]", "gogo") # try add to the first header
 ...
 	    </programlisting>
 	</example>
     </section>
 
647a99bd
     <section id="textopsx.f.remove_hf_value">
ba6119e3
 	<title>
 	    <function>remove_hf_value(hf_par)</function>
 	</title>
 	<para>
 		Remove the header value from existing header, Note that a header may consist of comma delimited list of values.
 	</para>
 	<para>Meaning of the parameters is as follows:</para>
 	<itemizedlist>
 	    <listitem>
 		<para><emphasis>hf_par</emphasis> - Header field/param to be removed. Format: HFNAME [ [IDX] ] [. PARAM ]
6379f128
 		If asterisk is specified as index then all values are affected. The index 1
 		correxponds to the first header.
ba6119e3
 		</para>
 	    </listitem>
 	</itemizedlist>
 	<example>
 	    <title><function>remove_hf_value</function> usage</title>
 	    <programlisting>
 ...
 remove_hf_value("foo")  # remove foo[1]
 remove_hf_value("foo[*]")  # remove all foo's headers
 remove_hf_value("foo[-1]") # last foo
 remove_hf_value("foo.bar")  # delete parameter
 remove_hf_value("foo[*].bar") # for each foo delete bar parameters
 ...
 	    </programlisting>
 	</example>
     </section>
 
647a99bd
     <section id="textopsx.f.remove_hf_value2">
ba6119e3
 	<title>
 	    <function>remove_hf_value2(hf_par)</function>
 	</title>
 	<para>
 		Remove specified header or parameter. It is expected header in Authorization format (comma delimiters are not treated as multi-value delimiters).
 
 	</para>
 	<para>Meaning of the parameters is as follows:</para>
 	<itemizedlist>
 	    <listitem>
 		<para><emphasis>hf_par</emphasis> - Header/param to be removed. Format: HFNAME [ [IDX] ] [. PARAM ]
6379f128
 		If asterisk is specified as index then all values are affected. The index 1
 		correxponds to the first header.
ba6119e3
 		</para>
 	    </listitem>
 	</itemizedlist>
 	<example>
 	    <title><function>remove_hf_value2</function> usage</title>
 	    <programlisting>
 ...
 remove_hf_value2("foo")  # remove foo[1]
 remove_hf_value2("foo[*]")  # remove all foo's headers, the same as remove_hf_header("foo[*]");
 remove_hf_value2("foo[-1]") # last foo
 remove_hf_value2("foo.bar")  # delete parameter
 remove_hf_value2("foo[*].bar") # for each foo delete bar parameters
 ...
 	    </programlisting>
 	</example>
     </section>
 
647a99bd
     <section id="textopsx.f.assign_hf_value">
ba6119e3
 	<title>
 	    <function>assign_hf_value(hf, hvalue)</function>
 	</title>
 	<para>
 		Assign value to specified header value / param.
 	</para>
 	<para>Meaning of the parameters is as follows:</para>
 	<itemizedlist>
 	    <listitem>
 			<para><emphasis>hf_para</emphasis> - Header field value / param to be appended.
 				Format: HFNAME [ [IDX] ] [. PARAM]
6379f128
 		If asterisk is specified as index then all values are affected. The index 1
 		correxponds to the first header.
ba6119e3
 		</para>
 	    </listitem>
 	    <listitem>
 			<para><emphasis>hvalue</emphasis> - Value to be assigned, config var
16cf43c2
 				formatting supported. If value is empty then no equal sign appears in param.
ba6119e3
 		</para>
 	    </listitem>
 	</itemizedlist>
 	<example>
 	    <title><function>assign_hf_value</function> usage</title>
 	    <programlisting>
 ...
 assign_hf_value("foo", "gogo")  # foo[1]
 assign_hf_value("foo[-1]", "gogo")  # foo[last_foo]
 
 assign_hf_value("foo.bar", "")
 assign_hf_value("foo[3].bar", "")
 assign_hf_value("foo[*]", "")  # remove all foo's, empty value remains
 assign_hf_value("foo[*].bar", "")  # set empty value (ex. lr)
 ...
 	    </programlisting>
 	</example>
     </section>
 
647a99bd
     <section id="textopsx.f.assign_hf_value2">
ba6119e3
 	<title>
 	    <function>assign_hf_value2(hf, hvalue)</function>
 	</title>
 	<para>
 		Assign value to specified header. It is expected header in Authorization format (comma delimiters are not treated as multi-value delimiters).
 	</para>
 	<para>Meaning of the parameters is as follows:</para>
 	<itemizedlist>
 	    <listitem>
 		<para><emphasis>hf_para</emphasis> - Header field value / param to be appended. Format: HFNAME [ [IDX] ] [. PARAM]
6379f128
 		If asterisk is specified as index then all values are affected. The index 1
 		correxponds to the first header.
ba6119e3
 		</para>
 	    </listitem>
 	    <listitem>
 			<para><emphasis>hvalue</emphasis> - Value to be assigned, config var formatting supported.
16cf43c2
 				If value is empty then no equal sign appears in param.
ba6119e3
 		</para>
 	    </listitem>
 	</itemizedlist>
 	<example>
 	    <title><function>assign_hf_value2</function> usage</title>
 	    <programlisting>
 ...
 assign_hf_value2("Authorization.integrity-protected", "\"yes\"")
 assign_hf_value2("foo[-1]", "gogo")  # foo[last_foo]
 assign_hf_value2("foo[*].bar", "")  # set empty value (ex. lr)
 ...
 	    </programlisting>
 	</example>
     </section>
 
647a99bd
     <section id="textopsx.f.include_hf_value">
ba6119e3
 	<title>
 	    <function>include_hf_value(hf, hvalue)</function>
 	</title>
 	<para>
 		Add value in set if not exists, eg. "Supported: path,100rel".
 	</para>
 	<para>Meaning of the parameters is as follows:</para>
 	<itemizedlist>
 	    <listitem>
 		<para><emphasis>hf</emphasis> - Header field name to be affected.
 		</para>
 	    </listitem>
 	    <listitem>
 		<para><emphasis>hvalue</emphasis> - config var formatting supported.
 		</para>
 	    </listitem>
 	</itemizedlist>
 	<example>
 	    <title><function>include_hf_value</function> usage</title>
 	    <programlisting>
 ...
 include_hf_value("Supported", "path");
 ...
 	    </programlisting>
 	</example>
     </section>
 
647a99bd
     <section id="textopsx.f.exclude_hf_value">
ba6119e3
 	<title>
 	    <function>exclude_hf_value(hf, hvalue)</function>
 	</title>
 	<para>
 		Remove value from set if exists, eg. "Supported: path,100rel".
 	</para>
 	<para>Meaning of the parameters is as follows:</para>
 	<itemizedlist>
 	    <listitem>
 		<para><emphasis>hf</emphasis> - Header field name to be affected.
 		</para>
 	    </listitem>
 	    <listitem>
 		<para><emphasis>hvalue</emphasis> - config formatting supported.
 		</para>
 	    </listitem>
 	</itemizedlist>
 	<example>
 	    <title><function>exclude_hf_value</function> usage</title>
 	    <programlisting>
 ...
 exclude_hf_value("Supported", "100rel");
 ...
 	    </programlisting>
 	</example>
     </section>
 
647a99bd
     <section id="textopsx.f.hf_value_exists">
ba6119e3
 	<title>
 	    <function>hf_value_exists(hf, hvalue)</function>
 	</title>
 	<para>
 		Check if value exists in set. Alternate select <emphasis>@hf_value_exists.HF.VALUE</emphasis>
 		may be used. It returns one or zero.
 	</para>
 	<para>Meaning of the parameters is as follows:</para>
 	<itemizedlist>
 	    <listitem>
 		<para><emphasis>hf</emphasis> - Header field name to be affected. Underscores are treated as dashes.
 		</para>
 	    </listitem>
 	    <listitem>
 		<para><emphasis>hvalue</emphasis> - config var formatting supported.
 		</para>
 	    </listitem>
 	</itemizedlist>
 	<example>
 	    <title><function>hf_value_exists</function> usage</title>
 	    <programlisting>
 ...
 if (hf_value_exists("Supported", "100rel")) {
 
 }
 
 if (@hf_value_exists.supported.path == "1") {
 
 }
 ...
 	    </programlisting>
 	</example>
     </section>
89d5a275
 	<section id="textopsx.f.hf_iterator_start">
 		<title>
 		<function moreinfo="none">hf_iterator_start(iname)</function>
 		</title>
 		<para>
 			Start an iterator for headers in the current SIP message.
 			The parameter iname is used to identify the iterator. There
 			can be up to 4 iterators at the same time, with different name.
 		</para>
 		<para>
 			The parameter can be a dynamic string with variables.
 		</para>
 		<para>
 			This function can be used from ANY_ROUTE.
 		</para>
 		<example>
 		<title><function>hf_iterator_start</function> usage</title>
 		<programlisting format="linespecific">
 ...
 hf_iterator_start("i1");
 ...
 </programlisting>
 		</example>
 	</section>
 	<section id="textopsx.f.hf_iterator_end">
 		<title>
 		<function moreinfo="none">hf_iterator_end(iname)</function>
 		</title>
 		<para>
 			Close the iterator identified by iname parameter. The iname value
0a13b912
 			must be the same used for hf_iterator_start().
89d5a275
 		</para>
 		<para>
 			The parameter can be dynamic string with variables.
 		</para>
 		<para>
 			This function can be used from ANY_ROUTE.
 		</para>
 		<example>
 		<title><function>hf_iterator_end</function> usage</title>
 		<programlisting format="linespecific">
 ...
 hf_iterator_end("i1");
 ...
 </programlisting>
 		</example>
 	</section>
 	<section id="textopsx.f.hf_iterator_next">
 		<title>
 		<function moreinfo="none">textopsx.f.hf_iterator_next(iname)</function>
 		</title>
 		<para>
 			Move the iterator to the next header. It must
0a13b912
 			be called also after bl_iterator_start() to get the first
89d5a275
 			header.
 		</para>
 		<para>
 			The return code is false when there is no other header in the list.
 		</para>
 		<para>
 			The item name and value are accessible via variables:
 			$hfitname(iname) and $hfitbody(iname).
 		</para>
 		<para>
 			The parameter can be dynamic string with variables.
 		</para>
 		<para>
 			This function can be used from ANY_ROUTE.
 		</para>
 		<example>
 		<title><function>hf_iterator_next</function> usage</title>
 		<programlisting format="linespecific">
 ...
     hf_iterator_start("i1");
     while(hf_iterator_next("i1")) {
         xlog("hdr[$hfitname(i1)] is: $hfitbody(i1)\n");
     }
     hf_iterator_end("i1");
 ...
24172c08
 </programlisting>
 		</example>
 	</section>
 	<section id="textopsx.f.hf_iterator_prev">
 		<title>
 		<function moreinfo="none">textopsx.f.hf_iterator_prev(iname)</function>
 		</title>
 		<para>
 			Move the iterator to the previous header. It must
0a13b912
 			be called also after hf_iterator_start() and hf_iterator_next().
24172c08
 		</para>
 		<para>
 			The parameter can be dynamic string with variables.
 		</para>
 		<para>
 			This function can be used from ANY_ROUTE.
 		</para>
 		<example>
 		<title><function>hf_iterator_prev</function> usage</title>
 		<programlisting format="linespecific">
 ...
     hf_iterator_start("i1");
     hf_iterator_next("i1");
 ...
     hf_iterator_next("i1");
 ...
     hf_iterator_prev("i1");
 ...
     hf_iterator_end("i1");
 ...
4a4b8047
 </programlisting>
 		</example>
 	</section>
 	<section id="textopsx.f.hf_iterator_rm">
 		<title>
 		<function moreinfo="none">hf_iterator_rm(iname)</function>
 		</title>
 		<para>
 			Remove the header at the current iterator position.
 		</para>
 		<para>
 			The parameter can be dynamic string with variables.
 		</para>
 		<para>
 			This function can be used from ANY_ROUTE.
 		</para>
 		<example>
 		<title><function>hf_iterator_rm</function> usage</title>
 		<programlisting format="linespecific">
 ...
     hf_iterator_start("i1");
     while(hf_iterator_next("i1")) {
         if($hfitname(i1)=="My-Header") {
             hf_iterator_rm("i1");
         }
     }
     hf_iterator_end("i1");
 ...
001e07dd
 </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");
 ...
d65adfb7
 </programlisting>
 		</example>
 	</section>
 	<section id="textopsx.f.hf_iterator_insert">
 		<title>
 		<function moreinfo="none">hf_iterator_insert(iname, htext)</function>
 		</title>
 		<para>
 			Add headers before 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_insert</function> usage</title>
 		<programlisting format="linespecific">
 ...
     hf_iterator_start("i1");
     while(hf_iterator_next("i1")) {
         if($hfitname(i1)=="My-Header") {
             hf_iterator_insert("i1", "My-New-Header: abc\r\n");
             break;
         }
     }
     hf_iterator_end("i1");
 ...
0a13b912
 </programlisting>
 		</example>
 	</section>
 	<section id="textopsx.f.bl_iterator_start">
 		<title>
 		<function moreinfo="none">bl_iterator_start(iname)</function>
 		</title>
 		<para>
 			Start an iterator for lines in the body of the current SIP message.
 			The parameter iname is used to identify the iterator. There
 			can be up to 4 iterators at the same time, with different name.
 		</para>
 		<para>
 			The parameter can be a dynamic string with variables.
 		</para>
 		<para>
 			This function can be used from ANY_ROUTE.
 		</para>
 		<example>
 		<title><function>bl_iterator_start</function> usage</title>
 		<programlisting format="linespecific">
 ...
 bl_iterator_start("b1");
 ...
 </programlisting>
 		</example>
 	</section>
 	<section id="textopsx.f.bl_iterator_end">
 		<title>
 		<function moreinfo="none">bl_iterator_end(iname)</function>
 		</title>
 		<para>
 			Close the iterator identified by iname parameter. The iname value
 			must be the same used for bl_iterator_start().
 		</para>
 		<para>
 			The parameter can be dynamic string with variables.
 		</para>
 		<para>
 			This function can be used from ANY_ROUTE.
 		</para>
 		<example>
 		<title><function>bl_iterator_end</function> usage</title>
 		<programlisting format="linespecific">
 ...
 bl_iterator_end("b1");
 ...
 </programlisting>
 		</example>
 	</section>
 	<section id="textopsx.f.bl_iterator_next">
 		<title>
 		<function moreinfo="none">textopsx.f.bl_iterator_next(iname)</function>
 		</title>
 		<para>
 			Move the iterator to the next line in the body. It must
 			be called also after bl_iterator_start() to get the first
 			header.
 		</para>
 		<para>
 			The return code is false when there is no other header in the list.
 		</para>
 		<para>
 			The body line accessible via variable $blitval(iname) - it contains
 			also the EOL chars.
 		</para>
 		<para>
 			The parameter can be dynamic string with variables.
 		</para>
 		<para>
 			This function can be used from ANY_ROUTE.
 		</para>
 		<example>
 		<title><function>bl_iterator_next</function> usage</title>
 		<programlisting format="linespecific">
 ...
     bl_iterator_start("b1");
     while(hf_iterator_next("b1")) {
         xlog("body line: hdr[$hfitname(b1)]\n");
     }
     bl_iterator_end("b1");
 ...
 </programlisting>
 		</example>
 	</section>
 	<section id="textopsx.f.bl_iterator_rm">
 		<title>
 		<function moreinfo="none">bl_iterator_rm(iname)</function>
 		</title>
 		<para>
 			Remove the body line at the current iterator position.
 		</para>
 		<para>
 			The parameter can be dynamic string with variables.
 		</para>
 		<para>
 			This function can be used from ANY_ROUTE.
 		</para>
 		<example>
 		<title><function>bl_iterator_rm</function> usage</title>
 		<programlisting format="linespecific">
 ...
     bl_iterator_start("b1");
     while(bl_iterator_next("b1")) {
         if($blitval(b1)=~"abc") {
             bl_iterator_rm("b1");
         }
     }
     bl_iterator_end("b1");
 ...
89d5a275
 </programlisting>
 		</example>
 	</section>
ba6119e3
 
a4e0d017
 </section>