5.1.1: if python_exec method returns 0, then the script hangs
If the python_exec method return -1, then expressions treat it as if it returned zero.
Somewhere there seems to be an offset by 1 issue.
if (!python_exec("method")) { # if you return -1, the script does not hang but treated like zero }
################## Example 1: class kamailio(object): def hello(self, msg): KSR.info("hello, world\n") return 0
Calling: python_exec("hello")
will cause script hang
################### Example 2: class kamailio(object): def hello(self, msg): KSR.info("hello, world\n") return -1
Calling python_exec("hello")
if (!python_exec("hello")) { ## method returns -1 ## why did we get here? xlog("L_INFO","method return zero!\n"); }
shows INFO: <script>: method return zero!