[sr-dev] git:master:3bbaca47: modules: readme files regenerated - app_lua ... [skip ci]

Kamailio Dev kamailio.dev at kamailio.org
Thu Jul 30 20:46:22 CEST 2020


Module: kamailio
Branch: master
Commit: 3bbaca477c27b2e1864a72491578279be2295fe1
URL: https://github.com/kamailio/kamailio/commit/3bbaca477c27b2e1864a72491578279be2295fe1

Author: Kamailio Dev <kamailio.dev at kamailio.org>
Committer: Kamailio Dev <kamailio.dev at kamailio.org>
Date: 2020-07-30T20:46:13+02:00

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

---

Modified: src/modules/app_lua/README

---

Diff:  https://github.com/kamailio/kamailio/commit/3bbaca477c27b2e1864a72491578279be2295fe1.diff
Patch: https://github.com/kamailio/kamailio/commit/3bbaca477c27b2e1864a72491578279be2295fe1.patch

---

diff --git a/src/modules/app_lua/README b/src/modules/app_lua/README
index a1f0c05984..545fb78f14 100644
--- a/src/modules/app_lua/README
+++ b/src/modules/app_lua/README
@@ -94,6 +94,9 @@ Chapter 1. Admin Guide
    To read more about KEMI exports and available KSR submodules, see:
      * http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/
 
+   Note: to have the old Lua module 'sr' available, load the 'app_lua_sr'
+   Kamailio module.
+
    Lua (http://www.lua.org) is a fast and easy to embed scripting
    language. Exported API from SIP router to Lua is documented in the
    dokuwiki.
@@ -203,7 +206,7 @@ lua_dofile("/usr/local/etc/kamailio/lua/myscript.lua");
 
    Example 1.6. lua_dostring usage
 ...
-if(!lua_dostring("sr.log([[err]], [[----------- Hello World from $fU\n]])"))
+if(!lua_dostring("KSR.log([[err]], [[----------- Hello World from $fU\n]])"))
 {
     xdbg("SCRIPT: failed to execute lua script!\n");
 }
@@ -237,7 +240,7 @@ lua_run("lua_func3", "$rU", "2", "$si");
 
    Example 1.8. lua_runstring usage
 ...
-if(!lua_runstring("sr.log([[err]], [[----------- Hello World from $fU\n]])"))
+if(!lua_runstring("KSR.log([[err]], [[----------- Hello World from $fU\n]])"))
 {
     xdbg("SCRIPT: failed to execute lua script!\n");
 }
@@ -297,7 +300,7 @@ if(!lua_runstring("sr.log([[err]], [[----------- Hello World from $fU\n]])"))
    '/usr/local/etc/kamailio/lua/myscript.lua'.
 ...
 function sr_append_fu_to_reply()
-        sr.hdr.append_to_reply("P-From: " .. sr.pv.get("$fu") .. "\r\n");
+        KSR.hdr.append_to_reply("P-From: " .. KSR.pv.get("$fu") .. "\r\n");
 end
 ...
 




More information about the sr-dev mailing list