A tutorial showing a complex SIP routing logic implemented with latest Kamailio development version has been made available at:
Practically shows how to use Lua scripting language instead of Kamailio’s native configuration language to route SIP requests, taking care of of services such as authentication, registration or user location.
While is not intended as a replacement for Kamailio’s configuration language, Lua, by its nature of small and fast embedded language, is a perfect choice for enhancing SIP routing capabilities. It has dozens of extensions that you can use, including libraries to connect to social networks such as Twitter, allowing you to send notifications from your SIP server configuration.