Browse code

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

Kamailio Dev authored on 29/06/2020 06:01:13
Showing 1 changed files
... ...
@@ -497,9 +497,9 @@ modparam("dispatcher", "force_dst", 1)
497 497
    Default value is “0”.
498 498
 
499 499
    Example 1.10. Set the “flags” parameter
500
- ...
501
- modparam("dispatcher", "flags", 3)
502
- ...
500
+...
501
+modparam("dispatcher", "flags", 3)
502
+...
503 503
 
504 504
 3.11. use_default (int)
505 505
 
... ...
@@ -511,9 +511,9 @@ modparam("dispatcher", "force_dst", 1)
511 511
    Default value is “0”.
512 512
 
513 513
    Example 1.11. Set the “use_default” parameter
514
- ...
515
- modparam("dispatcher", "use_default", 1)
516
- ...
514
+...
515
+modparam("dispatcher", "use_default", 1)
516
+...
517 517
 
518 518
 3.12. xavp_dst (str)
519 519
 
... ...
@@ -534,9 +534,9 @@ Note
534 534
    Default value is “_dsdst_”.
535 535
 
536 536
    Example 1.12. Set the “xavp_dst” parameter
537
- ...
538
- modparam("dispatcher", "xavp_dst", "_dsdst_")
539
- ...
537
+...
538
+modparam("dispatcher", "xavp_dst", "_dsdst_")
539
+...
540 540
 
541 541
 3.13. xavp_dst_mode (int)
542 542
 
... ...
@@ -574,9 +574,9 @@ Note
574 574
    Default value is “_dsctx_”.
575 575
 
576 576
    Example 1.14. Set the “xavp_ctx” parameter
577
- ...
578
- modparam("dispatcher", "xavp_ctx", "_dsctx_")
579
- ...
577
+...
578
+modparam("dispatcher", "xavp_ctx", "_dsctx_")
579
+...
580 580
 
581 581
 3.15. xavp_ctx_mode (int)
582 582
 
... ...
@@ -587,9 +587,9 @@ Note
587 587
    Default value is “0” (add all fields).
588 588
 
589 589
    Example 1.15. Set the “xavp_ctx_mode” parameter
590
- ...
591
- modparam("dispatcher", "xavp_ctx_mode", 1)
592
- ...
590
+...
591
+modparam("dispatcher", "xavp_ctx_mode", 1)
592
+...
593 593
 
594 594
 3.16. hash_pvar (str)
595 595
 
... ...
@@ -603,14 +603,14 @@ Note
603 603
    Default value is “null” - disabled.
604 604
 
605 605
    Example 1.16. Use $avp(hash) for hashing:
606
- ...
607
- modparam("dispatcher", "hash_pvar", "$avp(hash)")
608
- ...
606
+...
607
+modparam("dispatcher", "hash_pvar", "$avp(hash)")
608
+...
609 609
 
610 610
    Example 1.17. Use combination of PVs for hashing:
611
- ...
612
- modparam("dispatcher", "hash_pvar", "hash the $fU@$ci")
613
- ...
611
+...
612
+modparam("dispatcher", "hash_pvar", "hash the $fU@$ci")
613
+...
614 614
 
615 615
 3.17. setid_pvname (str)
616 616
 
... ...
@@ -620,9 +620,9 @@ Note
620 620
    Default value is “null” - don't set PV.
621 621
 
622 622
    Example 1.18. Set the “setid_pvname” parameter
623
- ...
624
- modparam("dispatcher", "setid_pvname", "$var(setid)")
625
- ...
623
+...
624
+modparam("dispatcher", "setid_pvname", "$var(setid)")
625
+...
626 626
 
627 627
 3.18. attrs_pvname (str)
628 628
 
... ...
@@ -632,9 +632,9 @@ Note
632 632
    Default value is “null” - don't set PV.
633 633
 
634 634
    Example 1.19. Set the “attrs_pvname” parameter
635
- ...
636
- modparam("dispatcher", "attrs_pvname", "$var(attrs)")
637
- ...
635
+...
636
+modparam("dispatcher", "attrs_pvname", "$var(attrs)")
637
+...
638 638
 
639 639
 3.19. ds_ping_method (string)
640 640
 
... ...
@@ -645,9 +645,9 @@ Note
645 645
    Default value is “OPTIONS”.
646 646
 
647 647
    Example 1.20. Set the “ds_ping_method” parameter
648
- ...
649
- modparam("dispatcher", "ds_ping_method", "INFO")
650
- ...
648
+...
649
+modparam("dispatcher", "ds_ping_method", "INFO")
650
+...
651 651
 
652 652
 3.20. ds_ping_from (string)
653 653
 
