Просмотр исходного кода

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

Kamailio Dev 5 лет назад
Родитель
Сommit
5ea7ca4d64
1 измененных файлов с 97 добавлено и 74 удалено
  1. 97 74
      src/modules/textopsx/README

+ 97 - 74
src/modules/textopsx/README

@@ -21,18 +21,19 @@ Daniel-Constantin Mierla
 
               2.1. msg_apply_changes()
               2.2. change_reply_status(code, reason)
-              2.3. remove_body()
-              2.4. keep_hf([regexp])
-              2.5. fnmatch(value, expr [, flags])
-              2.6. append_hf_value(hf, hvalue)
-              2.7. insert_hf_value(hf, hvalue)
-              2.8. remove_hf_value(hf_par)
-              2.9. remove_hf_value2(hf_par)
-              2.10. assign_hf_value(hf, hvalue)
-              2.11. assign_hf_value2(hf, hvalue)
-              2.12. include_hf_value(hf, hvalue)
-              2.13. exclude_hf_value(hf, hvalue)
-              2.14. hf_value_exists(hf, hvalue)
+              2.3. change_reply_status_code(vcode)
+              2.4. remove_body()
+              2.5. keep_hf([regexp])
+              2.6. fnmatch(value, expr [, flags])
+              2.7. append_hf_value(hf, hvalue)
+              2.8. insert_hf_value(hf, hvalue)
+              2.9. remove_hf_value(hf_par)
+              2.10. remove_hf_value2(hf_par)
+              2.11. assign_hf_value(hf, hvalue)
+              2.12. assign_hf_value2(hf, hvalue)
+              2.13. include_hf_value(hf, hvalue)
+              2.14. exclude_hf_value(hf, hvalue)
+              2.15. hf_value_exists(hf, hvalue)
 
         3. Selects
 
@@ -44,19 +45,20 @@ Daniel-Constantin Mierla
 
    1.1. msg_apply_changes() usage
    1.2. change_reply_status usage
-   1.3. remove_body() usage
-   1.4. keep_hf() usage
-   1.5. fnmatch() usage
-   1.6. append_hf_value usage
-   1.7. insert_hf_value usage
-   1.8. remove_hf_value usage
-   1.9. remove_hf_value2 usage
-   1.10. assign_hf_value usage
-   1.11. assign_hf_value2 usage
-   1.12. include_hf_value usage
-   1.13. exclude_hf_value usage
-   1.14. hf_value_exists usage
-   1.15. @hf_value select usage
+   1.3. change_reply_status_code usage
+   1.4. remove_body() usage
+   1.5. keep_hf() usage
+   1.6. fnmatch() usage
+   1.7. append_hf_value usage
+   1.8. insert_hf_value usage
+   1.9. remove_hf_value usage
+   1.10. remove_hf_value2 usage
+   1.11. assign_hf_value usage
+   1.12. assign_hf_value2 usage
+   1.13. include_hf_value usage
+   1.14. exclude_hf_value usage
+   1.15. hf_value_exists usage
+   1.16. @hf_value select usage
 
 Chapter 1. Admin Guide
 
@@ -67,18 +69,19 @@ Chapter 1. Admin Guide
 
         2.1. msg_apply_changes()
         2.2. change_reply_status(code, reason)
-        2.3. remove_body()
-        2.4. keep_hf([regexp])
-        2.5. fnmatch(value, expr [, flags])
-        2.6. append_hf_value(hf, hvalue)
-        2.7. insert_hf_value(hf, hvalue)
-        2.8. remove_hf_value(hf_par)
-        2.9. remove_hf_value2(hf_par)
-        2.10. assign_hf_value(hf, hvalue)
-        2.11. assign_hf_value2(hf, hvalue)
-        2.12. include_hf_value(hf, hvalue)
-        2.13. exclude_hf_value(hf, hvalue)
-        2.14. hf_value_exists(hf, hvalue)
+        2.3. change_reply_status_code(vcode)
+        2.4. remove_body()
+        2.5. keep_hf([regexp])
+        2.6. fnmatch(value, expr [, flags])
+        2.7. append_hf_value(hf, hvalue)
+        2.8. insert_hf_value(hf, hvalue)
+        2.9. remove_hf_value(hf_par)
+        2.10. remove_hf_value2(hf_par)
+        2.11. assign_hf_value(hf, hvalue)
+        2.12. assign_hf_value2(hf, hvalue)
+        2.13. include_hf_value(hf, hvalue)
+        2.14. exclude_hf_value(hf, hvalue)
+        2.15. hf_value_exists(hf, hvalue)
 
    3. Selects
 
@@ -100,18 +103,19 @@ Chapter 1. Admin Guide
 
    2.1. msg_apply_changes()
    2.2. change_reply_status(code, reason)
