Friday, May 6, 2016

Kamailio - SIP Routing in Lua or Python

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:
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