Part of development for next major release Kamailio 5.0, we would like to announce that the framework (code-named kemi) which allows writing the routing blocks in embedded languages is already in place. At this moment, Lua or Python can be use as alternative to the native scripting language to write the routing blocks. More details can be found at:
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!
No comments:
Post a Comment