浏览代码

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

Kamailio Dev 7 年之前
父节点
当前提交
af6c8088d5
共有 1 个文件被更改,包括 69 次插入44 次删除
  1. 69 44
      src/modules/pv/README

+ 69 - 44
src/modules/pv/README

@@ -42,13 +42,14 @@ Daniel-Constantin Mierla
               4.4. typeof(pvar, vtype)
               4.4. typeof(pvar, vtype)
               4.5. not_empty(pvar)
               4.5. not_empty(pvar)
               4.6. xavp_params_explode(sparams, xname)
               4.6. xavp_params_explode(sparams, xname)
-              4.7. sbranch_set_ruri()
-              4.8. sbranch_append()
-              4.9. sbranch_reset()
-              4.10. pv_xavp_print()
-              4.11. pv_var_to_xavp(varname, xname)
-              4.12. pv_xavp_to_var(xname)
-              4.13. pv_evalx(dst, fmt)
+              4.7. xavp_params_implode(xname, pvname)
+              4.8. sbranch_set_ruri()
+              4.9. sbranch_append()
+              4.10. sbranch_reset()
+              4.11. pv_xavp_print()
+              4.12. pv_var_to_xavp(varname, xname)
+              4.13. pv_xavp_to_var(xname)
+              4.14. pv_evalx(dst, fmt)
 
 
         5. RPC Commands
         5. RPC Commands
 
 
@@ -66,15 +67,16 @@ Daniel-Constantin Mierla
    1.7. typeof() usage
    1.7. typeof() usage
    1.8. not_empty() usage
    1.8. not_empty() usage
    1.9. xavp_params_explode usage
    1.9. xavp_params_explode usage
-   1.10. sbranch_set_ruri() usage
-   1.11. sbranch_append() usage
+   1.10. xavp_params_implode usage
+   1.11. sbranch_set_ruri() usage
    1.12. sbranch_append() usage
    1.12. sbranch_append() usage
-   1.13. pv_xavp_print() usage
-   1.14. pv_var_to_xavp() usage
-   1.15. pv_xavp_to_var() usage
+   1.13. sbranch_append() usage
+   1.14. pv_xavp_print() usage
+   1.15. pv_var_to_xavp() usage
    1.16. pv_xavp_to_var() usage
    1.16. pv_xavp_to_var() usage
-   1.17. pv.shvSet usage
-   1.18. pv.shvGet usage
+   1.17. pv_xavp_to_var() usage
+   1.18. pv.shvSet usage
+   1.19. pv.shvGet usage
 
 
 Chapter 1. Admin Guide
 Chapter 1. Admin Guide
 
 
@@ -100,13 +102,14 @@ Chapter 1. Admin Guide
         4.4. typeof(pvar, vtype)
         4.4. typeof(pvar, vtype)
         4.5. not_empty(pvar)
         4.5. not_empty(pvar)
         4.6. xavp_params_explode(sparams, xname)
         4.6. xavp_params_explode(sparams, xname)
-        4.7. sbranch_set_ruri()
-        4.8. sbranch_append()
-        4.9. sbranch_reset()
-        4.10. pv_xavp_print()
-        4.11. pv_var_to_xavp(varname, xname)
-        4.12. pv_xavp_to_var(xname)
-        4.13. pv_evalx(dst, fmt)
+        4.7. xavp_params_implode(xname, pvname)
+        4.8. sbranch_set_ruri()
+        4.9. sbranch_append()
+        4.10. sbranch_reset()
+        4.11. pv_xavp_print()
+        4.12. pv_var_to_xavp(varname, xname)
+        4.13. pv_xavp_to_var(xname)
+        4.14. pv_evalx(dst, fmt)
 
 
    5. RPC Commands
    5. RPC Commands
 
 
@@ -202,13 +205,14 @@ modparam("pv","avp_aliases","email=s:email_addr;tmp=i:100")
    4.4. typeof(pvar, vtype)
    4.4. typeof(pvar, vtype)
    4.5. not_empty(pvar)
    4.5. not_empty(pvar)
    4.6. xavp_params_explode(sparams, xname)
    4.6. xavp_params_explode(sparams, xname)
