From f8cc45902bf91b592e6867b2ab9baf14bf18eb2f Mon Sep 17 00:00:00 2001 From: Vlad Patrascu Date: Wed, 21 Jun 2023 10:50:25 +0300 Subject: [PATCH] lua: fix opensips lua API docs (cherry picked from commit a53ba3d0d696ef56684a03b7bbf4a4e8474c3e33) --- modules/lua/doc/lua_api.xml | 49 ++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/modules/lua/doc/lua_api.xml b/modules/lua/doc/lua_api.xml index ba34c2b4157..6c34ea28729 100644 --- a/modules/lua/doc/lua_api.xml +++ b/modules/lua/doc/lua_api.xml @@ -71,6 +71,19 @@ Returns "SIP_REQUEST" or "SIP_REPLY". +
+ isMyself(host, port) + + Test if the host and optionally the port represent one of the addresses + that OpenSIPS listens on. + +
+
+ grepSockInfo(host, port) + + Similar to isMyself(), but without taking a look into the aliases. + +
getURI_User(msg) @@ -84,7 +97,7 @@
- getHeader(header) + getHeader(msg, header) Returns the value of the specified header. @@ -96,7 +109,13 @@
- moduleFunc(msg, function, args1, args2) + getRoute(msg) + + Returns a table with the Route header. + +
+
+ moduleFunc(msg, function, args1, args2, ...) You can pass arguments to this function. @@ -126,19 +145,19 @@
- AVP_get(msg, name) + AVP_get(name) Returns an AVP variable.
- AVP_set(msg, name, value) + AVP_set(name, value) Defines an AVP variable.
- AVP_destroy(msg, name) + AVP_destroy(name) Destroys an AVP variable. @@ -150,7 +169,25 @@
- add_lump_rpl + pseudoVarSet(msg, variable, value) + + Sets the value of a pseudoVar. + +
+
+ scriptVarGet(variable) + + Returns a script variable. + +
+
+ scriptVarSet(variable, value) + + Sets the value of a script variable. + +
+
+ add_lump_rpl(msg, header) Add header to the reply.