Преглед на файлове

examples/kemi: notes about use of return code -255 and exit

Daniel-Constantin Mierla преди 9 години
родител
ревизия
9b00362149
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 8 0
      examples/kemi/kamailio-basic-kemi-lua.lua

+ 8 - 0
examples/kemi/kamailio-basic-kemi-lua.lua

@@ -4,6 +4,14 @@
 -- sr - the old static object exporting Kamailio functions
 --
 
+-- Relevant remarks:
+--  * return code -255 is used to propagate the 'exit' behaviour to the
+--  parent route block. The alternative is to use KSR.sr.exit() instead
+--  of return -255. Do not use native Lua exit(), that kills the Lua
+--  interpreter and implicitely stops Kamailio as the Lua interpreter is
+--  embedded
+
+
 -- global variables corresponding to defined values (e.g., flags) in kamailio.cfg
 FLT_ACC=1
 FLT_ACCMISSED=2