<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">
Yes, that is correct, they are manually documented.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">
// Samuel</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org> on behalf of Grant Bagdasarian <gb@cm.nl><br>
<b>Sent:</b> Thursday, February 15, 2018 11:51<br>
<b>To:</b> miconda@gmail.com; Kamailio (SER) - Users Mailing List<br>
<b>Subject:</b> Re: [SR-Users] KEMI</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Consolas}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black}
a:x_link, span.x_MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:x_visited, span.x_MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black}
p.x_msonormal0, li.x_msonormal0, div.x_msonormal0
        {margin-right:0cm;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black}
span.x_HTMLPreformattedChar
        {font-family:Consolas;
        color:black}
span.x_EmailStyle21
        {font-family:"Calibri",sans-serif;
        color:windowtext}
.x_MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:70.85pt 70.85pt 70.85pt 70.85pt}
div.x_WordSection1
        {}
-->
</style>
<div lang="EN-US" link="blue" vlink="purple" style="background-color:white">
<div class="x_WordSection1">
<p class="x_MsoNormal"><span lang="NL" style="color:windowtext">Hi Daniel,</span></p>
<p class="x_MsoNormal"><span lang="NL" style="color:windowtext"> </span></p>
<p class="x_MsoNormal"><span style="color:windowtext">Thanks! Really nice script!</span></p>
<p class="x_MsoNormal"><span style="color:windowtext">So, the other (md) files for core and pv functions are made manually?
</span></p>
<p class="x_MsoNormal"><span style="color:windowtext"> </span></p>
<p class="x_MsoNormal"><span style="color:windowtext">Regards,</span></p>
<p class="x_MsoNormal"><span style="color:windowtext">Grant</span></p>
<p class="x_MsoNormal"><span style="color:windowtext"> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="x_MsoNormal"><b><span style="color:windowtext">From:</span></b><span style="color:windowtext"> sr-users [mailto:sr-users-bounces@lists.kamailio.org]
<b>On Behalf Of </b>Daniel-Constantin Mierla<br>
<b>Sent:</b> donderdag 15 februari 2018 10:09<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org><br>
<b>Subject:</b> Re: [SR-Users] KEMI</span></p>
</div>
</div>
<p class="x_MsoNormal"> </p>
<p>To add a bit more ...</p>
<p>The list of the methods exported to KSR module in python (or any other KEMI scripting language) are listed at:</p>
<p>  - <a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fkamailio.org%2Fdocs%2Ftutorials%2Fdevel%2Fkamailio-kemi-framework%2F&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573274270&sdata=m3aAZPtWvA6CdtZPo4n%2FHOM80eRRJOKPzalfYe7G6no%3D&reserved=0" originalsrc="http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/" shash="kmbfau5pqznA/pNvVz3+TC/MAQnScIXnZE91M+DxKtCjUiT3TCdLQpeigNSjDimXLCvoKc7XemhlpDCl3F7yM9wBn5/ZLmgMnqTjC4zJvIV06FHV5UR1SJ7q/q7IV4KF1c7CP37N3wNwT4QM0CZB7G20pgaHrV5CeY7dE9fPHrY=">
http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/</a></p>
<p>There is a python script contributed that scans the C code in kamailio and extracts the KEMI exports, maybe you can adjust it to generate code completion rules:</p>
<p>  - <a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio-docs%2Fblob%2Fmaster%2Fkamailio-kemi-framework%2Ftools%2Fgenerate_module_docs.py&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573274270&sdata=FATl8MaRciknpwdg39XUFH5bKPawgcCNhKzDuNZ4pZY%3D&reserved=0" originalsrc="https://github.com/kamailio/kamailio-docs/blob/master/kamailio-kemi-framework/tools/generate_module_docs.py" shash="ZsN10bWVFqPRWcbovIXIZL6CE/FwAAWnJZyy5m23RlZ6qhCjxAjBYYOIRjkZ9brMXnvEW5/o+fqoxpN0De46oQRM38CJcfJl4Ze+3bxSaES5xPt3uOR893263eUHb2goMxA+31d2zUXZU/u6Tx1VqhBu6S0bYpEz9ebsLKkkgpM=">
https://github.com/kamailio/kamailio-docs/blob/master/kamailio-kemi-framework/tools/generate_module_docs.py</a></p>
<p class="x_MsoNormal" style="margin-bottom:12.0pt">Cheers,<br>
Daniel</p>
<div>
<p class="x_MsoNormal">On 15.02.18 01:16, Anthony Alba wrote:</p>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<div>
<p class="x_MsoNormal">They are created in C code and not visible as .py files.</p>
</div>
<div>
<p class="x_MsoNormal"> </p>
<div>
<p class="x_MsoNormal">On Feb 15, 2018 12:03 AM, "Grant Bagdasarian" <<a href="mailto:gb@cm.nl">gb@cm.nl</a>> wrote:</p>
<blockquote style="border:none; border-left:solid #CCCCCC 1.0pt; padding:0cm 0cm 0cm 6.0pt; margin-left:4.8pt; margin-right:0cm">
<p class="x_MsoNormal">Hi,<br>
<br>
Where would one get the files which are imported when creating a Kamailio file using python?<br>
import Router.Logger as Logger<br>
import KSR as KSR<br>
<br>
Would be awesome if we could reference these and get code completion when using for instance Visual Studio code.<br>
So, basically, I'm looking for the KSR.py and Router.py files, but I cannot find them.<br>
<br>
Regards,<br>
Grant<br>
<br>
-----Original Message-----<br>
From: sr-users [mailto:<a href="mailto:sr-users-bounces@lists.kamailio.org">sr-users-bounces@lists.kamailio.org</a>] On Behalf Of Daniel-Constantin Mierla<br>
Sent: woensdag 7 februari 2018 16:02<br>
To: Aleksandar Sosic <<a href="mailto:alex.sosic@timenet.it">alex.sosic@timenet.it</a>><br>
Cc: Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>><br>
Subject: Re: [SR-Users] KEMI<br>
<br>
I am more into Lua when it comes on doing something the native kamailio.cfg cannot do, that's because Lua has a decent range of extensions (external Lua libraries).<br>
<br>
JavaScript was added for those that do not need a lot of external extensions, but want to have script reload.<br>
<br>
Same for Squirrel, but that language is not so popular as JavaScript, however, there could be people liking it, being very minimal, thus expecting to need very low resources.<br>
<br>
Anyhow, once implemented, a kemi interpreter module should not need much maintenance. New kemi functions will be exported directly from the other modules.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
On 07.02.18 14:12, Aleksandar Sosic wrote:<br>
> Thanks Dan for the extensive answer!<br>
><br>
> My last question then is what kemi language do you use personally? :D<br>
><br>
> Kind regards,<br>
> --<br>
> Aleksandar Sosic<br>
> mail: <a href="mailto:alex.sosic@timenet.it">alex.sosic@timenet.it</a><br>
> skype: alex.sosic<br>
> cell: <a href="tel:%2B385%2091%202505%20146">+385 91 2505 146</a><br>
><br>
><br>
> On Tue, Feb 6, 2018 at 8:44 PM, Daniel-Constantin Mierla<br>
> <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br>
>> The C code is the same for 99% of the KSR functions available either<br>
>> in python or javascript (or the other kemi languages). Only KSR.pv<br>
>> and KSR.x functions are implemented in the app_python or app_jsdt modules.<br>
>> So if such a KSR function is broken, it is the same everywhere<br>
>><br>
>> Probably KSR.pv can be moved in a common place, but KSR.x are<br>
>> specific extensions for each interpreter, so it will stay in app_*.<br>
>><br>
>> Then of course, it is a matter of the script interpreter, python vs<br>
>> js ducktape, which are external project, we just bind to them. Also,<br>
>> it is about the maintenance of app_python and app_jsdt. I am not the<br>
>> developer of app_python and I cannot assert its state, I just added<br>
>> the kemi enhancement. app_jsdt was developed by me, but I haven't<br>
>> used it extensively so far.<br>
>><br>
>> Probably you can do some basic configs and test yourself and see what<br>
>> fits your needs better, you can start from the examples at:<br>
>><br>
>>   -<br>
>> <a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio%2Ftree%2Fmaster%2Fmisc%2Fexamples%2Fkemi&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573274270&sdata=b8ukD4%2FQMPujHTgA1X9UvwGbTRhLJe2Mw8l%2Bf4yT%2FwQ%3D&reserved=0" originalsrc="https://github.com/kamailio/kamailio/tree/master/misc/examples/kemi" shash="rOY+VdELYwbDji9obF4gbtb2LGr2vKAn+J/uTA+q6Et/tMtNZ9al6av7MnOC2vj8CkUcbubY4ENhcfkuJicqgtmz3hzU12xQgsbkC1BNowfM9qu8+jOlUsh1OfsEw7KkjWYrH0Rq6HsuAPLWh3R5+beporhT+UU1K4+5qG7l32g=" target="_blank">
https://github.com/kamailio/kamailio/tree/master/misc/examples/kemi</a><br>
>><br>
>> In long term, you have to look at the extensions you may need, what<br>
>> python offers vs ducktape js interpreter in terms of their own<br>
>> extensions and libraries.<br>
>><br>
>> Cheers,<br>
>> Daniel<br>
<br>
--<br>
Daniel-Constantin Mierla<br>
<a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.twitter.com%2Fmiconda&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573274270&sdata=UGxQ%2B7tG79kTGBKEA7Uwo6S1Oiwp5mbEKGprtGEWs5Y%3D&reserved=0" originalsrc="http://www.twitter.com/miconda" shash="XK2NcGi6PVQMyJc8gjpfw4NfbrilUHoAKvNxRws6WgdNrfg26iUjAcMwsvmawNuPFViTaQ1NCmQPaNXROfLiWhfjn2pxz9DSeonpTxk1C7SzrpwcBbosGIuvAle4xtmZeyJC+GEIglk1xXgN0d2R6/yW6azEE300q05FDJMncb8=" target="_blank">www.twitter.com/miconda</a>
 -- <a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fmiconda&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573274270&sdata=VQeokkfWbWpF8p0Jc1cEhePS3nnjdfa5cjtMQcI5RRQ%3D&reserved=0" originalsrc="http://www.linkedin.com/in/miconda" shash="NsuvbX/ijPWgs0wXgD4SVHO/33WPdmfvZiGd0Wm/u6yA3//ZYmR2Knzz6yOvRVUcW8GiBfhpSQL+vJP9IscKMXKqDEExazQihBzuNzlqSjYRQSCnr/l9WMguXCWuwLq3gw4AiGwvTzRY0HF8mHZpVgeoFypM+3gfthVdJnMxIzg=" target="_blank">
