Module: kamailio Branch: master Commit: 9b00362149e5caf03aa90710908e12a120d5a0bd URL: https://github.com/kamailio/kamailio/commit/9b00362149e5caf03aa90710908e12a1...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2016-04-29T11:14:39+02:00
examples/kemi: notes about use of return code -255 and exit
---
Modified: examples/kemi/kamailio-basic-kemi-lua.lua
---
Diff: https://github.com/kamailio/kamailio/commit/9b00362149e5caf03aa90710908e12a1... Patch: https://github.com/kamailio/kamailio/commit/9b00362149e5caf03aa90710908e12a1...
---
diff --git a/examples/kemi/kamailio-basic-kemi-lua.lua b/examples/kemi/kamailio-basic-kemi-lua.lua index 70593bb..f62bc77 100644 --- a/examples/kemi/kamailio-basic-kemi-lua.lua +++ b/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