Browse code

modules: readme files regenerated - posops ... [skip ci]

Kamailio Dev authored on 08/11/2021 12:01:18
Showing 1 changed files
... ...
@@ -33,16 +33,17 @@ Daniel-Constantin Mierla
33 33
               4.1. pos_append(idx, val)
34 34
               4.2. pos_insert(idx, val)
35 35
               4.3. pos_rm(idx, len)
36
-              4.4. pos_headers_start()
37
-              4.5. pos_headers_end()
38
-              4.6. pos_body_start()
39
-              4.7. pos_body_end()
40
-              4.8. pos_find_str(idx, val)
41
-              4.9. pos_findi_str(idx, val)
42
-              4.10. pos_rfind_str(idx, val)
43
-              4.11. pos_rfindi_str(idx, val)
44
-              4.12. pos_search(idx, re)
45
-              4.13. pos_rsearch(idx, re)
36
+              4.4. pos_set_char(idx, val)
37
+              4.5. pos_headers_start()
38
+              4.6. pos_headers_end()
39
+              4.7. pos_body_start()
40
+              4.8. pos_body_end()
41
+              4.9. pos_find_str(idx, val)
42
+              4.10. pos_findi_str(idx, val)
43
+              4.11. pos_rfind_str(idx, val)
44
+              4.12. pos_rfindi_str(idx, val)
45
+              4.13. pos_search(idx, re)
46
+              4.14. pos_rsearch(idx, re)
46 47
 
47 48
         5. Pseudo Variables
48 49
 
... ...
@@ -52,16 +53,17 @@ Daniel-Constantin Mierla
52 53
    1.2. pos_append() usage
53 54
    1.3. pos_insert() usage
54 55
    1.4. pos_rm() usage
55
-   1.5. pos_headers_start() usage
56
-   1.6. pos_headers_end() usage
57
-   1.7. pos_body_start() usage
58
-   1.8. pos_body_end() usage
59
-   1.9. pos_find_str() usage
60
-   1.10. pos_findi_str() usage
61
-   1.11. pos_find_str() usage
62
-   1.12. pos_rfindi_str() usage
63
-   1.13. pos_search() usage
64
-   1.14. pos_rsearch() usage
56
+   1.5. pos_set_char() usage
57
+   1.6. pos_headers_start() usage
58
+   1.7. pos_headers_end() usage
59
+   1.8. pos_body_start() usage
60
+   1.9. pos_body_end() usage
61
+   1.10. pos_find_str() usage
62
+   1.11. pos_findi_str() usage
63
+   1.12. pos_find_str() usage
64
+   1.13. pos_rfindi_str() usage
65
+   1.14. pos_search() usage
66
+   1.15. pos_rsearch() usage
65 67
 
66 68
 Chapter 1. Admin Guide
67 69
 
... ...
@@ -82,16 +84,17 @@ Chapter 1. Admin Guide
82 84
         4.1. pos_append(idx, val)
83 85
         4.2. pos_insert(idx, val)
84 86
         4.3. pos_rm(idx, len)
85
-        4.4. pos_headers_start()
86
-        4.5. pos_headers_end()
87
-        4.6. pos_body_start()
88
-        4.7. pos_body_end()
89
-        4.8. pos_find_str(idx, val)
90
-        4.9. pos_findi_str(idx, val)
91
-        4.10. pos_rfind_str(idx, val)
92
-        4.11. pos_rfindi_str(idx, val)
93
-        4.12. pos_search(idx, re)
94
-        4.13. pos_rsearch(idx, re)
87
+        4.4. pos_set_char(idx, val)
88
+        4.5. pos_headers_start()
89
+        4.6. pos_headers_end()
90
+        4.7. pos_body_start()
91
+        4.8. pos_body_end()
92
+        4.9. pos_find_str(idx, val)
93
+        4.10. pos_findi_str(idx, val)
94
+        4.11. pos_rfind_str(idx, val)
95
+        4.12. pos_rfindi_str(idx, val)
96
+        4.13. pos_search(idx, re)
97
+        4.14. pos_rsearch(idx, re)
95 98
 
96 99
    5. Pseudo Variables
97 100
 
... ...
@@ -142,16 +145,17 @@ modparam("posops", "idx0", -200)
142 145
    4.1. pos_append(idx, val)
143 146
    4.2. pos_insert(idx, val)
144 147
    4.3. pos_rm(idx, len)
