Przeglądaj źródła

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

Kamailio Dev 4 lat temu
rodzic
commit
ed0ec29479
1 zmienionych plików z 62 dodań i 11 usunięć
  1. 62 11
      src/modules/lwsc/README

+ 62 - 11
src/modules/lwsc/README

@@ -33,7 +33,9 @@ Daniel-Constantin Mierla
         4. Functions
 
               4.1. lwsc_notify(wsurl, data)
-              4.2. lwsc_request(wsurl, data)
+              4.2. lwsc_notify_proto(wsurl, wsproto, data)
+              4.3. lwsc_request(wsurl, data)
+              4.4. lwsc_request_proto(wsurl, wsproto, data)
 
         5. Variables
 
@@ -46,8 +48,10 @@ Daniel-Constantin Mierla
    1.3. Set timeout_read parameter
    1.4. Set verbosity parameter
    1.5. lwsc_notify usage
-   1.6. lwsc_request usage
-   1.7. $lwsc(name) usage
+   1.6. lwsc_notify_proto usage
+   1.7. lwsc_request usage
+   1.8. lwsc_request_proto usage
+   1.9. $lwsc(name) usage
 
 Chapter 1. Admin Guide
 
@@ -69,7 +73,9 @@ Chapter 1. Admin Guide
    4. Functions
 
         4.1. lwsc_notify(wsurl, data)
-        4.2. lwsc_request(wsurl, data)
+        4.2. lwsc_notify_proto(wsurl, wsproto, data)
+        4.3. lwsc_request(wsurl, data)
+        4.4. lwsc_request_proto(wsurl, wsproto, data)
 
    5. Variables
 
@@ -133,7 +139,7 @@ modparam("lwsc", "timeout_init", 4000000)
 3.3. timeout_read (int)
 
    The interval in microseconds to wait for the response of the
-   lwsc_request() function.
+   lwsc_request() group of functions.
 
    Default value is 2000000 (2 seconds).
 
@@ -158,12 +164,15 @@ modparam("lwsc", "verbosity", 1)
 4. Functions
 
    4.1. lwsc_notify(wsurl, data)
-   4.2. lwsc_request(wsurl, data)
+   4.2. lwsc_notify_proto(wsurl, wsproto, data)
+   4.3. lwsc_request(wsurl, data)
+   4.4. lwsc_request_proto(wsurl, wsproto, data)
 
 4.1.  lwsc_notify(wsurl, data)
 
-   Send data via websockets to the address specified by wsurl, no response
-   is expected.
+   Send data via websockets to the address specified by wsurl. No response
+   is expected. Transmission is not guaranteed (e.g., cannot connect to
+   target).
 
    The parameters are:
      * wsurl - websocket url
@@ -179,7 +188,28 @@ modparam("lwsc", "verbosity", 1)
         "caller=$fU;callee=$tU;callid=$ci");
 ...
 
-4.2.  lwsc_request(wsurl, data)
+4.2.  lwsc_notify_proto(wsurl, wsproto, data)
+
+   Send data via websockets to the address specified by wsurl, providing
+   websocket protocol. No response is expected. Transmission is not
+   guaranteed (e.g., cannot connect to target).
+
+   The parameters are:
+     * wsurl - websocket url
+     * wsproto - websocket protocol
+     * data - what to send
+
+   The parameters can contain pseudo-variables.
+
+   This function can be used from ANY_ROUTE.
+
+   Example 1.6. lwsc_notify_proto usage
+...
+    jwt_notify_proto("ws://10.1.1.10:8080/log", "kmsg"
+        "caller=$fU;callee=$tU;callid=$ci");
+...
+
+4.3.  lwsc_request(wsurl, data)
 
    Send data via websockets to the address specified by wsurl, a response
    is expected and made available in $lwsc(rdata).
@@ -192,12 +222,33 @@ modparam("lwsc", "verbosity", 1)
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.6. lwsc_request usage
+   Example 1.7. lwsc_request usage
 ...
     jwt_request("ws://10.1.1.10:8080/log",
         "caller=$fU;callee=$tU;srcip=$si");
 ...
 
+4.4.  lwsc_request_proto(wsurl, wsproto, data)
+
+   Send data via websockets to the address specified by wsurl, providing
+   websocket protocol. A response is expected and made available in
+   $lwsc(rdata).
+
+   The parameters are:
+     * wsurl - websocket url
+     * wsproto - websocket protocol
+     * data - what to send
+
+   The parameters can contain pseudo-variables.
+
+   This function can be used from ANY_ROUTE.
+
+   Example 1.8. lwsc_request_proto usage
+...
+    jwt_request_proto("ws://10.1.1.10:8080/log", "kmsg",
+        "caller=$fU;callee=$tU;srcip=$si");
+...
+
 5. Variables
 
    5.1. $lwsc(key)
@@ -210,7 +261,7 @@ modparam("lwsc", "verbosity", 1)
      * rdata - the response retrieved after lwsc_request().
      * status - the status of verification after a failed jwt_verify().
 
-   Example 1.7. $lwsc(name) usage
+   Example 1.9. $lwsc(name) usage
 ...
   jwt_request("ws://10.1.1.10:8080/log",
         "caller=$fU;callee=$tU;srcip=$si");