www.linkedin.com/in/miconda</a> Kamailio Advanced Training - March 5-7, 2018, Berlin -
<a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.asipto.com&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573430516&sdata=hdymCdVgWe%2BrrSRm%2BG%2F%2BjPOqN5m4aMFguweBBEfhB%2B8%3D&reserved=0" originalsrc="http://www.asipto.com" shash="H42cgqefZbRDu2J5pGIhIF3mAHzV8CGaBLjvQppU5WcFJShzvVOmd6C8NluuFfl1Znmc2/4VZeiqxNcGwBCIuvHmUBFdNTsck/3JdnI+s9IqijeWhjRmU8rMW/NhVkJFRp8MCaKt2o3cOadMgdy4yg6EVPpzJnVLS8D0EarmfQ8=" target="_blank">
www.asipto.com</a> Kamailio World Conference - May 14-16, 2018 - <a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kamailioworld.com&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573430516&sdata=ooXvTpPId4aHa22pzcFEHbOm0Y2msn8lzzxWkbHr2X0%3D&reserved=0" originalsrc="http://www.kamailioworld.com" shash="sve7NHrMOYeOiwgHMutoCqIqGkoyyZPNOE0LrYOJvzcXbTJIzglIwcr6rzhVmjmNduUFY03JgkcDv+3mlwm/yl8GGcpVXgFDu5sbtCCwNKGYbpNZzGZMipeGR6kCT0o4s3+p330sbZoFYzJjDabU3thSZytC1S66+QkcDCjwZiI=" target="_blank">
www.kamailioworld.com</a><br>
<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573430516&sdata=FdUihlKY4ELDhia41aD6E8klHolOEUy05admP72UXJM%3D&reserved=0" originalsrc="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" shash="Qcy4WW0qRlAnV3EUOb5Zbz1LS/d+BYkgMrksbaj6LHYNHW+0Qw+3g8SoEA9Afl/kXMKDTl5FuDcxjLQ0wQmkPzJvWJR0PcP74MiIWL2jigayrnb4tbWvVCZwAp/t1rf5QdUhhzs9491cGuYOxY7ha7vZOIu8onBR91PcKBcE4Dg=" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573430516&sdata=FdUihlKY4ELDhia41aD6E8klHolOEUy05admP72UXJM%3D&reserved=0" originalsrc="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" shash="Qcy4WW0qRlAnV3EUOb5Zbz1LS/d+BYkgMrksbaj6LHYNHW+0Qw+3g8SoEA9Afl/kXMKDTl5FuDcxjLQ0wQmkPzJvWJR0PcP74MiIWL2jigayrnb4tbWvVCZwAp/t1rf5QdUhhzs9491cGuYOxY7ha7vZOIu8onBR91PcKBcE4Dg=" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></p>
</blockquote>
</div>
</div>
<p class="x_MsoNormal"><br>
<br>
<br>
</p>
<pre>_______________________________________________</pre>
<pre>Kamailio (SER) - Users Mailing List</pre>
<pre><a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a></pre>
<pre><a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573430516&sdata=FdUihlKY4ELDhia41aD6E8klHolOEUy05admP72UXJM%3D&reserved=0" originalsrc="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" shash="Qcy4WW0qRlAnV3EUOb5Zbz1LS/d+BYkgMrksbaj6LHYNHW+0Qw+3g8SoEA9Afl/kXMKDTl5FuDcxjLQ0wQmkPzJvWJR0PcP74MiIWL2jigayrnb4tbWvVCZwAp/t1rf5QdUhhzs9491cGuYOxY7ha7vZOIu8onBR91PcKBcE4Dg=">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></pre>
</blockquote>
<p class="x_MsoNormal"><br>
<br>
</p>
<pre>-- </pre>
<pre>Daniel-Constantin Mierla</pre>
<pre><a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.twitter.com%2Fmiconda&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573430516&sdata=p26%2BwqHIFvEHtadUPes6J9K4wIzsLhlcK%2BaUCq78scg%3D&reserved=0" originalsrc="http://www.twitter.com/miconda" shash="r74Ke/LT8x2Ukutt70KrQhz0+moNdFuSGmTwl4IszxLC8B44YOmDUtA88ED9pD1XSgLhWs4YeiIBIoEFelZXF+lOG2Cn7ujVB9pbY1jitxpT67SBv6aBZRkvbYZVbGn5yTPPG7Jm9gvics1P84LlsI1bBTq7RjxhSp6B4YtoZjQ=">www.twitter.com/miconda</a> -- <a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fmiconda&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573430516&sdata=KnOdAeFEoExeILTSu4wIwtCPDdLzj%2FWb%2BSm0xdZhsSE%3D&reserved=0" originalsrc="http://www.linkedin.com/in/miconda" shash="B4YWfLYOjA8Uw4jWq+2+kpkisHuGW6PhTHzAEEVJR+zchY1RwGofZjXiRSMqpg/AhCOqmHXv40HAH28QfvGXx5TNIWUU2fPaURN8y4EGC/N1OtiD4NA8kcWo1tKRXol0sVcRFGDyZlJAhwilNQp7v/jCBeaLxgK2a/pRDomAcZY=">www.linkedin.com/in/miconda</a></pre>
<pre>Kamailio Advanced Training - March 5-7, 2018, Berlin - <a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.asipto.com&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573430516&sdata=hdymCdVgWe%2BrrSRm%2BG%2F%2BjPOqN5m4aMFguweBBEfhB%2B8%3D&reserved=0" originalsrc="http://www.asipto.com" shash="H42cgqefZbRDu2J5pGIhIF3mAHzV8CGaBLjvQppU5WcFJShzvVOmd6C8NluuFfl1Znmc2/4VZeiqxNcGwBCIuvHmUBFdNTsck/3JdnI+s9IqijeWhjRmU8rMW/NhVkJFRp8MCaKt2o3cOadMgdy4yg6EVPpzJnVLS8D0EarmfQ8=">www.asipto.com</a></pre>
<pre>Kamailio World Conference - May 14-16, 2018 - <a href="https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kamailioworld.com&data=02%7C01%7C%7Cfe206de524394bd2ee1508d57462755f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636542888573430516&sdata=ooXvTpPId4aHa22pzcFEHbOm0Y2msn8lzzxWkbHr2X0%3D&reserved=0" originalsrc="http://www.kamailioworld.com" shash="sve7NHrMOYeOiwgHMutoCqIqGkoyyZPNOE0LrYOJvzcXbTJIzglIwcr6rzhVmjmNduUFY03JgkcDv+3mlwm/yl8GGcpVXgFDu5sbtCCwNKGYbpNZzGZMipeGR6kCT0o4s3+p330sbZoFYzJjDabU3thSZytC1S66+QkcDCjwZiI=">www.kamailioworld.com</a></pre>
</div>
</div>
</body>
</html>