145
-   4.4. pos_headers_start()
146
-   4.5. pos_headers_end()
147
-   4.6. pos_body_start()
148
-   4.7. pos_body_end()
149
-   4.8. pos_find_str(idx, val)
150
-   4.9. pos_findi_str(idx, val)
151
-   4.10. pos_rfind_str(idx, val)
152
-   4.11. pos_rfindi_str(idx, val)
153
-   4.12. pos_search(idx, re)
154
-   4.13. pos_rsearch(idx, re)
148
+   4.4. pos_set_char(idx, val)
149
+   4.5. pos_headers_start()
150
+   4.6. pos_headers_end()
151
+   4.7. pos_body_start()
152
+   4.8. pos_body_end()
153
+   4.9. pos_find_str(idx, val)
154
+   4.10. pos_findi_str(idx, val)
155
+   4.11. pos_rfind_str(idx, val)
156
+   4.12. pos_rfindi_str(idx, val)
157
+   4.13. pos_search(idx, re)
158
+   4.14. pos_rsearch(idx, re)
155 159
 
156 160
 4.1.  pos_append(idx, val)
157 161
 
... ...
@@ -206,51 +210,68 @@ pos_insert("100", "kamailio-$si");
206 210
 pos_insert("100", "10");
207 211
 ...
208 212
 
209
-4.4.  pos_headers_start()
213
+4.4.  pos_set_char(idx, val)
214
+
215
+   Set the char at position index to first character in val.
216
+
217
+   The idx can be an integer value or a variable holding an integer. If
218
+   the value is negative, the position is counted from the end of the
219
+   buffer.
220
+
221
+   The val can be a static string or variables.
222
+
223
+   This function can be used from ANY_ROUTE.
224
+
225
+   Example 1.5. pos_set_char() usage
226
+...
227
+pos_set_char("100", "x");
228
+...
229
+
230
+4.5.  pos_headers_start()
210 231
 
211 232
    Return the position in the message buffer where headers start.
212 233
 
213 234
    This function can be used from ANY_ROUTE.
214 235
 
215
-   Example 1.5. pos_headers_start() usage
236
+   Example 1.6. pos_headers_start() usage
216 237
 ...
217 238
 $var(pos) = pos_headers_start();
218 239
 ...
219 240
 
220
-4.5.  pos_headers_end()
241
+4.6.  pos_headers_end()
221 242
 
222 243
    Return the position in the message buffer where headers end.
223 244
 
224 245
    This function can be used from ANY_ROUTE.
225 246
 
226
-   Example 1.6. pos_headers_end() usage
247
+   Example 1.7. pos_headers_end() usage
227 248
 ...
228 249
 $var(pos) = pos_headers_end();
229 250
 ...
230 251
 
231
-4.6.  pos_body_start()
252
+4.7.  pos_body_start()
232 253
 
233 254
    Return the position in the message buffer where body starts.
234 255
 
235 256
    This function can be used from ANY_ROUTE.
236 257
 
237
-   Example 1.7. pos_body_start() usage
258
+   Example 1.8. pos_body_start() usage
238 259
 ...
239 260
 $var(pos) = pos_body_start();
240 261
 ...
241 262
 
242
-4.7.  pos_body_end()
263
+4.8.  pos_body_end()
243 264
 
244 265
    Return the position in the message buffer where body ends.
245 266
 
246 267
    This function can be used from ANY_ROUTE.
247 268
 
248
-   Example 1.8. pos_body_end() usage
269
+   Example 1.9. pos_body_end() usage
249 270
 ...
250 271
 $var(pos) = pos_body_end();
251 272
 ...
252 273
 
253
-4.8.  pos_find_str(idx, val)
274
+4.9.  pos_find_str(idx, val)
254 275
 
255 276
    Return the position of the val in message buffer starting at idx. In
256 277
    case of not finding it or error, the return code is negative. If val is
... ...
@@ -264,12 +285,12 @@ $var(pos) = pos_body_end();
264 285
 
265 286
    This function can be used from ANY_ROUTE.
266 287
 
267
-   Example 1.9. pos_find_str() usage
288
+   Example 1.10. pos_find_str() usage
268 289
 ...
269 290
 $var(idx) = pos_find_str("100", "kamailio");
270 291
 ...
271 292
 
272
-4.9.  pos_findi_str(idx, val)
293
+4.10.  pos_findi_str(idx, val)
273 294
 
274 295
    Return the position of the val (matching case insensitive) in message
275 296
    buffer starting at idx. In case of not finding it or error, the return
... ...
@@ -284,12 +305,12 @@ $var(idx) = pos_find_str("100", "kamailio");
284 305
 
285 306
    This function can be used from ANY_ROUTE.
286 307
 
287
-   Example 1.10. pos_findi_str() usage
308
+   Example 1.11. pos_findi_str() usage
288 309
 ...
289 310
 $var(idx) = pos_findi_str("100", "kamailio");
290 311
 ...
291 312
 
292
-4.10.  pos_rfind_str(idx, val)
313
+4.11.  pos_rfind_str(idx, val)
293 314
 
294 315
    Return the last position of the val in message buffer starting at idx
295 316
    (reverse search). In case of not finding it or error, the return code
... ...
@@ -304,12 +325,12 @@ $var(idx) = pos_findi_str("100", "kamailio");
304 325
 
