Browse code

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

Kamailio Dev authored on 24/06/2022 06:16:15
Showing 1 changed files
... ...
@@ -32,7 +32,8 @@ Julien Klingenmeyer
32 32
 
33 33
    Copyright © 2006 Voice Sistem SRL
34 34
 
35
-   Copyright © 2011 Carsten Bock, http://www.ng-voice.com
35
+   Copyright © 2011, 2022 ng-voice GmbH, Carsten Bock,
36
+   http://www.ng-voice.com
36 37
      __________________________________________________________________
37 38
 
38 39
    Table of Contents
... ...
@@ -113,6 +114,8 @@ Julien Klingenmeyer
113 114
               6.61. h_id_start (int)
114 115
               6.62. h_id_step (int)
115 116
               6.63. keep_proxy_rr (string)
117
+              6.64. bye_early_code (int)
118
+              6.65. bye_early_reason (string)
116 119
 
117 120
         7. Functions
118 121
 
... ...
@@ -139,6 +142,8 @@ Julien Klingenmeyer
139 142
               7.21. dlg_db_load_callid(cival)
140 143
               7.22. dlg_db_load_extra()
141 144
               7.23. dlg_reset_property(attr)
145
+              7.24. dlg_req_within(side, method, [headers], [content_type,
146
+                      content])
142 147
 
143 148
         8. Statistics
144 149
 
... ...
@@ -257,29 +262,32 @@ Julien Klingenmeyer
257 262
    1.61. Set h_id_start parameter
258 263
    1.62. Set h_id_step parameter
259 264
    1.63. Set dlg_keep_proxy_rr parameter
260
-   1.64. set_dlg_profile usage
261
-   1.65. unset_dlg_profile usage
262
-   1.66. is_in_profile usage
263
-   1.67. get_profile_size usage
264
-   1.68. dlg_isflagset usage
265
-   1.69. dlg_setflag usage
266
-   1.70. dlg_resetflag usage
267
-   1.71. dlg_bye usage
268
-   1.72. dlg_refer usage
269
-   1.73. dlg_manage usage
270
-   1.74. dlg_bridge usage
271
-   1.75. dlg_get usage
272
-   1.76. dlg_get_var usage
273
-   1.77. dlg_set_var usage
274
-   1.78. is_known_dlg() usage
275
-   1.79. dlg_set_timeout usage
276
-   1.80. dlg_set_timeout_by_profile usage
277
-   1.81. dlg_set_property usage
278
-   1.82. dlg_remote_profile usage
279
-   1.83. dlg_set_ruri() usage
280
-   1.84. dlg_db_load_callid() usage
281
-   1.85. dlg_db_load_extra() usage
282
-   1.86. dlg_reset_property usage
265
+   1.64. Set bye_early_code parameter
266
+   1.65. Set bye_early_reason parameter
267
+   1.66. set_dlg_profile usage
268
+   1.67. unset_dlg_profile usage
269
+   1.68. is_in_profile usage
270
+   1.69. get_profile_size usage
271
+   1.70. dlg_isflagset usage
272
+   1.71. dlg_setflag usage
273
+   1.72. dlg_resetflag usage
274
+   1.73. dlg_bye usage
275
+   1.74. dlg_refer usage
276
+   1.75. dlg_manage usage
277
+   1.76. dlg_bridge usage
278
+   1.77. dlg_get usage
279
+   1.78. dlg_get_var usage
280
+   1.79. dlg_set_var usage
281
+   1.80. is_known_dlg() usage
282
+   1.81. dlg_set_timeout usage
283
+   1.82. dlg_set_timeout_by_profile usage
284
+   1.83. dlg_set_property usage
285
+   1.84. dlg_remote_profile usage
286
+   1.85. dlg_set_ruri() usage
287
+   1.86. dlg_db_load_callid() usage
288
+   1.87. dlg_db_load_extra() usage
289
+   1.88. dlg_reset_property usage
290
+   1.89. dlg_req_within usage
283 291
 
284 292
 Chapter 1. Admin Guide
285 293
 
... ...
@@ -359,6 +367,8 @@ Chapter 1. Admin Guide
359 367
         6.61. h_id_start (int)