-   4.7. sbranch_set_ruri()
-   4.8. sbranch_append()
-   4.9. sbranch_reset()
-   4.10. pv_xavp_print()
-   4.11. pv_var_to_xavp(varname, xname)
-   4.12. pv_xavp_to_var(xname)
-   4.13. pv_evalx(dst, fmt)
+   4.7. xavp_params_implode(xname, pvname)
+   4.8. sbranch_set_ruri()
+   4.9. sbranch_append()
+   4.10. sbranch_reset()
+   4.11. pv_xavp_print()
+   4.12. pv_var_to_xavp(varname, xname)
+   4.13. pv_xavp_to_var(xname)
+   4.14. pv_evalx(dst, fmt)
 
 
 4.1. pv_isset(pvar)
 4.1. pv_isset(pvar)
 
 
@@ -305,7 +309,28 @@ xavp_params_explode("a=b;c=d;e=d", "x");
 #    $xavp(x=>e) = "f";
 #    $xavp(x=>e) = "f";
 ...
 ...
 
 
-4.7.  sbranch_set_ruri()
+4.7.  xavp_params_implode(xname, pvname)
+
+   Serialize the subfields in an XAVP to a parameters string format.
+
+   The first parameter has to be the name of XAVP (only the string name,
+   not the in $xavp(name)). The second parameter is the name of output
+   variable (in full name, like $var(output)).
+
+   The value is stored as string type.
+
+   Function can be used from ANY ROUTE.
+
+   Example 1.10. xavp_params_implode usage
+...
+$xavp(x=>e) = "f";
+$xavp(x[0]=>c) = "d";
+$xavp(x[0]=>a) = "b";
+xavp_params_implode("x", "$var(out)");
+# results in: $var(out) is "a=b;c=d;e=f;"
+...
+
+4.8.  sbranch_set_ruri()
 
 
    Use the attributes from static branch ($sbranch(key) variable) to set
    Use the attributes from static branch ($sbranch(key) variable) to set
    request URI and the other fields of the branch associated with request
    request URI and the other fields of the branch associated with request
@@ -316,7 +341,7 @@ xavp_params_explode("a=b;c=d;e=d", "x");
 
 
    Function can be used from REQUEST_ROUTE, BRANCH_ROUTE or FAILURE_ROUTE.
    Function can be used from REQUEST_ROUTE, BRANCH_ROUTE or FAILURE_ROUTE.
 
 
-   Example 1.10. sbranch_set_ruri() usage
+   Example 1.11. sbranch_set_ruri() usage
 ...
 ...
 sbranch_reset();
 sbranch_reset();
 $sbranch(uri) = "sip:127.0.0.1:5080";
 $sbranch(uri) = "sip:127.0.0.1:5080";
@@ -326,7 +351,7 @@ $sbranch(send_socket) =  "udp:127.0.0.1:5060";
 sbranch_set_ruri();
 sbranch_set_ruri();
 ...
 ...
 
 
-4.8.  sbranch_append()
+4.9.  sbranch_append()
 
 
    Use the attributes from static branch ($sbranch(key) variable) to
    Use the attributes from static branch ($sbranch(key) variable) to
    append a new branch to destination set. It is an alternative to
    append a new branch to destination set. It is an alternative to
@@ -338,7 +363,7 @@ sbranch_set_ruri();
 
 
    Function can be used from REQUEST_ROUTE, BRANCH_ROUTE or FAILURE_ROUTE.
    Function can be used from REQUEST_ROUTE, BRANCH_ROUTE or FAILURE_ROUTE.
 
 
-   Example 1.11. sbranch_append() usage
+   Example 1.12. sbranch_append() usage
 ...
 ...
 sbranch_reset();
 sbranch_reset();
 $sbranch(uri) = "sip:127.0.0.1:5080";
 $sbranch(uri) = "sip:127.0.0.1:5080";
@@ -347,29 +372,29 @@ $sbranch(send_socket) =  "udp:127.0.0.1:5060";
 sbranch_append();
 sbranch_append();
 ...
 ...
 
 