305 326
    This function can be used from ANY_ROUTE.
306 327
 
307
-   Example 1.11. pos_find_str() usage
328
+   Example 1.12. pos_find_str() usage
308 329
 ...
309 330
 $var(idx) = pos_rfind_str("100", "kamailio");
310 331
 ...
311 332
 
312
-4.11.  pos_rfindi_str(idx, val)
333
+4.12.  pos_rfindi_str(idx, val)
313 334
 
314 335
    Return the last position of the val (matching case insensitive) in
315 336
    message buffer starting at idx (reverse search). In case of not finding
... ...
@@ -324,12 +345,12 @@ $var(idx) = pos_rfind_str("100", "kamailio");
324 345
 
325 346
    This function can be used from ANY_ROUTE.
326 347
 
327
-   Example 1.12. pos_rfindi_str() usage
348
+   Example 1.13. pos_rfindi_str() usage
328 349
 ...
329 350
 $var(idx) = pos_rfindi_str("100", "kamailio");
330 351
 ...
331 352
 
332
-4.12.  pos_search(idx, re)
353
+4.13.  pos_search(idx, re)
333 354
 
334 355
    Return the position that starts matching the regular expression re in
335 356
    message buffer starting at idx. In case of not finding it or error, the
... ...
@@ -344,12 +365,12 @@ $var(idx) = pos_rfindi_str("100", "kamailio");
344 365
 
345 366
    This function can be used from ANY_ROUTE.
346 367
 
347
-   Example 1.13. pos_search() usage
368
+   Example 1.14. pos_search() usage
348 369
 ...
349 370
 $var(idx) = pos_search("100", "[0-9]+");
350 371
 ...
351 372
 
352
-4.13.  pos_rsearch(idx, re)
373
+4.14.  pos_rsearch(idx, re)
353 374
 
354 375
    Return the position of last match that starts matching the regular
355 376
    expression re in message buffer starting at idx. In case of not finding
... ...
@@ -364,7 +385,7 @@ $var(idx) = pos_search("100", "[0-9]+");
364 385
 
365 386
    This function can be used from ANY_ROUTE.
366 387
 
367
-   Example 1.14. pos_rsearch() usage
388
+   Example 1.15. pos_rsearch() usage
368 389
 ...
369 390
 $var(idx) = pos_rsearch("100", "[0-9]+");
370 391
 ...
Browse code

modules: readme files regenerated - posops ... [skip ci]

Kamailio Dev authored on 30/09/2021 10:31:26
Showing 1 changed files
... ...
@@ -42,6 +42,7 @@ Daniel-Constantin Mierla
42 42
               4.10. pos_rfind_str(idx, val)
43 43
               4.11. pos_rfindi_str(idx, val)
44 44
               4.12. pos_search(idx, re)
45
+              4.13. pos_rsearch(idx, re)
45 46
 
46 47
         5. Pseudo Variables
47 48
 
... ...
@@ -60,6 +61,7 @@ Daniel-Constantin Mierla
60 61
    1.11. pos_find_str() usage
61 62
    1.12. pos_rfindi_str() usage
62 63
    1.13. pos_search() usage
64
+   1.14. pos_rsearch() usage
63 65
 
64 66
 Chapter 1. Admin Guide
65 67
 
... ...
@@ -89,6 +91,7 @@ Chapter 1. Admin Guide
89 91
         4.10. pos_rfind_str(idx, val)
90 92
         4.11. pos_rfindi_str(idx, val)
91 93
         4.12. pos_search(idx, re)
94
+        4.13. pos_rsearch(idx, re)
92 95
 
93 96
    5. Pseudo Variables
94 97
 
... ...
@@ -148,6 +151,7 @@ modparam("posops", "idx0", -200)
148 151
    4.10. pos_rfind_str(idx, val)
149 152
    4.11. pos_rfindi_str(idx, val)
150 153
    4.12. pos_search(idx, re)
154
+   4.13. pos_rsearch(idx, re)
151 155
 
152 156
 4.1.  pos_append(idx, val)
153 157
 
... ...
@@ -345,6 +349,26 @@ $var(idx) = pos_rfindi_str("100", "kamailio");
345 349
 $var(idx) = pos_search("100", "[0-9]+");
346 350
 ...
347 351
 
352
+4.13.  pos_rsearch(idx, re)
353
+
354
+   Return the position of last match that starts matching the regular
355
+   expression re in message buffer starting at idx. In case of not finding
356
+   it or error, the return code is negative. If val is at index 0, it
357
+   returns the value specified by modparam idx0.
358
+
359
+   The idx can be an integer value or a variable holding an integer. If
360
+   the value is negative, the position is counted from the end of the
361
+   buffer.
362
+
363
+   The re can be a static regular expression string.
364
+
365
+   This function can be used from ANY_ROUTE.
366
+
367
+   Example 1.14. pos_rsearch() usage
368
+...
369
+$var(idx) = pos_rsearch("100", "[0-9]+");
370
+...
371
+
348 372
 5. Pseudo Variables