360 368
         6.62. h_id_step (int)
361 369
         6.63. keep_proxy_rr (string)
370
+        6.64. bye_early_code (int)
371
+        6.65. bye_early_reason (string)
362 372
 
363 373
    7. Functions
364 374
 
... ...
@@ -385,6 +395,8 @@ Chapter 1. Admin Guide
385 395
         7.21. dlg_db_load_callid(cival)
386 396
         7.22. dlg_db_load_extra()
387 397
         7.23. dlg_reset_property(attr)
398
+        7.24. dlg_req_within(side, method, [headers], [content_type,
399
+                content])
388 400
 
389 401
    8. Statistics
390 402
 
... ...
@@ -593,6 +605,8 @@ Chapter 1. Admin Guide
593 605
    6.61. h_id_start (int)
594 606
    6.62. h_id_step (int)
595 607
    6.63. keep_proxy_rr (string)
608
+   6.64. bye_early_code (int)
609
+   6.65. bye_early_reason (string)
596 610
 
597 611
 6.1. enable_stats (integer)
598 612
 
... ...
@@ -1460,6 +1474,28 @@ modparam("dialog", "h_id_step", 10)
1460 1474
 modparam("dialog", "keep_proxy_rr", 1)
1461 1475
 ...
1462 1476
 
1477
+6.64. bye_early_code (int)
1478
+
1479
+   This parameter defines the reply-code being used for dialogs being
1480
+   terminated in early stage (e.g. before 200 OK/ACK).
1481
+   Default value is “480”.
1482
+
1483
+   Example 1.64. Set bye_early_code parameter
1484
+...
1485
+modparam("dialog", "bye_early_code", 503)
1486
+...
1487
+
1488
+6.65. bye_early_reason (string)
1489
+
1490
+   This parameter defines the reply-reason being used for dialogs being
1491
+   terminated in early stage (e.g. before 200 OK/ACK).
1492
+   Default value is “Temporarily Unavailable”.
1493
+
1494
+   Example 1.65. Set bye_early_reason parameter
1495
+...
1496
+modparam("dialog", "bye_early_reason", "Call terminated")
1497
+...
1498
+
1463 1499
 7. Functions
1464 1500
 
1465 1501
    7.1. set_dlg_profile(profile,[value])
... ...
@@ -1485,6 +1521,7 @@ modparam("dialog", "keep_proxy_rr", 1)
1485 1521
    7.21. dlg_db_load_callid(cival)
1486 1522
    7.22. dlg_db_load_extra()
1487 1523
    7.23. dlg_reset_property(attr)
1524
+   7.24. dlg_req_within(side, method, [headers], [content_type, content])
1488 1525
 
1489 1526
 7.1.  set_dlg_profile(profile,[value])
1490 1527
 
... ...
@@ -1502,7 +1539,7 @@ modparam("dialog", "keep_proxy_rr", 1)
1502 1539
    This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, REPLY_ROUTE
1503 1540
    and FAILURE_ROUTE.
1504 1541
 
1505
-   Example 1.64. set_dlg_profile usage
1542
+   Example 1.66. set_dlg_profile usage
1506 1543
 ...
1507 1544
 set_dlg_profile("inbound_call");
1508 1545
 set_dlg_profile("caller","$fu");
... ...
@@ -1521,7 +1558,7 @@ set_dlg_profile("caller","$fu");
1521 1558
    This function can be used from BRANCH_ROUTE, REPLY_ROUTE and
1522 1559
    FAILURE_ROUTE.
1523 1560
 
1524
-   Example 1.65. unset_dlg_profile usage
1561
+   Example 1.67. unset_dlg_profile usage
1525 1562
 ...
1526 1563
 unset_dlg_profile("inbound_call");
1527 1564
 unset_dlg_profile("caller","$fu");
... ...
@@ -1544,7 +1581,7 @@ unset_dlg_profile("caller","$fu");
1544 1581
    This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, REPLY_ROUTE
1545 1582
    and FAILURE_ROUTE.
1546 1583
 
1547
-   Example 1.66. is_in_profile usage
1584
+   Example 1.68. is_in_profile usage
1548 1585
 ...