-   2.3. remove_body()
-   2.4. keep_hf([regexp])
-   2.5. fnmatch(value, expr [, flags])
-   2.6. append_hf_value(hf, hvalue)
-   2.7. insert_hf_value(hf, hvalue)
-   2.8. remove_hf_value(hf_par)
-   2.9. remove_hf_value2(hf_par)
-   2.10. assign_hf_value(hf, hvalue)
-   2.11. assign_hf_value2(hf, hvalue)
-   2.12. include_hf_value(hf, hvalue)
-   2.13. exclude_hf_value(hf, hvalue)
-   2.14. hf_value_exists(hf, hvalue)
+   2.3. change_reply_status_code(vcode)
+   2.4. remove_body()
+   2.5. keep_hf([regexp])
+   2.6. fnmatch(value, expr [, flags])
+   2.7. append_hf_value(hf, hvalue)
+   2.8. insert_hf_value(hf, hvalue)
+   2.9. remove_hf_value(hf_par)
+   2.10. remove_hf_value2(hf_par)
+   2.11. assign_hf_value(hf, hvalue)
+   2.12. assign_hf_value2(hf, hvalue)
+   2.13. include_hf_value(hf, hvalue)
+   2.14. exclude_hf_value(hf, hvalue)
+   2.15. hf_value_exists(hf, hvalue)
 
 2.1.  msg_apply_changes()
 
@@ -168,18 +172,37 @@ reply_route {
 }
 ...
 
-2.3.  remove_body()
+2.3.  change_reply_status_code(vcode)
+
+   Change the status code for a SIP reply .
+
+   Meaning of the parameters is as follows:
+     * vcode - the new status code.
+
+   This function can be used from ONREPLY_ROUTE.
+
+   Example 1.3. change_reply_status_code usage
+...
+reply_route {
+    if (status == "604") {
+        change_reply_status_code("404");
+        exit;
+    }
+}
+...
+
+2.4.  remove_body()
 
    Use this function to remove the body of SIP requests or replies.
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.3. remove_body() usage
+   Example 1.4. remove_body() usage
 ...
 remove_body();
 ...
 
-2.4.  keep_hf([regexp])
+2.5.  keep_hf([regexp])
 
    Remove headers that don't match the regular expression regexp. Several
    header are ignored always (thus not removed): Via, From, To, Call-ID,
@@ -190,12 +213,12 @@ remove_body();
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.4. keep_hf() usage
+   Example 1.5. keep_hf() usage
 ...
 keep_hf("User-Agent");
 ...
 
-2.5.  fnmatch(value, expr [, flags])
+2.6.  fnmatch(value, expr [, flags])
 
    Match the value against the expr using shell-style pattern for file
    name matching (see man page for C function fnmatch()). It is known to
@@ -206,7 +229,7 @@ keep_hf("User-Agent");
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.5. fnmatch() usage
+   Example 1.6. fnmatch() usage
 ...
 if(fnmatch("$rU", "123*"))
 {
@@ -214,7 +237,7 @@ if(fnmatch("$rU", "123*"))
 }
 ...
 
-2.6.  append_hf_value(hf, hvalue)
+2.7.  append_hf_value(hf, hvalue)
 
    Append new header value after an existing header, if no index acquired
    append at the end of list. Note that a header may consist of comma
@@ -226,7 +249,7 @@ if(fnmatch("$rU", "123*"))
        message.
      * hvalue - Value to be added, config var formatting supported.
 
-   Example 1.6. append_hf_value usage
+   Example 1.7. append_hf_value usage
 ...
 append_hf_value("foo", "gogo;stamp=$Ts")   # add new header
 append_hf_value("foo[1]", "gogo")  # add new value behind first value
@@ -234,7 +257,7 @@ append_hf_value("foo[-1]", "$var(Bar)") # try add value to the last header, if n
 ot exists add new header
 ...
 
-2.7.  insert_hf_value(hf, hvalue)
+2.8.  insert_hf_value(hf, hvalue)
 
    Insert new header value before an existing header, if no index acquired
    insert before first hf header. Note that a header may consist of comma
@@ -247,14 +270,14 @@ ot exists add new header
        message.
      * hvalue - Value to be added, config var formatting supported.
 
-   Example 1.7. insert_hf_value usage
+   Example 1.8. insert_hf_value usage
 ...
 insert_hf_value("foo[2]", "gogo")
 insert_hf_value("foo", "$avp(foo)")   # add new header at the top of list
 insert_hf_value("foo[1]", "gogo") # try add to the first header
 ...
 
-2.8.  remove_hf_value(hf_par)
+2.9.  remove_hf_value(hf_par)
 
    Remove the header value from existing header, Note that a header may
    consist of comma delimited list of values.
@@ -264,7 +287,7 @@ insert_hf_value("foo[1]", "gogo") # try add to the first header
        [. PARAM ] If asterisk is specified as index then all values are
        affected.
 
-   Example 1.8. remove_hf_value usage
+   Example 1.9. remove_hf_value usage
 ...
 remove_hf_value("foo")  # remove foo[1]
 remove_hf_value("foo[*]")  # remove all foo's headers
