Browse code

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

Kamailio Dev authored on 29/07/2021 07:16:28
Showing 1 changed files
... ...
@@ -39,6 +39,7 @@ Daniel-Constantin Mierla
39 39
               2.18. textopsx.f.hf_iterator_next(iname)
40 40
               2.19. hf_iterator_rm(iname)
41 41
               2.20. hf_iterator_append(iname, htext)
42
+              2.21. hf_iterator_insert(iname, htext)
42 43
 
43 44
         3. Selects
44 45
 
... ...
@@ -68,7 +69,8 @@ Daniel-Constantin Mierla
68 69
    1.18. hf_iterator_next usage
69 70
    1.19. hf_iterator_rm usage
70 71
    1.20. hf_iterator_append usage
71
-   1.21. @hf_value select usage
72
+   1.21. hf_iterator_insert usage
73
+   1.22. @hf_value select usage
72 74
 
73 75
 Chapter 1. Admin Guide
74 76
 
... ...
@@ -97,6 +99,7 @@ Chapter 1. Admin Guide
97 99
         2.18. textopsx.f.hf_iterator_next(iname)
98 100
         2.19. hf_iterator_rm(iname)
99 101
         2.20. hf_iterator_append(iname, htext)
102
+        2.21. hf_iterator_insert(iname, htext)
100 103
 
101 104
    3. Selects
102 105
 
... ...
@@ -136,6 +139,7 @@ Chapter 1. Admin Guide
136 139
    2.18. textopsx.f.hf_iterator_next(iname)
137 140
    2.19. hf_iterator_rm(iname)
138 141
    2.20. hf_iterator_append(iname, htext)
142
+   2.21. hf_iterator_insert(iname, htext)
139 143
 
140 144
 2.1.  msg_apply_changes()
141 145
 
... ...
@@ -517,6 +521,26 @@ hf_iterator_end("i1");
517 521
     hf_iterator_end("i1");
518 522
 ...
519 523
 
524
+2.21.  hf_iterator_insert(iname, htext)
525
+
526
+   Add headers before the one at the current iterator possition.
527
+
528
+   The parameters can be dynamic strings with variables.
529
+
530
+   This function can be used from ANY_ROUTE.
531
+
532
+   Example 1.21. hf_iterator_insert usage
533
+...
534
+    hf_iterator_start("i1");
535
+    while(hf_iterator_next("i1")) {
536
+        if($hfitname(i1)=="My-Header") {
537
+            hf_iterator_insert("i1", "My-New-Header: abc\r\n");
538
+            break;
539
+        }
540
+    }
541
+    hf_iterator_end("i1");
542
+...
543
+
520 544
 3. Selects
521 545
 
522 546
    3.1. @hf_value
... ...
@@ -552,7 +576,7 @@ hf_iterator_end("i1");
552 576
      * IDX - Value index, negative value counts from bottom
553 577
      * PARAM_NAME - name of parameter
554 578
 
555
-   Example 1.21. @hf_value select usage
579
+   Example 1.22. @hf_value select usage
556 580
 ...
557 581
 $a = @hf_value.my_header[1].my_param;
558 582
 xplog("L_ERR", "$sel(@hf_value.via[-1]), $sel(@hf_value.from.tag)\n");