Browse code

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

Kamailio Dev authored on 14/10/2020 14:01:13
Showing 1 changed files
... ...
@@ -47,23 +47,24 @@ Daniel-Constantin Mierla
47 47
 
48 48
               4.8. xavp_params_explode(sparams, xname)
49 49
               4.9. xavp_params_implode(xname, pvname)
50
-              4.10. xavp_child_seti(rname, cname, ival)
51
-              4.11. xavi_child_seti(rname, cname, ival)
52
-              4.12. xavp_child_sets(rname, cname, sval)
53
-              4.13. xavi_child_sets(rname, cname, sval)
54
-              4.14. xavp_rm(rname)
55
-              4.15. xavi_rm(rname)
56
-              4.16. xavp_child_rm(rname, cname)
57
-              4.17. xavi_child_rm(rname, cname)
58
-              4.18. sbranch_set_ruri()
59
-              4.19. sbranch_append()
60
-              4.20. sbranch_reset()
61
-              4.21. pv_xavp_print()
62
-              4.22. pv_xavu_print()
63
-              4.23. pv_xavi_print()
64
-              4.24. pv_var_to_xavp(varname, xname)
65
-              4.25. pv_xavp_to_var(xname)
66
-              4.26. pv_evalx(dst, fmt)
50
+              4.10. xavp_slist_explode(slist, sep, mode, xname)
51
+              4.11. xavp_child_seti(rname, cname, ival)
52
+              4.12. xavi_child_seti(rname, cname, ival)
53
+              4.13. xavp_child_sets(rname, cname, sval)
54
+              4.14. xavi_child_sets(rname, cname, sval)
55
+              4.15. xavp_rm(rname)
56
+              4.16. xavi_rm(rname)
57
+              4.17. xavp_child_rm(rname, cname)
58
+              4.18. xavi_child_rm(rname, cname)
59
+              4.19. sbranch_set_ruri()
60
+              4.20. sbranch_append()
61
+              4.21. sbranch_reset()
62
+              4.22. pv_xavp_print()
63
+              4.23. pv_xavu_print()
64
+              4.24. pv_xavi_print()
65
+              4.25. pv_var_to_xavp(varname, xname)
66
+              4.26. pv_xavp_to_var(xname)
67
+              4.27. pv_evalx(dst, fmt)
67 68
 
68 69
         5. RPC Commands
69 70
 
... ...
@@ -84,25 +85,26 @@ Daniel-Constantin Mierla
84 85
    1.10. xavp_copy usage
85 86
    1.11. xavp_params_explode usage
86 87
    1.12. xavp_params_implode usage
87
-   1.13. xavp_child_seti usage
88
-   1.14. xavi_child_seti usage
89
-   1.15. xavp_child_sets usage
90
-   1.16. xavi_child_sets usage
91
-   1.17. xavp_rm usage
92
-   1.18. xavi_rm usage
93
-   1.19. xavp_child_rm usage
94
-   1.20. xavi_child_rm usage
95
-   1.21. sbranch_set_ruri() usage
96
-   1.22. sbranch_append() usage
88
+   1.13. xavp_slist_explode usage
89
+   1.14. xavp_child_seti usage
90
+   1.15. xavi_child_seti usage
91
+   1.16. xavp_child_sets usage
92
+   1.17. xavi_child_sets usage
93
+   1.18. xavp_rm usage
94
+   1.19. xavi_rm usage
95
+   1.20. xavp_child_rm usage
96
+   1.21. xavi_child_rm usage
97
+   1.22. sbranch_set_ruri() usage
97 98
    1.23. sbranch_append() usage
98
-   1.24. pv_xavp_print() usage
99
-   1.25. pv_xavu_print() usage
100
-   1.26. pv_xavi_print() usage
101
-   1.27. pv_var_to_xavp() usage
102
-   1.28. pv_xavp_to_var() usage
99
+   1.24. sbranch_append() usage
100
+   1.25. pv_xavp_print() usage
101
+   1.26. pv_xavu_print() usage
102
+   1.27. pv_xavi_print() usage
103
+   1.28. pv_var_to_xavp() usage
103 104
    1.29. pv_xavp_to_var() usage
104
-   1.30. pv.shvSet usage
105
-   1.31. pv.shvGet usage
105
+   1.30. pv_xavp_to_var() usage
106
+   1.31. pv.shvSet usage
107
+   1.32. pv.shvGet usage
106 108
 
107 109
 Chapter 1. Admin Guide
108 110
 
... ...
@@ -133,23 +135,24 @@ Chapter 1. Admin Guide
133 135
 