@@ -273,7 +296,7 @@ remove_hf_value("foo.bar")  # delete parameter
 remove_hf_value("foo[*].bar") # for each foo delete bar parameters
 ...
 
-2.9.  remove_hf_value2(hf_par)
+2.10.  remove_hf_value2(hf_par)
 
    Remove specified header or parameter. It is expected header in
    Authorization format (comma delimiters are not treated as multi-value
@@ -284,7 +307,7 @@ remove_hf_value("foo[*].bar") # for each foo delete bar parameters
        PARAM ] If asterisk is specified as index then all values are
        affected.
 
-   Example 1.9. remove_hf_value2 usage
+   Example 1.10. remove_hf_value2 usage
 ...
 remove_hf_value2("foo")  # remove foo[1]
 remove_hf_value2("foo[*]")  # remove all foo's headers, the same as remove_hf_he
@@ -294,7 +317,7 @@ remove_hf_value2("foo.bar")  # delete parameter
 remove_hf_value2("foo[*].bar") # for each foo delete bar parameters
 ...
 
-2.10.  assign_hf_value(hf, hvalue)
+2.11.  assign_hf_value(hf, hvalue)
 
    Assign value to specified header value / param.
 
@@ -305,7 +328,7 @@ remove_hf_value2("foo[*].bar") # for each foo delete bar parameters
      * hvalue - Value to be assigned, config var formatting supported. If
        value is empty then no equal sign appears in param.
 
-   Example 1.10. assign_hf_value usage
+   Example 1.11. assign_hf_value usage
 ...
 assign_hf_value("foo", "gogo")  # foo[1]
 assign_hf_value("foo[-1]", "gogo")  # foo[last_foo]
@@ -316,7 +339,7 @@ assign_hf_value("foo[*]", "")  # remove all foo's, empty value remains
 assign_hf_value("foo[*].bar", "")  # set empty value (ex. lr)
 ...
 
-2.11.  assign_hf_value2(hf, hvalue)
+2.12.  assign_hf_value2(hf, hvalue)
 
    Assign value to specified header. It is expected header in
    Authorization format (comma delimiters are not treated as multi-value
@@ -329,14 +352,14 @@ assign_hf_value("foo[*].bar", "")  # set empty value (ex. lr)
      * hvalue - Value to be assigned, config var formatting supported. If
        value is empty then no equal sign appears in param.
 
-   Example 1.11. assign_hf_value2 usage
+   Example 1.12. assign_hf_value2 usage
 ...
 assign_hf_value2("Authorization.integrity-protected", "\"yes\"")
 assign_hf_value2("foo[-1]", "gogo")  # foo[last_foo]
 assign_hf_value2("foo[*].bar", "")  # set empty value (ex. lr)
 ...
 
-2.12.  include_hf_value(hf, hvalue)
+2.13.  include_hf_value(hf, hvalue)
 
    Add value in set if not exists, eg. "Supported: path,100rel".
 
@@ -344,12 +367,12 @@ assign_hf_value2("foo[*].bar", "")  # set empty value (ex. lr)
      * hf - Header field name to be affected.
      * hvalue - config var formatting supported.
 
-   Example 1.12. include_hf_value usage
+   Example 1.13. include_hf_value usage
 ...
 include_hf_value("Supported", "path");
 ...
 
-2.13.  exclude_hf_value(hf, hvalue)
+2.14.  exclude_hf_value(hf, hvalue)
 
    Remove value from set if exists, eg. "Supported: path,100rel".
 
@@ -357,12 +380,12 @@ include_hf_value("Supported", "path");
      * hf - Header field name to be affected.
      * hvalue - config formatting supported.
 
-   Example 1.13. exclude_hf_value usage
+   Example 1.14. exclude_hf_value usage
 ...
 exclude_hf_value("Supported", "100rel");
 ...
 
-2.14.  hf_value_exists(hf, hvalue)
+2.15.  hf_value_exists(hf, hvalue)
 
    Check if value exists in set. Alternate select
    @hf_value_exists.HF.VALUE may be used. It returns one or zero.
@@ -372,7 +395,7 @@ exclude_hf_value("Supported", "100rel");
        dashes.
      * hvalue - config var formatting supported.
 
-   Example 1.14. hf_value_exists usage
+   Example 1.15. hf_value_exists usage
 ...
 if (hf_value_exists("Supported", "100rel")) {
 
@@ -418,7 +441,7 @@ if (@hf_value_exists.supported.path == "1") {
      * IDX - Value index, negative value counts from bottom
      * PARAM_NAME - name of parameter
 
-   Example 1.15. @hf_value select usage
+   Example 1.16. @hf_value select usage
 ...
 $a = @hf_value.my_header[1].my_param;
 xplog("L_ERR", "$sel(@hf_value.via[-1]), $sel(@hf_value.from.tag)\n");