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:32] miconda [Configuration File Engines] |
devel:config-engines [2016/04/19 15:42] miconda [Python Config KEMI Engine] |
||
---|---|---|---|
Line 246: | 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 (functions) 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: | ||
Line 262: | Line 262: | ||
* **Router** - provided by the old way of exporting functions to Python (https:// | * **Router** - provided by the old way of exporting functions to Python (https:// | ||
- | * **KSR** - provided via KEMI interface (not many functions exported at this moment, but expected to take over all **Python** module). The functions exported to KEMI are accessible as KSR.submodule.function(...). If submodule name is empty (reserved for core functions), then they are available as KSR.function(...). | + | * **KSR** - provided via KEMI interface (not many functions exported at this moment, but expected to take over all **Router** module). The functions exported to KEMI are accessible as KSR.submodule.function(...). If submodule name is empty (reserved for core functions), then they are available as KSR.function(...). |