134 136
         4.8. xavp_params_explode(sparams, xname)
135 137
         4.9. xavp_params_implode(xname, pvname)
136
-        4.10. xavp_child_seti(rname, cname, ival)
137
-        4.11. xavi_child_seti(rname, cname, ival)
138
-        4.12. xavp_child_sets(rname, cname, sval)
139
-        4.13. xavi_child_sets(rname, cname, sval)
140
-        4.14. xavp_rm(rname)
141
-        4.15. xavi_rm(rname)
142
-        4.16. xavp_child_rm(rname, cname)
143
-        4.17. xavi_child_rm(rname, cname)
144
-        4.18. sbranch_set_ruri()
145
-        4.19. sbranch_append()
146
-        4.20. sbranch_reset()
147
-        4.21. pv_xavp_print()
148
-        4.22. pv_xavu_print()
149
-        4.23. pv_xavi_print()
150
-        4.24. pv_var_to_xavp(varname, xname)
151
-        4.25. pv_xavp_to_var(xname)
152
-        4.26. pv_evalx(dst, fmt)
138
+        4.10. xavp_slist_explode(slist, sep, mode, xname)
139
+        4.11. xavp_child_seti(rname, cname, ival)
140
+        4.12. xavi_child_seti(rname, cname, ival)
141
+        4.13. xavp_child_sets(rname, cname, sval)
142
+        4.14. xavi_child_sets(rname, cname, sval)
143
+        4.15. xavp_rm(rname)
144
+        4.16. xavi_rm(rname)
145
+        4.17. xavp_child_rm(rname, cname)
146
+        4.18. xavi_child_rm(rname, cname)
147
+        4.19. sbranch_set_ruri()
148
+        4.20. sbranch_append()
149
+        4.21. sbranch_reset()
150
+        4.22. pv_xavp_print()
151
+        4.23. pv_xavu_print()
152
+        4.24. pv_xavi_print()
153
+        4.25. pv_var_to_xavp(varname, xname)
154
+        4.26. pv_xavp_to_var(xname)
155
+        4.27. pv_evalx(dst, fmt)
153 156
 
154 157
    5. RPC Commands
155 158
 
... ...
@@ -250,23 +253,24 @@ modparam("pv","avp_aliases","email=s:email_addr;tmp=i:100")
250 253
 
251 254
    4.8. xavp_params_explode(sparams, xname)
252 255
    4.9. xavp_params_implode(xname, pvname)
253
-   4.10. xavp_child_seti(rname, cname, ival)
254
-   4.11. xavi_child_seti(rname, cname, ival)
255
-   4.12. xavp_child_sets(rname, cname, sval)
256
-   4.13. xavi_child_sets(rname, cname, sval)
257
-   4.14. xavp_rm(rname)
258
-   4.15. xavi_rm(rname)
259
-   4.16. xavp_child_rm(rname, cname)
260
-   4.17. xavi_child_rm(rname, cname)
261
-   4.18. sbranch_set_ruri()
262
-   4.19. sbranch_append()
263
-   4.20. sbranch_reset()
264
-   4.21. pv_xavp_print()
265
-   4.22. pv_xavu_print()
266
-   4.23. pv_xavi_print()
267
-   4.24. pv_var_to_xavp(varname, xname)
268
-   4.25. pv_xavp_to_var(xname)
269
-   4.26. pv_evalx(dst, fmt)
256
+   4.10. xavp_slist_explode(slist, sep, mode, xname)
257
+   4.11. xavp_child_seti(rname, cname, ival)
258
+   4.12. xavi_child_seti(rname, cname, ival)
259
+   4.13. xavp_child_sets(rname, cname, sval)
260
+   4.14. xavi_child_sets(rname, cname, sval)
261
+   4.15. xavp_rm(rname)
262
+   4.16. xavi_rm(rname)
263
+   4.17. xavp_child_rm(rname, cname)
264
+   4.18. xavi_child_rm(rname, cname)
265
+   4.19. sbranch_set_ruri()
266
+   4.20. sbranch_append()
267
+   4.21. sbranch_reset()
268
+   4.22. pv_xavp_print()
269
+   4.23. pv_xavu_print()
270
+   4.24. pv_xavi_print()
271
+   4.25. pv_var_to_xavp(varname, xname)
272
+   4.26. pv_xavp_to_var(xname)
273
+   4.27. pv_evalx(dst, fmt)
270 274
 
271 275
 4.1. pv_isset(pvar)
272 276
 
... ...
@@ -457,7 +461,37 @@ xavp_params_implode("x", "$var(out)");
457 461
 # results in: $var(out) is "a=b;c=d;e=f;"
