posops: new module with functions working with the position in message buffer
[kamailio] / src / modules / posops / doc / posops_admin.xml
1 <?xml version="1.0" encoding='ISO-8859-1'?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4
5 <!-- Include general documentation entities -->
6 <!ENTITY % docentities SYSTEM "../../../../doc/docbook/entities.xml">
7 %docentities;
8
9 ]>
10 <!-- Module User's Guide -->
11
12 <chapter>
13
14         <title>&adminguide;</title>
15
16         <section>
17         <title>Overview</title>
18         <para>
19                 The module exports utility functions to work with position inside the
20                 SIP message buffer.
21         </para>
22         <para>
23                 Among them are function to add or remove content at a specific position.
24         </para>
25         </section>
26         <section>
27         <title>Dependencies</title>
28         <section>
29                 <title>&kamailio; Modules</title>
30                 <para>
31                 The following modules must be installed (but not loaded) to use this module:
32                         <itemizedlist>
33                         <listitem>
34                         <para>
35                                 <emphasis>none</emphasis>.
36                         </para>
37                         </listitem>
38                         </itemizedlist>
39                 </para>
40         </section>
41         <section>
42                 <title>External Libraries or Applications</title>
43                 <para>
44                 The following libraries or applications must be installed before running
45                 &kamailio; with this module loaded:
46                         <itemizedlist>
47                         <listitem>
48                         <para>
49                                 <emphasis>none</emphasis>.
50                         </para>
51                         </listitem>
52                         </itemizedlist>
53                 </para>
54         </section>
55         </section>
56
57         <section>
58         <title>Functions</title>
59                 <section id="posops.f.pos_append">
60                         <title>
61                                 <function moreinfo="none">pos_append(idx, val)</function>
62                         </title>
63                         <para>
64                         Append the value val after the position idx in the SIP message buffer.
65                         </para>
66                         <para>
67                         The idx can be an integer value or a variable holding an integer. If
68                         the value is negative, the position is counted from the end of the buffer.
69                         </para>
70                         <para>
71                         The val can be a static string or variables.
72                         </para>
73                         <para>
74                         This function can be used from ANY_ROUTE.
75                         </para>
76                         <example>
77                                 <title><function>pos_append()</function> usage</title>
78                                 <programlisting format="linespecific">
79 ...
80 pos_append("100", "kamailio-$si");
81 ...
82                                 </programlisting>
83                         </example>
84                 </section>
85                 <section id="posops.f.pos_insert">
86                         <title>
87                                 <function moreinfo="none">pos_insert(idx, val)</function>
88                         </title>
89                         <para>
90                         Insert the value val at the position idx in the SIP message buffer.
91                         </para>
92                         <para>
93                         The idx can be an integer value or a variable holding an integer. If
94                         the value is negative, the position is counted from the end of the buffer.
95                         </para>
96                         <para>
97                         The val can be a static string or variables.
98                         </para>
99                         <para>
100                         This function can be used from ANY_ROUTE.
101                         </para>
102                         <example>
103                                 <title><function>pos_insert()</function> usage</title>
104                                 <programlisting format="linespecific">
105 ...
106 pos_insert("100", "kamailio-$si");
107 ...
108                                 </programlisting>
109                         </example>
110                 </section>
111                 <section id="posops.f.pos_rm">
112                         <title>
113                                 <function moreinfo="none">pos_rm(idx, len)</function>
114                         </title>
115                         <para>
116                         Remove len characters starting at the position idx in the SIP message buffer.
117                         </para>
118                         <para>
119                         The idx can be an integer value or a variable holding an integer. If
120                         the value is negative, the position is counted from the end of the buffer.
121                         </para>
122                         <para>
123                         The idx can be a positive integer value or a variable holding a positive
124                         integer.
125                         </para>
126                         <para>
127                         This function can be used from ANY_ROUTE.
128                         </para>
129                         <example>
130                                 <title><function>pos_rm()</function> usage</title>
131                                 <programlisting format="linespecific">
132 ...
133 pos_insert("100", "10");
134 ...
135                                 </programlisting>
136                         </example>
137                 </section>
138         </section>
139
140 </chapter>
141