349 373
 
350 374
    The module exports a pseudo-variable class, $pos(key), to access
Browse code

modules: readme files regenerated - posops ... [skip ci]

Kamailio Dev authored on 29/09/2021 08:01:26
Showing 1 changed files
... ...
@@ -43,6 +43,8 @@ Daniel-Constantin Mierla
43 43
               4.11. pos_rfindi_str(idx, val)
44 44
               4.12. pos_search(idx, re)
45 45
 
46
+        5. Pseudo Variables
47
+
46 48
    List of Examples
47 49
 
48 50
    1.1. Set idx0 parameter
... ...
@@ -88,6 +90,8 @@ Chapter 1. Admin Guide
88 90
         4.11. pos_rfindi_str(idx, val)
89 91
         4.12. pos_search(idx, re)
90 92
 
93
+   5. Pseudo Variables
94
+
91 95
 1. Overview
92 96
 
93 97
    The module exports utility functions to work with position inside the
... ...
@@ -340,3 +344,11 @@ $var(idx) = pos_rfindi_str("100", "kamailio");
340 344
 ...
341 345
 $var(idx) = pos_search("100", "[0-9]+");
342 346
 ...
347
+
348
+5. Pseudo Variables
349
+
350
+   The module exports a pseudo-variable class, $pos(key), to access
351
+   attributes upon specific function execution.
352
+
353
+   These are documented in the appropriate Wiki pages hosted on the
354
+   project web site.
Browse code

modules: readme files regenerated - posops ... [skip ci]

Kamailio Dev authored on 27/09/2021 10:46:18
Showing 1 changed files
... ...
@@ -41,6 +41,7 @@ Daniel-Constantin Mierla
41 41
               4.9. pos_findi_str(idx, val)
42 42
               4.10. pos_rfind_str(idx, val)
43 43
               4.11. pos_rfindi_str(idx, val)
44
+              4.12. pos_search(idx, re)
44 45
 
45 46
    List of Examples
46 47
 
... ...
@@ -56,6 +57,7 @@ Daniel-Constantin Mierla
56 57
    1.10. pos_findi_str() usage
57 58
    1.11. pos_find_str() usage
58 59
    1.12. pos_rfindi_str() usage
60
+   1.13. pos_search() usage
59 61
 
60 62
 Chapter 1. Admin Guide
61 63
 
... ...
@@ -84,6 +86,7 @@ Chapter 1. Admin Guide
84 86
         4.9. pos_findi_str(idx, val)
85 87
         4.10. pos_rfind_str(idx, val)
86 88
         4.11. pos_rfindi_str(idx, val)
89
+        4.12. pos_search(idx, re)
87 90
 
88 91
 1. Overview
89 92
 
... ...
@@ -140,6 +143,7 @@ modparam("posops", "idx0", -200)
140 143
    4.9. pos_findi_str(idx, val)
141 144
    4.10. pos_rfind_str(idx, val)
142 145
    4.11. pos_rfindi_str(idx, val)
146
+   4.12. pos_search(idx, re)
143 147
 
144 148
 4.1.  pos_append(idx, val)
145 149
 
... ...
@@ -316,3 +320,23 @@ $var(idx) = pos_rfind_str("100", "kamailio");
316 320
 ...
317 321
 $var(idx) = pos_rfindi_str("100", "kamailio");
318 322
 ...
323
+
324
+4.12.  pos_search(idx, re)
325
+
326
+   Return the position that starts matching the regular expression re in
327
+   message buffer starting at idx. In case of not finding it or error, the
328
+   return code is negative. If val is at index 0, it returns the value
329
+   specified by modparam idx0.
330
+
331
+   The idx can be an integer value or a variable holding an integer. If
332
+   the value is negative, the position is counted from the end of the
333
+   buffer.
334
+
335
+   The re can be a static regular expression string.
336
+
337
+   This function can be used from ANY_ROUTE.
338
+
339
+   Example 1.13. pos_search() usage
340
+...
341
+$var(idx) = pos_search("100", "[0-9]+");
342
+...
Browse code

modules: readme files regenerated - posops ... [skip ci]

Kamailio Dev authored on 23/09/2021 07:46:23
Showing 1 changed files
... ...
@@ -39,6 +39,8 @@ Daniel-Constantin Mierla
39 39
               4.7. pos_body_end()
40 40
               4.8. pos_find_str(idx, val)
41 41
               4.9. pos_findi_str(idx, val)
42
+              4.10. pos_rfind_str(idx, val)
43
+              4.11. pos_rfindi_str(idx, val)
42 44
 
43 45
    List of Examples
44 46
 
