This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
devel:config-engines [2016/04/19 15:18] miconda [To-Do] |
devel:config-engines [2016/04/19 15:41] miconda [Python Config KEMI Engine] |
||
---|---|---|---|
Line 5: | Line 5: | ||
Starting with v5.0.0, the routing blocks can be written in some other (well known) scripting languages and run via their embedded interpreters inside Kamailio. Known to work: | Starting with v5.0.0, the routing blocks can be written in some other (well known) scripting languages and run via their embedded interpreters inside Kamailio. Known to work: | ||
- | * Lua, implemented by app_lua module, as " | + | * Lua - implemented by app_lua module, as "lua" config engine |
+ | * Python - implemented by app_python module, as " | ||
Setting a configuration engine can be done with the global setting: | Setting a configuration engine can be done with the global setting: | ||
Line 245: | Line 246: | ||
The **app_python** module must be loaded and the Python script with routing logic must be set to its **script_name** parameter. | The **app_python** module must be loaded and the Python script with routing logic must be set to its **script_name** parameter. | ||
- | The **kemi** engine is built reusing the exiting **app_python** way of executing C code from Kamailio. In the Python script you have to declare the **mod_init()* method where to instantiate an object of a class that implements the other callback methods to be executed by Kamailio. | + | The **kemi** engine is built reusing the exiting **app_python** way of executing C code from Kamailio. In the Python script you have to declare the global |
Inside the new class, the following methods are relevant: | Inside the new class, the following methods are relevant: |