 OK. Now, yeah. Yeah, thank you. Sorry. Hopefully, you could hear me. But here is how you can use Kamaelio, or where is the place of Kamaelio in voice over IP, IP, telephone network, either connecting devices or connecting the traffic from devices to gateways, to media servers, could be for transcoding or could be for some other kind of feature. Could be even like a gateway to Twitter for instant messaging. So, it's not only audio-video, it's also instant messaging present that you can do it with Kamaelio and with SIP as a protocol. Now, going to monitor the development side of, as falls them, it's oriented for developers. I'm gonna speak about Kamaelio configuration in file a bit, which actually is like a scripting language. It has a part with global parameters. You could see like global variables from your point of view. It's about Kamaelio being configured to listen on some specific IP port, specific transport layer like UDP, TCP, TLS. And then we have the part that it's used for routing the SIP packet. So, you will have to actually think about Kamaelio as not being a telephony engine, but more like a SIP packet router. So, you get access to every SIP packet that goes under the network and it's up to you in the configuration file to decide, okay, that's Daniel. Let's see Daniel. It's a local user. I would like to route to it. So, it's a location service that you can put together and call it sent to a device. It's a telephone number that looks like a mobile number. Then you can send it to a gateway towards mobile PSTN networks. So, it's up to you to decide everything to the very small details, including authentication. You can drop scanning attacks and so on. So, this scripting language is giving you the tools to decide. So, you can look at headers, you can look at source IP and a lot of other attributes related to this SIP packet that you received. Now, as I said, we started in 2001 and the project at that time, there was not a clear choice for the scripting language. It was Perl and Perl still exists there, but somehow it was not designed for recurrent execution of the same script. So, a lot of libraries don't care about memory, they don't free it because they expect that the interpreter is shut down after the one-time execution of the script. Then Python was not really that famous in being fast back in late 90s, early 2000s. So, as we targeted from the beginning large deployments was not a choice. Lua probably was there, but somehow we never found it at that time and probably was not that developed. So, at the end the decision was writing from scratch and of course you have some benefits. You can control everything about that interpreter because you write it, you know. If that action is triggered, it's up to you to do it. If that return code, it's returned, it's up to you to interpret it as you like. And then of course you can optimize it for your specific needs because we know we have to deal mainly with routing the zip packets and also can control the evolution of the language, how it's gonna be developed over the time, the structure and so on, so forth. But then a lot of drawbacks that we discover over the time, like we had to reinvent the wheel for a lot of small operation, all these string operations, substring, concatenation and so on, you will have to implement it in C which is the language used for Kamailo and then exported it to these self-made scripting languages. Then there are no external libraries that you can just import and use. So you have to write a module inside Kamailo if you want to extend this language or actually also in the core you can do it. Then is not used outside Kamailo, so practically you don't get the benefit of other people testing it in other conditions with different input that could reveal eventually some side effects on different operation and that would be useful. And also because of the initial design there are also some limitation in terms of how the script interpreter behaves. It has a lot of optimization, a startup sort of compilation in memory and then making the reload harder because we keep a lot of references to some pointers in private memory for each process. So there are some limitation that some people started to complain about it. So the solution over the time was like trying to somehow offer an alternative for the people that would like to have this more or less main demands about an option to reload the routing logic without restart and then ability to have more feature and be more flexible with these scripting languages because at the beginning it was only like VoIP, but now it's integration with a lot of other systems. Backends, like NoSQL, every other day it's another NoSQL popping up and maybe you want to use it. So we added like two versions ago a framework in the core and we named it Kamaelio embedded interface and the idea was to have a mechanism that a module exports a function to this framework and the framework propagates it to many other scripting languages, not only our native scripting language. It was added in 5.0, now we are already at the version 5.1 and it's implemented now for scripting engines. Lua, Python, JavaScript, and SQL scripting, a small one which I actually developed more for teaching and having others, a small module that could use as an inspiration but it's very similar to Lua and actually in that matter also similar to the JavaScript ducktape interpreter. We still have some other modules that allows you to execute inline scripts or application written in Perl which was actually the first interpreter added in Kamaelio and then .NET with all this sharp visual basic and then also Java which I haven't really touched but someone contributed as a matter of fact we have as you could see in the second slide over 200 extensions. Now when I say inline execution we have the default configuration scripting language with our routing blocks and somewhere inside there is a function Lua run and you can pass like a method name which is defined in an external Lua script. So inline it's also Kamaelio becomes the interpreter of the Lua it's initialized at the startup and then just inline execution inside the old native scripting language which was used for many years but people wanted a bit more flexibility. So this is, if you are not familiar this is kind of our scripting languages we define it route as being the cure for what would be equivalent of a function then we add the name for the route like the name of the function parameters we don't provide because practically each variable is like global variable in this scripting language so it's rather simplified scripting language and then we define our tokens like URI, it's request URI the address of the target and then adding headers and so on our function that we export through our modules to this scripting language again written from scratch. And now let's look maybe you can picture a bit this small function from our native scripting language and I will try to work through the four that implement the Kemi interface and show the equivalent and give some information about these scripting languages. So we already had another presentation about Lua in real-time communication with Janus, it exists in free-switch and aesthetics, it's like Lua it's hitting the RTC world more or less in terms of scripting. It was added as an extension for inline execution like eight years ago. It's very small and fast interpreter sometimes you get it in pair with the equivalency code that we implemented in native code and of course one of the features that you have with this scripting engine that you can use now you can reload this scripting scripting file without restarting So practically down there is the equivalent that you will have to write in Lua, so again one slide back, this is native configuration file about more or less adding a header to the same message and sending out and here it's the same testing if it's targeting myself as a server then adding a header and sending out through the socket we are using so pretty much equivalent but the power of this scripting using this scripting engine is not just using the equivalent or what we export from Kamahilo, it's importing whatever other library you find out there for Lua, maybe you need to interconnect with CouchDB, maybe you need to interconnect with some made API server and you have better I don't know, HTTP API or net string or RPC libraries in Lua so you don't need to implement anything anymore in C and then it's a link to larger file that could be a starting point if you want to use Lua for your scripting languages again you can build anything like from telephony system to instant messaging and any other real time communication systems with Kamahilo so used by telecoms with over 10 millions of phone connected to the platform the second one would be javascript but think about as scripting languages don't think about that complex stuff that you get in the browser that access the HTML elements and so on there is a basic scripting language behind it with the common math and string operation plus the grammar to define function objects and structure in the javascript it's not any big browser javascript engine, it's an open source engine but it's quite fast and easy to understand it's called duck tape it's available on github have much like external libraries that you can use still fairly decent there but it's providing no dependence inside Kamahilo because it's the duck tape project provides a single C file and include file that you can import and they recommend to use this one so practically you don't depend on the external library just have Kamahilo compile it and you have this javascript which of course gives you more flexibility in the operation plus reloading which is one of the desired feature inside the Kamahilo then we have up python I'm not the original developer of this module I'm not much into the python I just added the extension to see the exports done through the Kemi framework as a matter of that right now the reloading it's not working properly I started to implement it but as I don't have the proper knowledge to put it that way to look at to see how the python interpreter can reload the script I still need a bit of time on the other hand from the community this seems to be very popular especially because of the extensions you have in python so probably if you don't find the library in python for what you need then you'll have to write it anyhow from scratch because very unlikely to find it somewhere else again the link and the equivalent you see it's pretty much very small and again this is the equivalent of an existing Kamahilo routing blog but otherwise the benefits would be plug your own libraries and mix the code from Kamahilo point of view you just get a new module ksrk standing for Kamahilo cbrouting with a lot of other submodules and functions and the last I have implemented for it's squirrel which again was from more or less splitting from Lua because Lua is a bit blue in terms of the grammar for the language itself and this guy so is more or less one main developer try to have a more strict scripting languages on that matter is quite fast as I tested but in terms of extension and the structure of language it's also quite limited because it's not that popular there are some gaming engine using it but also with this one again maybe you can use it as a teaching mechanism or you can use it in embedded interfaces because it's also very small and the interpreter it's imported in our module because not so many distribution use them and I wanted to have an option to reload if you want with a very small interpreter now what's the state and pretty much getting to the end practically most of the modules that we implemented in Kamahilo export their function also to the kmi framework so this ksr module has now over 600 function that you can use in python in lua everything to control like time out of transaction where to routed redirect of the traffic connecting the calls together everything that it's available in the scripting languages it's pretty much there again it's not 100% because there are some modules that we didn't get there like the IMS one but that's a big beast that needs to be approached at some point so we have examples like complete example of a telephony routing engine with python, lua, skrl, javascript in that link and don't forget if you need and have a library written in another language you can still use inline execution for a lot of these dotnet languages with mono interpreter per is still there and java if you are having something that you can use there so probably for mono as I am the developer of that interpreter as well would be easier for me to add I haven't done the up per and up java and if the other developers are not jumping in very unlikely that I will allocate resources for is not much I'm really helping willing to help if you need but it's unlikely that I will do it myself alone and eventually as a shout out there if you use python and you want to have a reload please approach me to test it I will do the coding but I need someone to test and eventually help me if it's a bit familiar with embedding python on again reloading the scripting languages so thank you I see a lot of people from the community in terms of developers likely 15 here coming again to real time development room here at Fosdam and helping actually because some people will jump and take my place here once again thank you if you have a question until we shift to the next presenter please say it otherwise Matt I think is the next one you should come down here I did a very basic benchmark and practically at that time there was only lua and python and for lua you barely see any it's in terms of microsecond and sometimes I didn't know it was a virtual machine and I didn't know which was the reason for that because it was like sometimes the least execution time was in lua sometimes it was in the native scripting languages because if you are familiar with lua exporting is like just execution pointer to the function in lua last year in the lua dev room I presented more about this interpreter because I'm somehow I learn writing programming languages I'm a computer science engineer and I did some optimization to really pass the pointer at the end is just only index one index indirection in between lua and the c code python was a bit slower the guy that designed the module made it a bit strange from my opinion but maybe a bit better from python developer because tried to export an object so for each message is creating an object which takes a bit longer so it was like twice slower with python but it was still like for the mic test was like 2000 registrations per second in python in a single thread now many children and so on but that was only a registration so performance is still good we have no because this is like it's initiated at the start and it's up to you to use it always with lua or always with native scripting language or if you use inline again we load everything at startup it's why that reload it's somehow demanded because in the past now if you change the script language you have to send an rpc command to kamailo please reload and then with the next message will read it from the file and will be effective that process until a process from the moment you receive the c message until it sends out does only that one but you create many of them and we have some asynchronous framework if you need to suspend the same message later yeah it is compatible the same functional exported probably as I said but again we create processes probably it's per process we don't have threads but actually we create processes and then I think it's per process a log but that's somehow we do it in kamailo last one here and Matt please be around the next speaker which one no no it's using duck tape interpreter which is written from scratch but quite popular as I could see the feedback from the project it's embedded in many other application and it's also targeting use of javascript in embedded devices because Node.js is using the one from Chromium which is C++ I wanted C1 and this is maybe not that complete but it's very fast it's in pair more or less with Lua ok thank you