... ...
@@ -52,6 +54,8 @@ Daniel-Constantin Mierla
52 54
    1.8. pos_body_end() usage
53 55
    1.9. pos_find_str() usage
54 56
    1.10. pos_findi_str() usage
57
+   1.11. pos_find_str() usage
58
+   1.12. pos_rfindi_str() usage
55 59
 
56 60
 Chapter 1. Admin Guide
57 61
 
... ...
@@ -78,6 +82,8 @@ Chapter 1. Admin Guide
78 82
         4.7. pos_body_end()
79 83
         4.8. pos_find_str(idx, val)
80 84
         4.9. pos_findi_str(idx, val)
85
+        4.10. pos_rfind_str(idx, val)
86
+        4.11. pos_rfindi_str(idx, val)
81 87
 
82 88
 1. Overview
83 89
 
... ...
@@ -132,6 +138,8 @@ modparam("posops", "idx0", -200)
132 138
    4.7. pos_body_end()
133 139
    4.8. pos_find_str(idx, val)
134 140
    4.9. pos_findi_str(idx, val)
141
+   4.10. pos_rfind_str(idx, val)
142
+   4.11. pos_rfindi_str(idx, val)
135 143
 
136 144
 4.1.  pos_append(idx, val)
137 145
 
... ...
@@ -236,7 +244,9 @@ $var(pos) = pos_body_end();
236 244
    case of not finding it or error, the return code is negative. If val is
237 245
    at index 0, it returns the value specified by modparam idx0.
238 246
 
239
-   The idx can be an integer value or a variable holding an integer.
247
+   The idx can be an integer value or a variable holding an integer. If
248
+   the value is negative, the position is counted from the end of the
249
+   buffer.
240 250
 
241 251
    The val can be a static string or variables.
242 252
 
... ...
@@ -254,7 +264,9 @@ $var(idx) = pos_find_str("100", "kamailio");
254 264
    code is negative. If val is at index 0, it returns the value specified
255 265
    by modparam idx0.
256 266
 
257
-   The idx can be an integer value or a variable holding an integer.
267
+   The idx can be an integer value or a variable holding an integer. If
268
+   the value is negative, the position is counted from the end of the
269
+   buffer.
258 270
 
259 271
    The val can be a static string or variables.
260 272
 
... ...
@@ -264,3 +276,43 @@ $var(idx) = pos_find_str("100", "kamailio");
264 276
 ...
265 277
 $var(idx) = pos_findi_str("100", "kamailio");
266 278
 ...
279
+
280
+4.10.  pos_rfind_str(idx, val)
281
+
282
+   Return the last position of the val in message buffer starting at idx
283
+   (reverse search). In case of not finding it or error, the return code
284
+   is negative. If val is at index 0, it returns the value specified by
285
+   modparam idx0.
286
+
287
+   The idx can be an integer value or a variable holding an integer. If
288
+   the value is negative, the position is counted from the end of the
289
+   buffer.
290
+
291
+   The val can be a static string or variables.
292
+
293
+   This function can be used from ANY_ROUTE.
294
+
295
+   Example 1.11. pos_find_str() usage
296
+...
297
+$var(idx) = pos_rfind_str("100", "kamailio");
298
+...
299
+
300
+4.11.  pos_rfindi_str(idx, val)
301
+
302
+   Return the last position of the val (matching case insensitive) in
303
+   message buffer starting at idx (reverse search). In case of not finding
304
+   it or error, the return code is negative. If val is at index 0, it
305
+   returns the value specified by modparam idx0.
306
+
307
+   The idx can be an integer value or a variable holding an integer. If
308
+   the value is negative, the position is counted from the end of the
309
+   buffer.
310
+
311
+   The val can be a static string or variables.
312
+
313
+   This function can be used from ANY_ROUTE.
314
+
315
+   Example 1.12. pos_rfindi_str() usage
316
+...
317
+$var(idx) = pos_rfindi_str("100", "kamailio");
318
+...
Browse code

modules: readme files regenerated - posops ... [skip ci]

Kamailio Dev authored on 21/09/2021 14:01:16
Showing 1 changed files
... ...
@@ -37,6 +37,8 @@ Daniel-Constantin Mierla
37 37
               4.5. pos_headers_end()
38 38
               4.6. pos_body_start()
39 39
               4.7. pos_body_end()
40
+              4.8. pos_find_str(idx, val)
41
+              4.9. pos_findi_str(idx, val)
40 42
 
41 43
    List of Examples
42 44
 
... ...
@@ -48,6 +50,8 @@ Daniel-Constantin Mierla
48 50
    1.6. pos_headers_end() usage
49 51
    1.7. pos_body_start() usage
50 52
    1.8. pos_body_end() usage
53
+   1.9. pos_find_str() usage
54
+   1.10. pos_findi_str() usage
51 55
 
