[sr-dev] git:master:e9c10e40: misc/examples/kemi: updated kamailio-basic-kemi.cfg with app_python3s

Daniel-Constantin Mierla miconda at gmail.com
Fri Dec 2 11:09:45 CET 2022


Module: kamailio
Branch: master
Commit: e9c10e408074c09a3f6160e23ac42911d7364fa4
URL: https://github.com/kamailio/kamailio/commit/e9c10e408074c09a3f6160e23ac42911d7364fa4

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-12-02T10:53:30+01:00

misc/examples/kemi: updated kamailio-basic-kemi.cfg with app_python3s

- reorganized defines

---

Modified: misc/examples/kemi/kamailio-basic-kemi.cfg

---

Diff:  https://github.com/kamailio/kamailio/commit/e9c10e408074c09a3f6160e23ac42911d7364fa4.diff
Patch: https://github.com/kamailio/kamailio/commit/e9c10e408074c09a3f6160e23ac42911d7364fa4.patch

---

diff --git a/misc/examples/kemi/kamailio-basic-kemi.cfg b/misc/examples/kemi/kamailio-basic-kemi.cfg
index c0d31d6059..59fe44eb3e 100644
--- a/misc/examples/kemi/kamailio-basic-kemi.cfg
+++ b/misc/examples/kemi/kamailio-basic-kemi.cfg
@@ -112,28 +112,55 @@ memlog=5
 
 #!ifdef WITH_CFGLUA
 log_prefix="LUA {$rm}: "
-#!else
+#!define KEMIENGINE "lua"
+#!define KEMIMODULE "app_lua"
+#!define KEMILOAD "/usr/local/etc/kamailio/kamailio-basic-kemi-lua.lua"
+#!endif
+
 #!ifdef WITH_CFGPYTHON
 log_prefix="PY2 {$rm}: "
-#!else
+#!define KEMIENGINE "python"
+#!define KEMIMODULE "app_python"
+#!define KEMILOAD "/usr/local/etc/kamailio/kamailio-basic-kemi-python.py"
+#!endif
+
 #!ifdef WITH_CFGPYTHON3
 log_prefix="PY3 {$rm}: "
-#!else
+#!define KEMIENGINE "python"
+#!define KEMIMODULE "app_python3"
+#!define KEMILOAD "/usr/local/etc/kamailio/kamailio-basic-kemi-python.py"
+#!endif
+
+#!ifdef WITH_CFGPYTHON3S
+log_prefix="PY8 {$rm}: "
+#!define KEMIENGINE "python3s"
+#!define KEMIMODULE "app_python3s"
+#!define KEMILOAD "/usr/local/etc/kamailio/kamailio-basic-kemi-python3s.py"
+#!endif
+
 #!ifdef WITH_CFGJSDT
 log_prefix="JSC {$rm}: "
-#!else
+#!define KEMIENGINE "jsdt"
+#!define KEMIMODULE "app_jsdt"
+#!define KEMILOAD "/usr/local/etc/kamailio/kamailio-basic-kemi-jsdt.js"
+#!endif
+
 #!ifdef WITH_CFGSQLANG
 log_prefix="SQL {$rm}: "
-#!else
-#!ifdef WITH_CFGJRUBY
-log_prefix="RUB {$rm}: "
-#!else
-log_prefix="NAT {$rm}: "
-#!endif
-#!endif
-#!endif
+#!define KEMIENGINE "sqlang"
+#!define KEMIMODULE "app_sqlang"
+#!define KEMILOAD "/usr/local/etc/kamailio/kamailio-basic-kemi-sqlang.sq"
 #!endif
+
+#!ifdef WITH_CFGRUBY
+log_prefix="RUB {$rm}: "
+#!define KEMIENGINE "ruby"
+#!define KEMIMODULE "app_ruby"
+#!define KEMILOAD "/usr/local/etc/kamailio/kamailio-basic-kemi-ruby.rb"
 #!endif
+
+#!ifndef KEMIENGINE
+log_prefix="NAT {$rm}: "
 #!endif
 
 latency_cfg_log=2
@@ -226,28 +253,8 @@ loadmodule "htable.so"
 loadmodule "pike.so"
 #!endif
 
-#!ifdef WITH_CFGLUA
-loadmodule "app_lua.so"
-#!endif
-
-#!ifdef WITH_CFGPYTHON
-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"
+#!ifdef KEMIENGINE
+loadmodule KEMIMODULE
 #!endif
 
 # ----------------- setting module-specific parameters ---------------
@@ -381,45 +388,11 @@ modparam("pike", "remove_latency", 4)
 modparam("htable", "htable", "ipban=>size=8;autoexpire=300;")
 #!endif
 
-#!ifdef WITH_CFGPYTHON
-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", "load", "/usr/local/etc/kamailio/kamailio-basic-kemi-lua.lua")
-cfgengine "lua"
-#!else
-
-#!ifdef WITH_CFGJSDT
-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 "ruby"
+#!ifdef KEMIENGINE
+modparam(KEMIMODULE, "load", KEMILOAD)
+cfgengine KEMIENGINE
 #!else
 cfgengine "native"
 include_file "/usr/local/etc/kamailio/kamailio-basic-kemi-native.cfg"
 #!endif
 
-#!endif
-
-#!endif
-
-#!endif
-
-#!endif
-
-#!endif




More information about the sr-dev mailing list