458 462
 ...
459 463
 
460
-4.10.  xavp_child_seti(rname, cname, ival)
464
+4.10.  xavp_slist_explode(slist, sep, mode, xname)
465
+
466
+   Breaks a string list in tokens by separators and stores them in XAVPs.
467
+   Note that is not storing empty values.
468
+
469
+   The first parameter has to be a string (static or with variables).
470
+
471
+   The second parameter has to contain separator characters (they can be
472
+   many).
473
+
474
+   The third parameter is mode, controlling the behaviour of extracting
475
+   the tokens, the supported mode right now is 't', which trims the white
476
+   spaces around the value.
477
+
478
+   The fourth parameter is the name of the xavp to hold the tokens.
479
+
480
+   The values are stored as string type.
481
+
482
+   Function can be used from ANY ROUTE.
483
+
484
+   Example 1.13. xavp_slist_explode usage
485
+...
486
+xavp_slist_explode("a=b; c=d;", "=;", "t", "x");
487
+# results in:
488
+#    $xavp(x[0]) = "a";
489
+#    $xavp(x[1]) = "b";
490
+#    $xavp(x[2]) = "c";
491
+#    $xavp(x[3]) = "d";
492
+...
493
+
494
+4.11.  xavp_child_seti(rname, cname, ival)
461 495
 
462 496
    Set the value of $xavp(rname=>cname) to integer value ival.
463 497
 
... ...
@@ -467,14 +501,14 @@ xavp_params_implode("x", "$var(out)");
467 501
 
468 502
    Function can be used from ANY ROUTE.
469 503
 
470
-   Example 1.13. xavp_child_seti usage
504
+   Example 1.14. xavp_child_seti usage
471 505
 ...
472 506
 $var(n) = 10;
473 507
 xavp_child_seti("x", "y", "$var(n)");
474 508
 # results in: $xavp(x=>y) is 10
475 509
 ...
476 510
 
477
-4.11.  xavi_child_seti(rname, cname, ival)
511
+4.12.  xavi_child_seti(rname, cname, ival)
478 512
 
479 513
    Set the value of $xavi(rname=>cname) to integer value ival.
480 514
 
... ...
@@ -484,14 +518,14 @@ xavp_child_seti("x", "y", "$var(n)");
484 518
 
485 519
    Function can be used from ANY ROUTE.
486 520
 
487
-   Example 1.14. xavi_child_seti usage
521
+   Example 1.15. xavi_child_seti usage
488 522
 ...
489 523
 $var(n) = 10;
490 524
 xavi_child_seti("WhatEver", "FoO", "$var(n)");
491 525
 # results in: $xavi(whatever=>foo) is 10
492 526
 ...
493 527
 
494
-4.12.  xavp_child_sets(rname, cname, sval)
528
+4.13.  xavp_child_sets(rname, cname, sval)
495 529
 
496 530
    Set the value of $xavp(rname=>cname) to string value sval.
497 531
 
... ...
@@ -501,14 +535,14 @@ xavi_child_seti("WhatEver", "FoO", "$var(n)");
501 535
 
502 536
    Function can be used from ANY ROUTE.
503 537
 
504
-   Example 1.15. xavp_child_sets usage
538
+   Example 1.16. xavp_child_sets usage
505 539
 ...
506 540
 $var(n) = 10;
507 541
 xavp_child_sets("x", "y", "Count: $var(n)");
508 542
 # results in: $xavp(x=>y) is "Count: 10"
509 543
 ...
510 544
 
511
-4.13.  xavi_child_sets(rname, cname, sval)
545
+4.14.  xavi_child_sets(rname, cname, sval)
512 546
 
513 547
    Set the value of $xavi(rname=>cname) to string value sval.
514 548
 
... ...
@@ -518,14 +552,14 @@ xavp_child_sets("x", "y", "Count: $var(n)");
518 552
 
519 553
    Function can be used from ANY ROUTE.
520 554
 
521
-   Example 1.16. xavi_child_sets usage
555
+   Example 1.17. xavi_child_sets usage
522 556
 ...
523 557
 $var(n) = 10;
524 558
 xavi_child_sets("WhatEver", "FoO", "Count: $var(n)");
525 559
 # results in: $xavi(whatever=>foo) is "Count: 10"
526 560
 ...
527 561
 
528
-4.14.  xavp_rm(rname)
562
+4.15.  xavp_rm(rname)
529 563
 
530 564
    Remove the value of $xavp(rname).
531 565
 
... ...
@@ -534,13 +568,13 @@ xavi_child_sets("WhatEver", "FoO", "Count: $var(n)");
534 568
 