52 56
 Chapter 1. Admin Guide
53 57
 
... ...
@@ -72,6 +76,8 @@ Chapter 1. Admin Guide
72 76
         4.5. pos_headers_end()
73 77
         4.6. pos_body_start()
74 78
         4.7. pos_body_end()
79
+        4.8. pos_find_str(idx, val)
80
+        4.9. pos_findi_str(idx, val)
75 81
 
76 82
 1. Overview
77 83
 
... ...
@@ -124,6 +130,8 @@ modparam("posops", "idx0", -200)
124 130
    4.5. pos_headers_end()
125 131
    4.6. pos_body_start()
126 132
    4.7. pos_body_end()
133
+   4.8. pos_find_str(idx, val)
134
+   4.9. pos_findi_str(idx, val)
127 135
 
128 136
 4.1.  pos_append(idx, val)
129 137
 
... ...
@@ -221,3 +229,38 @@ $var(pos) = pos_body_start();
221 229
 ...
222 230
 $var(pos) = pos_body_end();
223 231
 ...
232
+
233
+4.8.  pos_find_str(idx, val)
234
+
235
+   Return the position of the val in message buffer starting at idx. In
236
+   case of not finding it or error, the return code is negative. If val is
237
+   at index 0, it returns the value specified by modparam idx0.
238
+
239
+   The idx can be an integer value or a variable holding an integer.
240
+
241
+   The val can be a static string or variables.
242
+
243
+   This function can be used from ANY_ROUTE.
244
+
245
+   Example 1.9. pos_find_str() usage
246
+...
247
+$var(idx) = pos_find_str("100", "kamailio");
248
+...
249
+
250
+4.9.  pos_findi_str(idx, val)
251
+
252
+   Return the position of the val (matching case insensitive) in message
253
+   buffer starting at idx. In case of not finding it or error, the return
254
+   code is negative. If val is at index 0, it returns the value specified
255
+   by modparam idx0.
256
+
257
+   The idx can be an integer value or a variable holding an integer.
258
+
259
+   The val can be a static string or variables.
260
+
261
+   This function can be used from ANY_ROUTE.
262
+
263
+   Example 1.10. pos_findi_str() usage
264
+...
265
+$var(idx) = pos_findi_str("100", "kamailio");
266
+...
Browse code

modules: readme files regenerated - posops ... [skip ci]

Kamailio Dev authored on 21/09/2021 08:31:29
Showing 1 changed files
... ...
@@ -24,25 +24,30 @@ Daniel-Constantin Mierla
24 24
               2.1. Kamailio Modules
25 25
               2.2. External Libraries or Applications
26 26
 
27
-        3. Functions
27
+        3. Parameters
28 28
 
29
-              3.1. pos_append(idx, val)
30
-              3.2. pos_insert(idx, val)
31
-              3.3. pos_rm(idx, len)
32
-              3.4. pos_headers_start()
33
-              3.5. pos_headers_end()
34
-              3.6. pos_body_start()
35
-              3.7. pos_body_end()
29
+              3.1. idx0 (int)
30
+
31
+        4. Functions
32
+
33
+              4.1. pos_append(idx, val)
34
+              4.2. pos_insert(idx, val)
35
+              4.3. pos_rm(idx, len)
36
+              4.4. pos_headers_start()
37
+              4.5. pos_headers_end()
38
+              4.6. pos_body_start()
39
+              4.7. pos_body_end()
36 40
 
37 41
    List of Examples
38 42
 
39
-   1.1. pos_append() usage
40
-   1.2. pos_insert() usage
41
-   1.3. pos_rm() usage
42
-   1.4. pos_headers_start() usage
43
-   1.5. pos_headers_end() usage
44
-   1.6. pos_body_start() usage
45
-   1.7. pos_body_end() usage
43
+   1.1. Set idx0 parameter
44
+   1.2. pos_append() usage
45
+   1.3. pos_insert() usage
46
+   1.4. pos_rm() usage
47
+   1.5. pos_headers_start() usage
48
+   1.6. pos_headers_end() usage
49
+   1.7. pos_body_start() usage
50
+   1.8. pos_body_end() usage
46 51
 
47 52
 Chapter 1. Admin Guide
48 53
 
... ...
@@ -54,15 +59,19 @@ Chapter 1. Admin Guide
54 59
         2.1. Kamailio Modules
55 60
         2.2. External Libraries or Applications
56 61
 
57
-   3. Functions
62
+   3. Parameters
63
+
64
+        3.1. idx0 (int)
58 65
 
59
-        3.1. pos_append(idx, val)
60
-        3.2. pos_insert(idx, val)
61
-        3.3. pos_rm(idx, len)
62
-        3.4. pos_headers_start()
63
-        3.5. pos_headers_end()
64
-        3.6. pos_body_start()
65
-        3.7. pos_body_end()
66
+   4. Functions
67
+
68
+        4.1. pos_append(idx, val)
69
+        4.2. pos_insert(idx, val)
70
+        4.3. pos_rm(idx, len)
71
+        4.4. pos_headers_start()
72
+        4.5. pos_headers_end()
73
+        4.6. pos_body_start()
74
+        4.7. pos_body_end()
66 75
 
