Kamailio 5.0 Preview: As part of development for next major release Kamailio 5.0 we would like to announce a new framework (code-named kemi) which allows writing routing blocks in embedded languages.
If you use the development code (GIT master), Lua or Python can already be used as alternatives to the native scripting language to write complete routing blocks. More details can be found on our wiki:
Examples of SIP routing scripts that offer more or less same features as etc/kamailio-basic.cfg are available in source tree at examples/kemi. For convenience of reading, here are the links to git repository:
- the common file setting global and modules parameters as well as specifying the config engine:
- the part of config with routing blocks in native language:
- the part of config with routing blocks in Lua:
- the part of config with routing blocks in Python:
You can compare the last three above and see how different or similar they look for providing same SIP routing features using different languages.
The work is not finished, lot of modules need to export now functions to embedded config interface, which is quite straightforward:
Also, a missing part is handling the equivalents of event_route blocks in embedded languages, an ongoing discussion being open on mailing lists..
Interesting that some incipient performance tests to compare the interpreters show good results for using especially Lua but also Python:
Anyone willing to help can start exporting functions from modules to embedded interface or test some more complex configs in Lua or Python.
Thank you for flying Kamailio and looking forward to meeting many of you at Kamailio World Conference in less than two weeks!