misc/examples/kemi: added python3 and ruby as options to basic example
authorDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 23 May 2019 09:38:44 +0000 (11:38 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Thu, 23 May 2019 09:38:44 +0000 (11:38 +0200)
misc/examples/kemi/kamailio-basic-kemi.cfg

index 805d78c..c102fa7 100644 (file)
@@ -114,14 +114,32 @@ memlog=5
 log_prefix="LUA {$rm}: "
 #!else
 #!ifdef WITH_CFGPYTHON
-log_prefix="PYT {$rm}: "
+log_prefix="PY2 {$rm}: "
+#!else
+#!ifdef WITH_CFGPYTHON3
+log_prefix="PY3 {$rm}: "
+#!else
+#!ifdef WITH_CFGJSDT
+log_prefix="JSC {$rm}: "
+#!else
+#!ifdef WITH_CFGSQLANG
+log_prefix="SQL {$rm}: "
+#!else
+#!ifdef WITH_CFGJRUBY
+log_prefix="RUB {$rm}: "
 #!else
 log_prefix="NAT {$rm}: "
 #!endif
 #!endif
+#!endif
+#!endif
+#!endif
+#!endif
 
 latency_cfg_log=2
-
+latency_log=2
+latency_limit_action=100000
+latency_limit_db=200000
 log_facility=LOG_LOCAL0
 
 fork=yes
@@ -215,10 +233,18 @@ loadmodule "app_lua.so"
 loadmodule "app_python.so"
 #!endif
 
+#!ifdef WITH_CFGPYTHON3
+loadmodule "app_python3.so"
+#!endif
+
 #!ifdef WITH_CFGJSDT
 loadmodule "app_jsdt.so"
 #!endif
 
+#!ifdef WITH_CFGRUBY
+loadmodule "app_ruby.so"
+#!endif
+
 #!ifdef WITH_CFGSQLANG
 loadmodule "app_sqlang.so"
 #!endif
@@ -355,12 +381,16 @@ modparam("htable", "htable", "ipban=>size=8;autoexpire=300;")
 #!endif
 
 #!ifdef WITH_CFGPYTHON
-modparam("app_python", "script_name", "/usr/local/etc/kamailio/kamailio-basic-kemi-python.py")
+modparam("app_python", "load", "/usr/local/etc/kamailio/kamailio-basic-kemi-python.py")
+cfgengine "python"
+#!else
+
+#!ifdef WITH_CFGPYTHON3
+modparam("app_python3", "load", "/usr/local/etc/kamailio/kamailio-basic-kemi-python.py")
 cfgengine "python"
 #!else
 
 #!ifdef WITH_CFGLUA
-modparam("app_lua", "reload", 1)
 modparam("app_lua", "load", "/usr/local/etc/kamailio/kamailio-basic-kemi-lua.lua")
 cfgengine "lua"
 #!else
@@ -369,10 +399,16 @@ cfgengine "lua"
 modparam("app_jsdt", "load", "/usr/local/etc/kamailio/kamailio-basic-kemi-jsdt.js")
 cfgengine "jsdt"
 #!else
+
 #!ifdef WITH_CFGSQLANG
 modparam("app_sqlang", "load", "/usr/local/etc/kamailio/kamailio-basic-kemi-sqlang.sq")
 cfgengine "sqlang"
 #!else
+
+#!ifdef WITH_CFGRUBY
+modparam("app_ruby", "load", "/usr/local/etc/kamailio/kamailio-basic-kemi-ruby.rb")
+cfgengine "sqlang"
+#!else
 cfgengine "native"
 include_file "/usr/local/etc/kamailio/kamailio-basic-kemi-native.cfg"
 #!endif
@@ -383,3 +419,6 @@ include_file "/usr/local/etc/kamailio/kamailio-basic-kemi-native.cfg"
 
 #!endif
 
+#!endif
+
+#!endif