1549 1586
 if (is_in_profile("inbound_call")) {
1550 1587
         log("this request belongs to a inbound call\n");
... ...
@@ -1574,7 +1611,7 @@ if (is_in_profile("caller","XX")) {
1574 1611
    This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, REPLY_ROUTE
1575 1612
    and FAILURE_ROUTE.
1576 1613
 
1577
-   Example 1.67. get_profile_size usage
1614
+   Example 1.69. get_profile_size usage
1578 1615
 ...
1579 1616
 if(get_profile_size("inbound_call","$avp(size)"))
1580 1617
     xlog("currently there are $avp(size) inbound calls\n");
... ...
@@ -1593,7 +1630,7 @@ if(get_profile_size("caller","$fu","$avp(size)"))
1593 1630
    This function can be used from BRANCH_ROUTE, REQUEST_ROUTE,
1594 1631
    ONREPLY_ROUTE and FAILURE_ROUTE.
1595 1632
 
1596
-   Example 1.68. dlg_isflagset usage
1633
+   Example 1.70. dlg_isflagset usage
1597 1634
 ...
1598 1635
 if(dlg_isflagset("1"))
1599 1636
 {
... ...
@@ -1611,7 +1648,7 @@ if(dlg_isflagset("1"))
1611 1648
    This function can be used from BRANCH_ROUTE, REQUEST_ROUTE,
1612 1649
    ONREPLY_ROUTE and FAILURE_ROUTE.
1613 1650
 
1614
-   Example 1.69. dlg_setflag usage
1651
+   Example 1.71. dlg_setflag usage
1615 1652
 ...
1616 1653
 dlg_setflag("1");
1617 1654
 ...
... ...
@@ -1626,14 +1663,16 @@ dlg_setflag("1");
1626 1663
    This function can be used from BRANCH_ROUTE, REQUEST_ROUTE,
1627 1664
    ONREPLY_ROUTE and FAILURE_ROUTE.
1628 1665
 
1629
-   Example 1.70. dlg_resetflag usage
1666
+   Example 1.72. dlg_resetflag usage
1630 1667
 ...
1631 1668
 redlg_setflag("1");
1632 1669
 ...
1633 1670
 
1634 1671
 7.8.  dlg_bye(side)
1635 1672
 
1636
-   Send BYE to both parties of a dialog.
1673
+   Send BYE to parties of a dialog or - if in early stage - a CANCEL to
1674
+   the B-Party and a SIP response to the A-Party (as defined in
1675
+   bye_early_code / bye_early_reason).
1637 1676
 
1638 1677
    Meaning of the parameters is as follows:
1639 1678
      * side - where to send the BYE. It can be: 'caller', 'callee', or
... ...
@@ -1641,7 +1680,7 @@ redlg_setflag("1");
1641 1680
 
1642 1681
    This function can be used from ANY_ROUTE.
1643 1682
 
1644
-   Example 1.71. dlg_bye usage
1683
+   Example 1.73. dlg_bye usage
1645 1684
 ...
1646 1685
 dlg_bye("all");
1647 1686
 ...
... ...
@@ -1658,7 +1697,7 @@ dlg_bye("all");
1658 1697
    This function can be used from BRANCH_ROUTE, REQUEST_ROUTE,
1659 1698
    ONREPLY_ROUTE and FAILURE_ROUTE.
1660 1699
 
1661
-   Example 1.72. dlg_refer usage
1700
+   Example 1.74. dlg_refer usage
1662 1701
 ...
1663 1702
 dlg_refer("caller", "sip:announcement@kamailio.org");
1664 1703
 ...
... ...
@@ -1671,7 +1710,7 @@ dlg_refer("caller", "sip:announcement@kamailio.org");
1671 1710
 
1672 1711
    This function can be used from REQUEST_ROUTE.
1673 1712
 
1674
-   Example 1.73. dlg_manage usage
1713
+   Example 1.75. dlg_manage usage
1675 1714
 ...
1676 1715
 modparam("dialog", "default_timeout", 100)
1677 1716
 ...
... ...
@@ -1699,7 +1738,7 @@ request_route {
1699 1738
    This function can be used from BRANCH_ROUTE, REQUEST_ROUTE,
1700 1739
    ONREPLY_ROUTE and FAILURE_ROUTE.
1701 1740
 
1702
-   Example 1.74. dlg_bridge usage
1741
+   Example 1.76. dlg_bridge usage
1703 1742
 ...
1704 1743
 dlg_bridge("sip:user@kamailio.org", "sip:annoucement@kamailio.org",
1705 1744
    "sip:kamailio.org:5080");
... ...
@@ -1719,7 +1758,7 @@ dlg_bridge("sip:user@kamailio.org", "sip:annoucement@kamailio.org",
1719 1758
    This function can be used from BRANCH_ROUTE, REQUEST_ROUTE,
1720 1759
    ONREPLY_ROUTE and FAILURE_ROUTE.
1721 1760
 
1722
-   Example 1.75. dlg_get usage
1761
+   Example 1.77. dlg_get usage
1723 1762
 ...
1724 1763
 if(dlg_get("abcdef", "123", "456"))
1725 1764
 {
... ...
@@ -1742,7 +1781,7 @@ if(dlg_get("abcdef", "123", "456"))
1742 1781
    This function can be used from BRANCH_ROUTE, REQUEST_ROUTE,
1743 1782
    ONREPLY_ROUTE and FAILURE_ROUTE.
1744 1783
 
1745
-   Example 1.76. dlg_get_var usage
1784
+   Example 1.78. dlg_get_var usage
1746 1785
 ...
1747 1786
 if(dlg_get_var("$var(ci)", "$var(ft)", "456", "test", "$var(tmp)"))
1748 1787
 {
... ...
@@ -1765,7 +1804,7 @@ if(dlg_get_var("$var(ci)", "$var(ft)", "456", "test", "$var(tmp)"))
1765 1804
    This function can be used from BRANCH_ROUTE, REQUEST_ROUTE,
1766 1805
    ONREPLY_ROUTE and FAILURE_ROUTE.
1767 1806
 
1768
-   Example 1.77. dlg_set_var usage
1807
+   Example 1.79. dlg_set_var usage
1769 1808
 ...
1770 1809
 if(dlg_set_var("$var(ci)", "$var(ft)", "456", "test", "$var(tmp)"))
1771 1810
 {
... ...
@@ -1789,7 +1828,7 @@ if(dlg_set_var("$var(ci)", "$var(ft)", "456", "test", "$var(tmp)"))
1789 1828
    This function can be used from REQUEST_ROUTE, BRANCH_ROUTE, REPLY_ROUTE
1790 1829
    and FAILURE_ROUTE.
1791 1830
 
1792
-   Example 1.78. is_known_dlg() usage
1831
+   Example 1.80. is_known_dlg() usage
1793 1832
 ...
1794 1833
 if(!uri == myself) {
1795 1834
         if(is_known_dlg()) {
... ...
@@ -1813,7 +1852,7 @@ if(!uri == myself) {
1813 1852
 
1814 1853
    This function can be used from ANY_ROUTE.
1815 1854
 
1816
-   Example 1.79. dlg_set_timeout usage
1855
+   Example 1.81. dlg_set_timeout usage
1817 1856
 ...
1818 1857
 if(dlg_set_timeout("180", "123", "456"))
1819 1858
 {
... ...
@@ -1835,7 +1874,7 @@ if(dlg_set_timeout("180", "123", "456"))
1835 1874
 
1836 1875
    This function can be used from ANY_ROUTE.
1837 1876
 
1838
-   Example 1.80. dlg_set_timeout_by_profile usage
1877
+   Example 1.82. dlg_set_timeout_by_profile usage
1839 1878
 ...
1840 1879
 # All dialogs belonging to user abc123 (tracked via set_dlg_profile())
1841 1880
 # will be timed out in 3 seconds.
... ...
@@ -1867,7 +1906,7 @@ dlg_set_timeout_by_profile("users", "abc123", "3");
1867 1906
 
1868 1907
    This function can be used from ANY_ROUTE.
1869 1908
 
1870
-   Example 1.81. dlg_set_property usage
1909
+   Example 1.83. dlg_set_property usage
1871 1910
 ...
1872 1911
 dlg_set_property("ka-src");
1873 1912
 dlg_set_property("ka-dst");
... ...
@@ -1895,7 +1934,7 @@ dlg_set_property("timeout-noreset");
1895 1934
 
1896 1935
    This function can be used from ANY_ROUTE.
1897 1936
 
1898
-   Example 1.82. dlg_remote_profile usage
1937
+   Example 1.84. dlg_remote_profile usage
1899 1938
 ...
1900 1939
 $var(exp) = 3600 + $Ts;
1901 1940
 dlg_remote_profile("add", "caller", "test", "$sruid", "$var(exp)");
... ...
@@ -1908,7 +1947,7 @@ dlg_remote_profile("add", "caller", "test", "$sruid", "$var(exp)");
1908 1947
 
1909 1948
    This function can be used from ANY_ROUTE.
1910 1949
 
1911
-   Example 1.83. dlg_set_ruri() usage
1950
+   Example 1.85. dlg_set_ruri() usage
1912 1951
 ...
1913 1952
 if(has_totag() and is_present_hf("Route") and uri==myself ) {
1914 1953
         if(dlg_set_ruri()) {
... ...
@@ -1924,7 +1963,7 @@ if(has_totag() and is_present_hf("Route") and uri==myself ) {
1924 1963
 
1925 1964
    This function can be used from ANY_ROUTE.
1926 1965
 
1927
-   Example 1.84. dlg_db_load_callid() usage
1966
+   Example 1.86. dlg_db_load_callid() usage
1928 1967
 ...
1929 1968
 if(has_totag()) {
1930 1969
     if(!is_known_dlg()) {
... ...
@@ -1943,7 +1982,7 @@ if(has_totag()) {
1943 1982
 
1944 1983
    This function can be used from ANY_ROUTE.
1945 1984
 
1946
-   Example 1.85. dlg_db_load_extra() usage
1985
+   Example 1.87. dlg_db_load_extra() usage
1947 1986
 ...
1948 1987
 if(has_totag()) {
1949 1988
     if(!is_known_dlg()) {
... ...
@@ -1969,13 +2008,46 @@ if(has_totag()) {
1969 2008
 
1970 2009
    This function can be used from ANY_ROUTE.
1971 2010
 
1972
-   Example 1.86. dlg_reset_property usage
2011
+   Example 1.88. dlg_reset_property usage
1973 2012
 ...
1974 2013
 dlg_reset_property("ka-src");
1975 2014
 dlg_reset_property("ka-dst");
1976 2015
 dlg_reset_property("timeout-noreset");
1977 2016
 ...
1978 2017
 
2018
+7.24.  dlg_req_within(side, method, [headers], [content_type, content])
2019
+
2020
+   Sends a in-dialog SIP Request with method to a party of a dialog
2021
+   indicated by the side parameter.
2022
+
2023
+   Meaning of the parameters is as follows:
2024
+     * side - where to send the request. It can be: 'caller', 'callee', or
2025
+       'all' (send to both sides).
2026
+     * method - Method of the request
2027
+     * headers (optional) - additional headers to be added to the request.
2028
+     * content_type (optional) - Content-Type of the request body - will
2029
+       be added as Content-Type Header.
2030
+     * content (optional) - Content to be sent as body.
2031
+
2032
+   This function can be used from ANY_ROUTE.
2033
+
2034
+   Example 1.89. dlg_req_within usage
2035
+...
2036
+        # Send a simple request:
2037
+        dlg_req_within("all", "OPTIONS");
2038
+...
2039
+        # Send a simple request with extra headers:
2040
+        dlg_req_within("caller", "OPTIONS", "X-Info: Bandwidth granted\r\nX-Info
2041
+-2: Go ahead\r\n");
2042
+...
2043
+        # Send a simple request with body:
2044
+        dlg_req_within("caller", "UPDATE", "application/sdp", "...some SDP...");
2045
+...
2046
+        # Send a simple request with extra headers and body:
2047
+        dlg_req_within("callee", "INFO", "X-Info: Bandwidth granted\r\n", "appli
2048
+cation/sdp", "...some SDP...");
2049
+...
2050
+
1979 2051
 8. Statistics
1980 2052
 
1981 2053
    8.1. active_dialogs