67 76
 1. Overview
68 77
 
... ...
@@ -89,17 +98,34 @@ Chapter 1. Admin Guide
89 98
    running Kamailio with this module loaded:
90 99
      * none.
91 100
 
92
-3. Functions
101
+3. Parameters
102
+
103
+   3.1. idx0 (int)
104
+
105
+3.1. idx0 (int)
106
+
107
+   The value to return by functions seeking a position when the index is 0
108
+   (note: returning 0 is stopping the execution of configuration file like
109
+   'exit', but for KEMI usage it is ok).
110
+
111
+   Default value is -255.
112
+
113
+   Example 1.1. Set idx0 parameter
114
+...
115
+modparam("posops", "idx0", -200)
116
+...
117
+
118
+4. Functions
93 119
 
94
-   3.1. pos_append(idx, val)
95
-   3.2. pos_insert(idx, val)
96
-   3.3. pos_rm(idx, len)
97
-   3.4. pos_headers_start()
98
-   3.5. pos_headers_end()
99
-   3.6. pos_body_start()
100
-   3.7. pos_body_end()
120
+   4.1. pos_append(idx, val)
121
+   4.2. pos_insert(idx, val)
122
+   4.3. pos_rm(idx, len)
123
+   4.4. pos_headers_start()
124
+   4.5. pos_headers_end()
125
+   4.6. pos_body_start()
126
+   4.7. pos_body_end()
101 127
 
102
-3.1.  pos_append(idx, val)
128
+4.1.  pos_append(idx, val)
103 129
 
104 130
    Append the value val after the position idx in the SIP message buffer.
105 131
 
... ...
@@ -111,12 +137,12 @@ Chapter 1. Admin Guide
111 137
 
112 138
    This function can be used from ANY_ROUTE.
113 139
 
114
-   Example 1.1. pos_append() usage
140
+   Example 1.2. pos_append() usage
115 141
 ...
116 142
 pos_append("100", "kamailio-$si");
117 143
 ...
118 144
 
119
-3.2.  pos_insert(idx, val)
145
+4.2.  pos_insert(idx, val)
120 146
 
121 147
    Insert the value val at the position idx in the SIP message buffer.
122 148
 
... ...
@@ -128,12 +154,12 @@ pos_append("100", "kamailio-$si");
128 154
 
129 155
    This function can be used from ANY_ROUTE.
130 156
 
131
-   Example 1.2. pos_insert() usage
157
+   Example 1.3. pos_insert() usage
132 158
 ...
133 159
 pos_insert("100", "kamailio-$si");
134 160
 ...
135 161
 
136
-3.3.  pos_rm(idx, len)
162
+4.3.  pos_rm(idx, len)
137 163
 
138 164
    Remove len characters starting at the position idx in the SIP message
139 165
    buffer.
... ...
@@ -147,51 +173,51 @@ pos_insert("100", "kamailio-$si");
147 173
 
148 174
    This function can be used from ANY_ROUTE.
149 175
 
150
-   Example 1.3. pos_rm() usage
176
+   Example 1.4. pos_rm() usage
151 177
 ...
152 178
 pos_insert("100", "10");
153 179
 ...
154 180
 
155
-3.4.  pos_headers_start()
181
+4.4.  pos_headers_start()
156 182
 
157 183
    Return the position in the message buffer where headers start.
158 184
 
159 185
    This function can be used from ANY_ROUTE.
160 186
 
161
-   Example 1.4. pos_headers_start() usage
187
+   Example 1.5. pos_headers_start() usage
162 188
 ...
163 189
 $var(pos) = pos_headers_start();
164 190
 ...
165 191
 
166
-3.5.  pos_headers_end()
192
+4.5.  pos_headers_end()
167 193
 
168 194
    Return the position in the message buffer where headers end.
169 195
 
170 196
    This function can be used from ANY_ROUTE.
171 197
 
172
-   Example 1.5. pos_headers_end() usage
198
+   Example 1.6. pos_headers_end() usage
173 199
 ...
174 200
 $var(pos) = pos_headers_end();
175 201
 ...
176 202
 
177
-3.6.  pos_body_start()
203
+4.6.  pos_body_start()
178 204
 
179 205
    Return the position in the message buffer where body starts.
180 206
 
181 207
    This function can be used from ANY_ROUTE.
182 208
 
183
-   Example 1.6. pos_body_start() usage
209
+   Example 1.7. pos_body_start() usage
184 210
 ...
185 211
 $var(pos) = pos_body_start();
186 212
 ...