535 569
    Function can be used from ANY ROUTE.
536 570
 
537
-   Example 1.17. xavp_rm usage
571
+   Example 1.18. xavp_rm usage
538 572
 ...
539 573
 xavp_rm("x");
540 574
 # same result as: $xavp(x) = $null;
541 575
 ...
542 576
 
543
-4.15.  xavi_rm(rname)
577
+4.16.  xavi_rm(rname)
544 578
 
545 579
    Remove the value of $xavi(rname).
546 580
 
... ...
@@ -549,13 +583,13 @@ xavp_rm("x");
549 583
 
550 584
    Function can be used from ANY ROUTE.
551 585
 
552
-   Example 1.18. xavi_rm usage
586
+   Example 1.19. xavi_rm usage
553 587
 ...
554 588
 xavi_rm("WhatEver");
555 589
 # same result as: $xavi(whatever) = $null;
556 590
 ...
557 591
 
558
-4.16.  xavp_child_rm(rname, cname)
592
+4.17.  xavp_child_rm(rname, cname)
559 593
 
560 594
    Remove the value of $xavp(rname=>cname).
561 595
 
... ...
@@ -565,13 +599,13 @@ xavi_rm("WhatEver");
565 599
 
566 600
    Function can be used from ANY ROUTE.
567 601
 
568
-   Example 1.19. xavp_child_rm usage
602
+   Example 1.20. xavp_child_rm usage
569 603
 ...
570 604
 xavp_child_rm("x", "y");
571 605
 # same result as: $xavp(x=>y) = $null;
572 606
 ...
573 607
 
574
-4.17.  xavi_child_rm(rname, cname)
608
+4.18.  xavi_child_rm(rname, cname)
575 609
 
576 610
    Remove the value of $xavi(rname=>cname).
577 611
 
... ...
@@ -581,13 +615,13 @@ xavp_child_rm("x", "y");
581 615
 
582 616
    Function can be used from ANY ROUTE.
583 617
 
584
-   Example 1.20. xavi_child_rm usage
618
+   Example 1.21. xavi_child_rm usage
585 619
 ...
586 620
 xavi_child_rm("WhatEver", "FoO");
587 621
 # same result as: $xavi(whatever=>foo) = $null;
588 622
 ...
589 623
 
590
-4.18.  sbranch_set_ruri()
624
+4.19.  sbranch_set_ruri()
591 625
 
592 626
    Use the attributes from static branch ($sbranch(key) variable) to set
593 627
    request URI and the other fields of the branch associated with request
... ...
@@ -598,7 +632,7 @@ xavi_child_rm("WhatEver", "FoO");
598 632
 
599 633
    Function can be used from REQUEST_ROUTE, BRANCH_ROUTE or FAILURE_ROUTE.
600 634
 
601
-   Example 1.21. sbranch_set_ruri() usage
635
+   Example 1.22. sbranch_set_ruri() usage
602 636
 ...
603 637
 sbranch_reset();
604 638
 $sbranch(uri) = "sip:127.0.0.1:5080";
... ...
@@ -608,7 +642,7 @@ $sbranch(send_socket) =  "udp:127.0.0.1:5060";
608 642
 sbranch_set_ruri();
609 643
 ...
610 644
 
611
-4.19.  sbranch_append()
645
+4.20.  sbranch_append()
612 646
 
613 647
    Use the attributes from static branch ($sbranch(key) variable) to
614 648
    append a new branch to destination set. It is an alternative to
... ...
@@ -620,7 +654,7 @@ sbranch_set_ruri();
620 654
 
621 655
    Function can be used from REQUEST_ROUTE, BRANCH_ROUTE or FAILURE_ROUTE.
622 656
 
623
-   Example 1.22. sbranch_append() usage
657
+   Example 1.23. sbranch_append() usage
624 658
 ...
625 659
 sbranch_reset();
626 660
 $sbranch(uri) = "sip:127.0.0.1:5080";
... ...
@@ -629,51 +663,51 @@ $sbranch(send_socket) =  "udp:127.0.0.1:5060";
629 663
 sbranch_append();
630 664
 ...
631 665
 
632
-4.20.  sbranch_reset()
666
+4.21.  sbranch_reset()
633 667
 
