Expand Asterisk PBX Capabilities
Ajith Nilantha de Silva
Senior Software Architect (Hands-On). < < Best solutions with mixed languages & mixed platforms recipe >>
Had some R&D to extend the Asterisk capabilities and performance with Asterisk Applications with lua, python and build it Dial-plan application.
Build-in dial plans are very good at performance. But when come into modification and extending the applications, the complexity goes very high.
Lua, does almost matches the same performance as same as built-in dial plan since Asterisk is having built-in lua engine.
Also Lua scripts can be expanded without any issues by separating the logic/code in to files and then include those. Also, there are plenty of available libraries that we can use in Lua scripts.
But there is a glitch that there are some limitations when it compared to the Dial Plan application. Specially when working with Handlers, it is required to use the handlers in the Dial-Plan application.
Python, in the other hand, does the pretty good job, but it needs to execute externally using the built-in dial plan with AGI call.
Expand-ability and maintainability is in very high rate and it is using the Asterisk AGI interface to communicate with asterisk engine.
Bit limited with channel handling but can be done with extra coding.
Over-roll it works without any issue and it is not required to re-load the dial plan, when Python script is changed since it executes it on-demand.
Performance is not that slow and it is bit close to lua performance. As long as Python application is written well, it runs well.
So, which way to go is based on the complexity and maintainability and dependability.
If you do care about performance and forget the rest then better to go with Asterisk Build-In Dial-plan applications. Asterisk engine does not have any extra workload.
If you care performance, maintainability and expand-ability without any difficulties then the choice is Lua. But you have to some features of the Dial Plan application.
When you need to consider maintainability and expand-ability and less priority on performance then Python is the winner. But you have to some features of the Dial Plan application.