Ver Fonte

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

Daniel-Constantin Mierla há 9 anos atrás
pai
commit
9b00362149
1 ficheiros alterados com 8 adições e 0 exclusões
  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
 -- 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
 -- global variables corresponding to defined values (e.g., flags) in kamailio.cfg
 FLT_ACC=1
 FLT_ACC=1
 FLT_ACCMISSED=2
 FLT_ACCMISSED=2