Jelajahi Sumber

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

Kamailio Dev 5 tahun lalu
induk
melakukan
3bbaca477c
1 mengubah file dengan 6 tambahan dan 3 penghapusan
  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:
    To read more about KEMI exports and available KSR submodules, see:
      * http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/
      * 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
    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
    language. Exported API from SIP router to Lua is documented in the
    dokuwiki.
    dokuwiki.
@@ -203,7 +206,7 @@ lua_dofile("/usr/local/etc/kamailio/lua/myscript.lua");
 
 
    Example 1.6. lua_dostring usage
    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");
     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
    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");
     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'.
    '/usr/local/etc/kamailio/lua/myscript.lua'.
 ...
 ...
 function sr_append_fu_to_reply()
 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
 end
 ...
 ...