... ...
@@ -658,9 +658,9 @@ Note
658 658
    Default value is “sip:dispatcher@localhost”.
659 659
 
660 660
    Example 1.21. Set the “ds_ping_from” parameter
661
- ...
662
- modparam("dispatcher", "ds_ping_from", "sip:proxy@sip.somehost.com")
663
- ...
661
+...
662
+modparam("dispatcher", "ds_ping_from", "sip:proxy@sip.somehost.com")
663
+...
664 664
 
665 665
 3.21. ds_ping_interval (int)
666 666
 
... ...
@@ -672,9 +672,9 @@ Note
672 672
    Default value is “0”.
673 673
 
674 674
    Example 1.22. Set the “ds_ping_interval” parameter
675
- ...
676
- modparam("dispatcher", "ds_ping_interval", 30)
677
- ...
675
+...
676
+modparam("dispatcher", "ds_ping_interval", 30)
677
+...
678 678
 
679 679
 3.22. ds_probing_threshold (int)
680 680
 
... ...
@@ -688,9 +688,9 @@ Note
688 688
    Default value is “1” (set inactive with first failure).
689 689
 
690 690
    Example 1.23. Set the “ds_probing_threshold” parameter
691
- ...
692
- modparam("dispatcher", "ds_probing_threshold", 10)
693
- ...
691
+...
692
+modparam("dispatcher", "ds_probing_threshold", 10)
693
+...
694 694
 
695 695
 3.23. ds_inactive_threshold (int)
696 696
 
... ...
@@ -703,9 +703,9 @@ Note
703 703
    Default value is “1” (set active with first success).
704 704
 
705 705
    Example 1.24. Set the “ds_inactive_threshold” parameter
706
- ...
707
- modparam("dispatcher", "ds_inactive_threshold", 10)
708
- ...
706
+...
707
+modparam("dispatcher", "ds_inactive_threshold", 10)
708
+...
709 709
 
710 710
 3.24. ds_ping_reply_codes (string)
711 711
 
... ...
@@ -727,10 +727,10 @@ Note
727 727
    Default value is “” (only 200 OK is accepted).
728 728
 
729 729
    Example 1.25. Set the “ds_ping_reply_codes” parameter