187 213
 
188
-3.7.  pos_body_end()
214
+4.7.  pos_body_end()
189 215
 
190 216
    Return the position in the message buffer where body ends.
191 217
 
192 218
    This function can be used from ANY_ROUTE.
193 219
 
194
-   Example 1.7. pos_body_end() usage
220
+   Example 1.8. pos_body_end() usage
195 221
 ...
196 222
 $var(pos) = pos_body_end();
197 223
 ...
Browse code

modules: readme files regenerated - posops ... [skip ci]

Kamailio Dev authored on 20/09/2021 05:31:16
Showing 1 changed files
... ...
@@ -11,7 +11,7 @@ Daniel-Constantin Mierla
11 11
 
12 12
    <miconda@gmail.com>
13 13
 
14
-   Copyright � 2021 http://www.asipto.com
14
+   Copyright © 2021 http://www.asipto.com
15 15
      __________________________________________________________________
16 16
 
17 17
    Table of Contents
... ...
@@ -29,12 +29,20 @@ Daniel-Constantin Mierla
29 29
               3.1. pos_append(idx, val)
30 30
               3.2. pos_insert(idx, val)
31 31
               3.3. pos_rm(idx, len)
32
+              3.4. pos_headers_start()
33
+              3.5. pos_headers_end()
34
+              3.6. pos_body_start()
35
+              3.7. pos_body_end()
32 36
 
33 37
    List of Examples
34 38
 
35 39
    1.1. pos_append() usage
36 40
    1.2. pos_insert() usage
37 41
    1.3. pos_rm() usage
42
+   1.4. pos_headers_start() usage
43
+   1.5. pos_headers_end() usage
44
+   1.6. pos_body_start() usage
45
+   1.7. pos_body_end() usage
38 46
 
39 47
 Chapter 1. Admin Guide
40 48
 
... ...
@@ -51,6 +59,10 @@ Chapter 1. Admin Guide
51 59
         3.1. pos_append(idx, val)
52 60
         3.2. pos_insert(idx, val)
53 61
         3.3. pos_rm(idx, len)
62
+        3.4. pos_headers_start()
63
+        3.5. pos_headers_end()
64
+        3.6. pos_body_start()
65
+        3.7. pos_body_end()
54 66
 
55 67
 1. Overview
56 68
 
... ...
@@ -82,8 +94,12 @@ Chapter 1. Admin Guide
82 94
    3.1. pos_append(idx, val)
83 95
    3.2. pos_insert(idx, val)
84 96
    3.3. pos_rm(idx, len)
97
+   3.4. pos_headers_start()
98
+   3.5. pos_headers_end()
99
+   3.6. pos_body_start()
100
+   3.7. pos_body_end()
85 101
 
86
-3.1. pos_append(idx, val)
102
+3.1.  pos_append(idx, val)
87 103
 
88 104
    Append the value val after the position idx in the SIP message buffer.
89 105
 
... ...
@@ -100,7 +116,7 @@ Chapter 1. Admin Guide
100 116
 pos_append("100", "kamailio-$si");
101 117
 ...
102 118
 
103
-3.2. pos_insert(idx, val)
119
+3.2.  pos_insert(idx, val)
104 120
 
105 121
    Insert the value val at the position idx in the SIP message buffer.
106 122
 
... ...
@@ -117,7 +133,7 @@ pos_append("100", "kamailio-$si");
117 133
 pos_insert("100", "kamailio-$si");
118 134
 ...
119 135
 
120
-3.3. pos_rm(idx, len)
136
+3.3.  pos_rm(idx, len)
121 137
 
122 138
    Remove len characters starting at the position idx in the SIP message
123 139
    buffer.
... ...
@@ -135,3 +151,47 @@ pos_insert("100", "kamailio-$si");
135 151
 ...
136 152
 pos_insert("100", "10");
137 153
 ...
154
+
155
+3.4.  pos_headers_start()
156
+
157
+   Return the position in the message buffer where headers start.
158
+
159
+   This function can be used from ANY_ROUTE.
160
+
161
+   Example 1.4. pos_headers_start() usage
162
+...
163
+$var(pos) = pos_headers_start();
164
+...
165
+
166
+3.5.  pos_headers_end()
167
+
168
+   Return the position in the message buffer where headers end.
169
+
170
+   This function can be used from ANY_ROUTE.
171
+
172
+   Example 1.5. pos_headers_end() usage
173
+...
174
+$var(pos) = pos_headers_end();
175
+...
176
+
177
+3.6.  pos_body_start()
178
+
179
+   Return the position in the message buffer where body starts.
180
+
181
+   This function can be used from ANY_ROUTE.
182
+
183
+   Example 1.6. pos_body_start() usage
184
+...
185
+$var(pos) = pos_body_start();
186
+...
187
+
188
+3.7.  pos_body_end()
189
+
190