Browse Source

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

Kamailio Dev 5 years ago
parent
commit
3bbaca477c
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/modules/app_lua/README

+ 6 - 3
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
 ...