-4.9.  sbranch_reset()
+4.10.  sbranch_reset()
 
 
    Reset the content of static branch ($sbranch(key) variable.
    Reset the content of static branch ($sbranch(key) variable.
 
 
    Function can be used from REQUEST_ROUTE, BRANCH_ROUTE or FAILURE_ROUTE.
    Function can be used from REQUEST_ROUTE, BRANCH_ROUTE or FAILURE_ROUTE.
 
 
-   Example 1.12. sbranch_append() usage
+   Example 1.13. sbranch_append() usage
 ...
 ...
 sbranch_reset();
 sbranch_reset();
 ...
 ...
 
 
-4.10.  pv_xavp_print()
+4.11.  pv_xavp_print()
 
 
    Print all XAVPs to the syslog using INFO log level.
    Print all XAVPs to the syslog using INFO log level.
 
 
    Function can be used from ANY_ROUTE.
    Function can be used from ANY_ROUTE.
 
 
-   Example 1.13. pv_xavp_print() usage
+   Example 1.14. pv_xavp_print() usage
 ...
 ...
 pv_xavp_print();
 pv_xavp_print();
 ...
 ...
 
 
-4.11.  pv_var_to_xavp(varname, xname)
+4.12.  pv_var_to_xavp(varname, xname)
 
 
    Copy the script variable value into an xavp.
    Copy the script variable value into an xavp.
 
 
@@ -381,7 +406,7 @@ pv_xavp_print();
 
 
    Function can be used from ANY_ROUTE.
    Function can be used from ANY_ROUTE.
 
 
-   Example 1.14. pv_var_to_xavp() usage
+   Example 1.15. pv_var_to_xavp() usage
 ...
 ...
 $var("temp") = 3;
 $var("temp") = 3;
 $var("foo") = "foo indeed";
 $var("foo") = "foo indeed";
@@ -395,7 +420,7 @@ $xavp("ok[0]=>temp") now is 3
 $xavp("ok[0]=>foo") now is "foo indeed"
 $xavp("ok[0]=>foo") now is "foo indeed"
 ...
 ...
 
 
-4.12.  pv_xavp_to_var(xname)
+4.13.  pv_xavp_to_var(xname)
 
 
    Copy xavp values into vars. Reverse of pv_var_to_xavp().
    Copy xavp values into vars. Reverse of pv_var_to_xavp().
 
 
@@ -403,7 +428,7 @@ $xavp("ok[0]=>foo") now is "foo indeed"
 
 
    Function can be used from ANY_ROUTE.
    Function can be used from ANY_ROUTE.
 
 
-   Example 1.15. pv_xavp_to_var() usage
+   Example 1.16. pv_xavp_to_var() usage
 ...
 ...
 $xavp("bar=>temp") = 3;
 $xavp("bar=>temp") = 3;
 $xavp("bar[0]=>foo") = "foo indeed";
 $xavp("bar[0]=>foo") = "foo indeed";
@@ -413,7 +438,7 @@ $var("temp") now is 3
 $var("foo") now is "foo indeed"
 $var("foo") now is "foo indeed"
 ...
 ...
 
 
-4.13.  pv_evalx(dst, fmt)
+4.14.  pv_evalx(dst, fmt)
 
 
    The fmt string is evaluated twice for exiting variables, the result is
    The fmt string is evaluated twice for exiting variables, the result is
    stored in dst variable. The dst must be the name of a writable
    stored in dst variable. The dst must be the name of a writable
@@ -422,7 +447,7 @@ $var("foo") now is "foo indeed"
 
 
    Function can be used from ANY_ROUTE.
    Function can be used from ANY_ROUTE.
 
 
-   Example 1.16. pv_xavp_to_var() usage
+   Example 1.17. pv_xavp_to_var() usage
 ...
 ...
 $var(x) = "test";
 $var(x) = "test";
 $var(y) = "$var(x)"
 $var(y) = "$var(x)"
@@ -447,7 +472,7 @@ pv_evalx("$var(z)", "$var(y) one");
           + “str”: string value
           + “str”: string value
      * _value_: value to be set
      * _value_: value to be set
 
 
-   Example 1.17. pv.shvSet usage
+   Example 1.18. pv.shvSet usage
 ...
 ...
 $ kamcmd pv.shvSet debug int 3
 $ kamcmd pv.shvSet debug int 3
 ...
 ...
@@ -461,7 +486,7 @@ $ kamcmd pv.shvSet debug int 3
 
 
    If no name is given, all shared variables are listed.
    If no name is given, all shared variables are listed.
 
 
-   Example 1.18. pv.shvGet usage
+   Example 1.19. pv.shvGet usage
 ...
 ...
 $ kamcmd pv.shvGet debug
 $ kamcmd pv.shvGet debug
 ...
 ...