634 668
    Reset the content of static branch ($sbranch(key) variable.
635 669
 
636 670
    Function can be used from REQUEST_ROUTE, BRANCH_ROUTE or FAILURE_ROUTE.
637 671
 
638
-   Example 1.23. sbranch_append() usage
672
+   Example 1.24. sbranch_append() usage
639 673
 ...
640 674
 sbranch_reset();
641 675
 ...
642 676
 
643
-4.21.  pv_xavp_print()
677
+4.22.  pv_xavp_print()
644 678
 
645 679
    Print all XAVPs to the syslog using INFO log level.
646 680
 
647 681
    Function can be used from ANY_ROUTE.
648 682
 
649
-   Example 1.24. pv_xavp_print() usage
683
+   Example 1.25. pv_xavp_print() usage
650 684
 ...
651 685
 pv_xavp_print();
652 686
 ...
653 687
 
654
-4.22.  pv_xavu_print()
688
+4.23.  pv_xavu_print()
655 689
 
656 690
    Print all XAVUs to the syslog using INFO log level.
657 691
 
658 692
    Function can be used from ANY_ROUTE.
659 693
 
660
-   Example 1.25. pv_xavu_print() usage
694
+   Example 1.26. pv_xavu_print() usage
661 695
 ...
662 696
 pv_xavu_print();
663 697
 ...
664 698
 
665
-4.23.  pv_xavi_print()
699
+4.24.  pv_xavi_print()
666 700
 
667 701
    Print all XAVIs to the syslog using INFO log level.
668 702
 
669 703
    Function can be used from ANY_ROUTE.
670 704
 
671
-   Example 1.26. pv_xavi_print() usage
705
+   Example 1.27. pv_xavi_print() usage
672 706
 ...
673 707
 pv_xavi_print();
674 708
 ...
675 709
 
676
-4.24.  pv_var_to_xavp(varname, xname)
710
+4.25.  pv_var_to_xavp(varname, xname)
677 711
 
678 712
    Copy the script variable value into an xavp.
679 713
 
... ...
@@ -685,7 +719,7 @@ pv_xavi_print();
685 719
 
686 720
    Function can be used from ANY_ROUTE.
687 721
 
688
-   Example 1.27. pv_var_to_xavp() usage
722
+   Example 1.28. pv_var_to_xavp() usage
689 723
 ...
690 724
 $var("temp") = 3;
691 725
 $var("foo") = "foo indeed";
... ...
@@ -699,7 +733,7 @@ $xavp("ok[0]=>temp") now is 3
699 733
 $xavp("ok[0]=>foo") now is "foo indeed"
700 734
 ...
701 735
 
702
-4.25.  pv_xavp_to_var(xname)
736
+4.26.  pv_xavp_to_var(xname)
703 737
 
704 738
    Copy xavp values into vars. Reverse of pv_var_to_xavp().
705 739
 
... ...
@@ -707,7 +741,7 @@ $xavp("ok[0]=>foo") now is "foo indeed"
707 741
 
708 742
    Function can be used from ANY_ROUTE.
709 743
 
710
-   Example 1.28. pv_xavp_to_var() usage
744
+   Example 1.29. pv_xavp_to_var() usage
711 745
 ...
712 746
 $xavp("bar=>temp") = 3;
713 747
 $xavp("bar[0]=>foo") = "foo indeed";
... ...
@@ -717,7 +751,7 @@ $var("temp") now is 3
717 751
 $var("foo") now is "foo indeed"
718 752
 ...
719 753
 
720
-4.26.  pv_evalx(dst, fmt)
754
+4.27.  pv_evalx(dst, fmt)
721 755
 
722 756
    The fmt string is evaluated twice for exiting variables, the result is
723 757
    stored in dst variable. The dst must be the name of a writable
... ...
@@ -726,7 +760,7 @@ $var("foo") now is "foo indeed"
726 760
 
727 761
    Function can be used from ANY_ROUTE.
728 762
 
729
-   Example 1.29. pv_xavp_to_var() usage
763
+   Example 1.30. pv_xavp_to_var() usage
730 764
 ...
731 765
 $var(x) = "test";
732 766
 $var(y) = "$var(x)"
... ...
@@ -751,7 +785,7 @@ pv_evalx("$var(z)", "$var(y) one");
751 785
           + “str”: string value
752 786
      * _value_: value to be set
753 787
 
754
-   Example 1.30. pv.shvSet usage
788
+   Example 1.31. pv.shvSet usage
755 789
 ...
756 790
 $ kamcmd pv.shvSet debug int 3
757 791
 ...
... ...
@@ -765,7 +799,7 @@ $ kamcmd pv.shvSet debug int 3
765 799
 
766 800
    If no name is given, all shared variables are listed.
767 801
 
768
-   Example 1.31. pv.shvGet usage
802
+   Example 1.32. pv.shvGet usage
769 803
 ...
770 804
 $ kamcmd pv.shvGet debug
771 805
 ...