730
- ...
731
- modparam("dispatcher", "ds_ping_reply_codes", "class=2;code=403;code=488;class=
732
-3")
733
- ...
730
+...
731
+modparam("dispatcher", "ds_ping_reply_codes", "class=2;code=403;code=488;class=3
732
+")
733
+...
734 734
 
735 735
 3.25. ds_probing_mode (int)
736 736
 
... ...
@@ -756,9 +756,9 @@ Note
756 756
    Default value is “0”.
757 757
 
758 758
    Example 1.26. Set the “ds_probing_mode” parameter
759
- ...
760
- modparam("dispatcher", "ds_probing_mode", 1)
761
- ...
759
+...
760
+modparam("dispatcher", "ds_probing_mode", 1)
761
+...
762 762
 
763 763
 3.26. ds_ping_latency_stats (int)
764 764
 
... ...
@@ -771,7 +771,7 @@ Note
771 771
    Example 1.27. accessing the metrics
772 772
 # using the command :
773 773
 kamcmd dispatcher.list
774
- ...
774
+...
775 775
 DEST: {
776 776
         URI: sip:1.2.3.4
777 777
         FLAGS: AX
... ...
@@ -785,12 +785,12 @@ estimator_alpha
785 785
                 TIMEOUT: 0     # count of ping timeouts
786 786
         }
787 787
 }
788
- ...
788
+...
789 789
 
790 790
    Example 1.28. Set the “ds_ping_latency_stats” parameter
791
- ...
792
- modparam("dispatcher", "ds_ping_latency_stats", 1)
793
- ...
791
+...
792
+modparam("dispatcher", "ds_ping_latency_stats", 1)
793
+...
794 794
 
795 795
 3.27. ds_latency_estimator_alpha (int)
796 796
 
... ...
@@ -805,9 +805,9 @@ estimator_alpha
805 805
    Default value is “900 => 0.9”.
806 806
 
807 807
    Example 1.29. Set the “ds_hash_size” parameter
808
- ...
809
- modparam("dispatcher", "ds_latency_estimator_alpha", 900)
810
- ...
808
+...
809
+modparam("dispatcher", "ds_latency_estimator_alpha", 900)
810
+...
811 811
 
812 812
 3.28. ds_hash_size (int)
813 813
 
... ...
@@ -819,9 +819,9 @@ estimator_alpha
819 819
    Default value is “0”.
820 820
 
821 821
    Example 1.30. Set the “ds_hash_size” parameter
822
- ...
823
- modparam("dispatcher", "ds_hash_size", 9)
824
- ...
822
+...
823
+modparam("dispatcher", "ds_hash_size", 9)
824
+...
825 825
 
826 826
 3.29. ds_hash_expire (int)
827 827
 
... ...
@@ -831,9 +831,9 @@ estimator_alpha
831 831
    Default value is “7200”.
832 832
 
833 833
    Example 1.31. Set the “ds_hash_expire” parameter
834
- ...
835
- modparam("dispatcher", "ds_hash_expire", 3600)
836
- ...
834
+...
835
+modparam("dispatcher", "ds_hash_expire", 3600)
836
+...
837 837
 
838 838
 3.30. ds_hash_initexpire (int)
839 839
 
... ...
@@ -844,9 +844,9 @@ estimator_alpha
844 844
    Default value is “7200”.
845 845
 
846 846
    Example 1.32. Set the “ds_hash_initexpire” parameter
847
- ...
848
- modparam("dispatcher", "ds_hash_initexpire", 60)
849
- ...
847
+...
848
+modparam("dispatcher", "ds_hash_initexpire", 60)
849
+...
850 850
 
851 851
 3.31. ds_hash_check_interval (int)
852 852
 
... ...
@@ -856,9 +856,9 @@ estimator_alpha
856 856
    Default value is “30”.
857 857
 
858 858
    Example 1.33. Set the “ds_hash_check_interval” parameter
859
- ...
860
- modparam("dispatcher", "ds_hash_check_interval", 60)
861
- ...
859
+...
860
+modparam("dispatcher", "ds_hash_check_interval", 60)
861
+...
862 862
 
863 863
 3.32. outbound_proxy (str)
864 864
 
... ...
@@ -867,9 +867,9 @@ estimator_alpha
867 867
    By default no outbound proxy is defined.
868 868
 
869 869
    Example 1.34. Set the “outbound_proxy” parameter
870
- ...
871
- modparam("dispatcher", "outbound_proxy", "sip:outbound.example.com")
872
- ...
870
+...
871
+modparam("dispatcher", "outbound_proxy", "sip:outbound.example.com")
872
+...
873 873
 
874 874
 3.33. ds_default_socket (str)
875 875
 
... ...
@@ -883,9 +883,9 @@ estimator_alpha
883 883
    ignored.
884 884
 
885 885
    Example 1.35. Set the “ds_default_socket” parameter
886
- ...
887
- modparam("dispatcher", "ds_default_socket", "udp:192.168.0.125:5060")
888
- ...
886
+...
887
+modparam("dispatcher", "ds_default_socket", "udp:192.168.0.125:5060")
888
+...
889 889
 
890 890
 3.34. ds_default_sockname (str)
891 891
 
... ...
@@ -899,11 +899,11 @@ estimator_alpha
899 899
    (this parameter has higher priority).
900 900
 
901 901
    Example 1.36. Set the “ds_default_sockname” parameter
902
- ...
902
+...
903 903
  listen=udp:1.2.3.4:5060 name "sock1"
904
- ...
905
- modparam("dispatcher", "ds_default_sockname", "sock1")
906
- ...
904
+...
905
+modparam("dispatcher", "ds_default_sockname", "sock1")
906
+...
907 907
 
908 908
 3.35. ds_timer_mode (int)
909 909
 
... ...
@@ -921,9 +921,9 @@ estimator_alpha
921 921
    Default value is “0”.
922 922
 
923 923
    Example 1.37. Set the “ds_timer_mode” parameter
924
- ...
925
- modparam("dispatcher", "ds_timer_mode", 1)
926
- ...
924
+...
925
+modparam("dispatcher", "ds_timer_mode", 1)
926
+...
927 927
 
928 928
 3.36. event_callback (str)
929 929
 
... ...
@@ -956,9 +956,9 @@ end
956 956
    Default value is “0”.
957 957
 
958 958
    Example 1.39. Set the “ds_attrs_none” parameter
959
- ...
960
- modparam("dispatcher", "ds_attrs_none", 1)
961
- ...
959
+...
960
+modparam("dispatcher", "ds_attrs_none", 1)
961
+...
962 962
 
963 963
 3.38. ds_db_extra_attrs (str)
964 964
 
... ...
@@ -986,9 +986,9 @@ modparam("dispatcher", "ds_db_extra_attrs", "socket=socket;pref=prefix")
986 986
    Default value is “0”.
987 987
 
988 988
    Example 1.41. Set the “ds_load_mode” parameter
989
- ...
990
- modparam("dispatcher", "ds_load_mode", 1)
991
- ...
989
+...
990
+modparam("dispatcher", "ds_load_mode", 1)
991
+...
992 992
 
993 993
 3.40. reload_delta (int)
994 994
 
... ...
@@ -1510,13 +1510,13 @@ kamcmd dispatcher.set_duid_state ip 2 xyz
1510 1510
 
1511 1511
    Example:
1512 1512
                 kamcmd dispatcher.list
1513
- ...
1513
+...
1514 1514
 DEST: {
1515 1515
         URI: sip:192.168.0.1:5060
1516 1516
         FLAGS: AP
1517 1517
         PRIORITY: 12
1518 1518
 }
1519
- ...
1519
+...
1520 1520
 
1521 1521
    FLAGS consist out of 2 letters. First letter describe status of
1522 1522
    destination: A-active, I – inactive, T – trying, D – disabled.
... ...
@@ -1673,15 +1673,15 @@ kamctl rpc dispatcher.hash 4 bob server.com
1673 1673
    There are some predefined names:
1674 1674
      * 'duid' - used for call load dispatching. It must be an unique value
1675 1675
        to identify a destination (gateway address). Practically the load
1676
-       within the group is associated with this value.
1676
+       within the group is associated with this value.>
1677 1677
      * 'maxload' - used for call load dispatching. It must be a positive
1678 1678
        integer, defining the upper limit of active calls per destination.
1679 1679
        When the limit is reached, then the gateway is no longer selected
1680 1680
        for new calls until an exiting call via that gateway is terminated.
1681
-       If set to 0, then no active call limit is used.
1681
+       If set to 0, then no active call limit is used.>
1682 1682
      * 'weight' - used for weight based load distribution. It must be set
1683 1683
        to a positive integer value beteen 0 and 100. The value represents
1684
-       the percent of calls to be sent to that gateways.
1684
+       the percent of calls to be sent to that gateways.>
1685 1685
      * 'rweight' - used for relative weight based load distribution. It
1686 1686
        must be set to a positive integer value between 1 and 100
1687 1687
        (otherwise host will be excluded from relative weight distribution
... ...
@@ -1951,39 +1951,42 @@ route[REQINIT] {
1951 1951
 
1952 1952
 # Handle requests within SIP dialogs
1953 1953
 route[WITHINDLG] {
1954
-        if (has_totag()) {
1955
-                # sequential request withing a dialog should
1956
-                # take the path determined by record-routing
1957
-                if (loose_route()) {
1958
-                        if (is_method("BYE")) {
1959
-                                setflag(FLT_ACC); # do accounting ...
1960
-                                setflag(FLT_ACCFAILED); # ... even if the transa
1961
-ction fails
1962
-                        }
1963
-                        route(RELAY);
1954
+        if (!has_totag()) {
1955
+                return;
1956
+        }
1957
+
1958
+        # sequential request withing a dialog should
1959
+        # take the path determined by record-routing
1960
+        if (loose_route()) {
1961
+                if (is_method("BYE")) {
1962
+                        setflag(FLT_ACC); # do accounting ...
1963
+                        setflag(FLT_ACCFAILED); # ... even if the transaction fa
1964
+ils
1965
+                }
1966
+                route(RELAY);
1967
+        }
1968
+
1969
+        if (is_method("SUBSCRIBE") && uri == myself) {
1970
+                # in-dialog subscribe requests
1971
+                route(PRESENCE);
1972
+        }
1973
+
1974
+        if ( is_method("ACK") ) {
1975
+                if ( t_check_trans() ) {
1976
+                        # non loose-route, but stateful ACK;
1977
+                        # must be ACK after a 487 or e.g. 404 from upstream serv
1978
+er
1979
+                        t_relay();
1980
+                        exit;
1964 1981
                 } else {
1965
-                        if (is_method("SUBSCRIBE") && uri == myself) {
1966
-                                # in-dialog subscribe requests
1967
-                                route(PRESENCE);
1968
-                                exit;
1969
-                        }
1970
-                        if ( is_method("ACK") ) {
1971
-                                if ( t_check_trans() ) {
1972
-                                        # non loose-route, but stateful ACK;
1973
-                                        # must be ACK after a 487 or e.g. 404 fr
1974
-om upstream server
1975
-                                        t_relay();
1976
-                                        exit;
1977
-                                } else {
1978
-                                        # ACK without matching transaction ... i
1979
-gnore and discard.
1980
-                                        exit;
1981
-                                }
1982
-                        }
1983
-                        sl_send_reply("404","Not here");
1982
+                        # ACK without matching transaction ... ignore and discar
1983
+d.
1984
+                        exit;
1984 1985
                 }
1985
-                exit;
1986 1986
         }
1987
+
1988
+        sl_send_reply("404","Not here");
1989
+        exit;
1987 1990
 }
1988 1991
 
1989 1992
 # Handle SIP registrations