<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p><br>
</p>
<p>I just pushed the rpc command app_python.api_list to master
branch. Can you test and see if works? If all ok, then I will push
it to branch 5.1 as well.</p>
<p><br>
</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 23.11.17 08:31, Daniel-Constantin
Mierla wrote:<br>
</div>
<blockquote type="cite"
cite="mid:45f90464-5443-5ccd-b0a6-e129709bfd6c@gmail.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<p>Hello,<br>
</p>
<br>
<div class="moz-cite-prefix">On 22.11.17 19:47, Samuel F. wrote:<br>
</div>
<blockquote type="cite"
cite="mid:DM5PR17MB0986EBF2C0CDCEF62C1FCD6DC3200@DM5PR17MB0986.namprd17.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
dir="ltr">
<p>Hi again,</p>
<p><br>
</p>
<p>Regarding RPC list: I do not think it is implemented for
python?</p>
</div>
</blockquote>
it is not, indeed, I just looked at the code. I am not much into
python myself, so it was overlooked -- I just added kemi support
for it on top of the previous app_python.<br>
<br>
<blockquote type="cite"
cite="mid:DM5PR17MB0986EBF2C0CDCEF62C1FCD6DC3200@DM5PR17MB0986.namprd17.prod.outlook.com">
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
dir="ltr">
<p> I checked the source and couldn't find anything that would
handle the RPC call:</p>
<p><span style="color: rgb(51, 51, 51); font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; font-size: 12px; white-space: pre;">kamctl
rpc app_python</span><span class="hljs-class" style="box-sizing: border-box; color: rgb(51, 51, 51); font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; font-size: 12px; white-space: pre;">.api_list</span><span style="color: rgb(51, 51, 51); font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace; font-size: 12px; white-space: pre;">
</span></p>
<div><br>
</div>
<div>Regarding the documentation:</div>
<div>I didn't mean to document in the source code, sorry for
not expressing myself clearly,</div>
</div>
</blockquote>
<br>
That was a proposal on the IRC devel meeting to add doxygen docs
for kemi function, which is good to have anyhow, but for something
with more details and examples, doxygen can become a mess.<br>
<br>
<blockquote type="cite"
cite="mid:DM5PR17MB0986EBF2C0CDCEF62C1FCD6DC3200@DM5PR17MB0986.namprd17.prod.outlook.com">
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
dir="ltr">
<div> I ment to generate the Kemi function list documentation
from the source code automatically via a script instead of
updating it manually (so the documentation doesn't become
stale). One example could be to run the RPC api_list and
take that list to generate a documentation file that shows
all available functions. I tried to check that out now but
couldn't get it working for python because I think the
command is missing (v5.0.4).</div>
<div><br>
</div>
<div>So to condense my proposal on how we could structure the
KEMI docs I would suggest:</div>
<div>- General documentation about how KEMI works: As it is
now, great</div>
<div>- Document special functions that are only implemented in
KEMI /or differs from the original module implementation: As
it is now, great</div>
<div>- Not have sections for each and every module, just one
section with a long list of exported KEMI functions with a
link to the original documentation</div>
<div><br>
</div>
<div>I'm happy to take a shot at generating a script for this
but would need help to understand how I can export the
python API list.</div>
</div>
</blockquote>
<br>
I am going to add the rpc command to app_python, then you can try
to build your tool for it.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote type="cite"
cite="mid:DM5PR17MB0986EBF2C0CDCEF62C1FCD6DC3200@DM5PR17MB0986.namprd17.prod.outlook.com">
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;"
dir="ltr">
<div><br>
</div>
<div>// Samuel</div>
<div><br>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>From:</b>
Daniel-Constantin Mierla <a class="moz-txt-link-rfc2396E"
href="mailto:miconda@gmail.com" moz-do-not-send="true"><miconda@gmail.com></a><br>
<b>Sent:</b> Tuesday, November 21, 2017 3:20:21 PM<br>
<b>To:</b> Samuel F.; Kamailio (SER) - Users Mailing List<br>
<b>Subject:</b> Re: [SR-Users] Kamailio KEMI Framework
Tutorial</font>
<div> </div>
</div>
<div style="background-color:#FFFFFF">
<p>Hello,<br>
</p>
<br>
<div class="x_moz-cite-prefix">On 21.11.17 10:20, Samuel F.
wrote:<br>
</div>
<blockquote type="cite">
<style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div id="x_divtagdefaultwrapper" dir="ltr"
style="font-size:12pt; color:#000000;
font-family:Calibri,Helvetica,sans-serif">
<p>Hi Daniel,</p>
<p><br>
</p>
<p>First, I'd just like to say thanks and let you know we
are very grateful for the KEMI framework. We have
developed three small applications running on
python KEMI in production serving calls every day
successfully without any issues at all. The development
process was very smooth and quick.</p>
</div>
</blockquote>
<br>
thanks for the feedback, really appreciated! It is good to
know that KEMI is being used in production and also it shows
its potential for various needs.<br>
<br>
<blockquote type="cite">
<div id="x_divtagdefaultwrapper" dir="ltr"
style="font-size:12pt; color:#000000;
font-family:Calibri,Helvetica,sans-serif">
<p><br>
</p>
<p>I reviewed the documentation and think it's great that
the KEMI framework gets an extensive documentation.</p>
<p><br>
</p>
<p>One thought I had regarding documenting the exported
functions is that I think it's good if they are exported
to the docs automatically from the source code. My
opinion is that it is better to have documentation that
reflects the current state of the source code rather
than having stale/out-of-date documentation.</p>
<p><br>
</p>
<p>Perhaps having a parser that locates all the exported
functions, lists them in appropriate modules with the
return value and then a link to the actual modules
documentation?</p>
</div>
</blockquote>
<br>
There is an RPC command that lists the exported KEMI functions
for a running Kamailio. It reflects exactly what functions are
available from the kemi framework internal structure. This is
like an auto discovery, it is done automatically.<br>
<br>
Addition docs can be added in the code using doxygen, however,
while that is good for short descriptions, I don't find it
good to add extensive docs and especially usage examples in
the code. Also, from past experiences, non-developer users
tend not to look at the code, therefore the improvements to
docs in code from general users are very low.<br>
<br>
Anyhow, this tutorial was started with the initial goal of
covering the KEMI framework in general, and the special
functions. For the functions exported by modules I added only
the acc as an example (which is also a skeleton at this
moment).<br>
<br>
As I said, I am open for suggestions on how to do the docs for
kemi functions from modules. Your proposal with using somehow
the code is not like being dismissed, I just expressed my
opinions based. Contributions to parse the code and extract
prototypes are of course welcome.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
<blockquote type="cite">
<div id="x_divtagdefaultwrapper" dir="ltr"
style="font-size:12pt; color:#000000;
font-family:Calibri,Helvetica,sans-serif">
<p><br>
</p>
<p>// Samuel</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font
style="font-size:11pt" face="Calibri, sans-serif"
color="#000000"><b>From:</b> sr-users <a
class="x_moz-txt-link-rfc2396E"
href="mailto:sr-users-bounces@lists.kamailio.org"
moz-do-not-send="true">
<sr-users-bounces@lists.kamailio.org></a> on
behalf of Daniel-Constantin Mierla <a
class="x_moz-txt-link-rfc2396E"
href="mailto:miconda@gmail.com" moz-do-not-send="true">
<miconda@gmail.com></a><br>
<b>Sent:</b> Monday, November 20, 2017 4:11:54 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List; Kamailio
(SER) - Devel Mailing List<br>
<b>Subject:</b> [SR-Users] Kamailio KEMI Framework
Tutorial</font>
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span
style="font-size:10pt">
<div class="x_PlainText">Hello,<br>
<br>
I started a tutorial for Kamailio KEMI Framework
written in markdown<br>
format targeting use of mkdocs. It is published on
github as part of<br>
kamailio-docs repository:<br>
<br>
*<br>
<a
href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio-docs%2Ftree%2Fmaster%2Fkamailio-kemi-framework&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=MuTy1ZgjcDEbQdHTGA2LpO1sKUDAxxo%2BupwGr%2BBspCE%3D&reserved=0"
moz-do-not-send="true">https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio-docs%2Ftree%2Fmaster%2Fkamailio-kemi-framework&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=MuTy1ZgjcDEbQdHTGA2LpO1sKUDAxxo%2BupwGr%2BBspCE%3D&reserved=0</a><br>
<br>
The mkdocs build (to browse and read) is online at:<br>
<br>
* <a
href="https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fkamailio.org%2Fdocs%2Ftutorials%2Fdevel%2Fkamailio-kemi-framework%2F&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=FHJ1zANtLQI6o2%2F1wFPFYfu1B94JlQ%2FHTLDbaVp7dUg%3D&reserved=0"
moz-do-not-send="true">
https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fkamailio.org%2Fdocs%2Ftutorials%2Fdevel%2Fkamailio-kemi-framework%2F&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=FHJ1zANtLQI6o2%2F1wFPFYfu1B94JlQ%2FHTLDbaVp7dUg%3D&reserved=0</a><br>
<br>
It is work in progress and contributions from the
community are more<br>
than welcome -- doing push requests on github
project is the recommended<br>
way for contributions:<br>
<br>
* <a
href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio-docs%2F&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=utRI9tOvpEuyBWFU70KaBaod6URNk0ju4rTSQl%2FhO3I%3D&reserved=0"
moz-do-not-send="true">
https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio-docs%2F&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=utRI9tOvpEuyBWFU70KaBaod6URNk0ju4rTSQl%2FhO3I%3D&reserved=0</a><br>
<br>
The main goal is document the role of KEMI, its
benefits and how it can<br>
be used. It addition it should cover the list of
functions exported to<br>
KEMI by core as well as special KEMI functions.<br>
<br>
Regarding the functions exported by kamailio modules
to KEMI I added as<br>
an skeleton the ones exported by acc module.
However, I am not sure if<br>
we should do it there or add them to the existing
docs of the modules.<br>
Opinions on this?!?<br>
<br>
Cheers,<br>
Daniel<br>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a
href="https://nam02.safelinks.protection.outlook.com/?url=www.twitter.com%2Fmiconda&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=%2F1Fg1476daehbTE4jVNmQ1%2BQro52j%2Fy6maGN8HZmHjU%3D&reserved=0"
moz-do-not-send="true">https://nam02.safelinks.protection.outlook.com/?url=www.twitter.com%2Fmiconda&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=%2F1Fg1476daehbTE4jVNmQ1%2BQro52j%2Fy6maGN8HZmHjU%3D&reserved=0</a>
-- <a
href="https://nam02.safelinks.protection.outlook.com/?url=www.linkedin.com%2Fin%2Fmiconda&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=WytUIkS%2FT0cdu%2BEMhSLz8TFhkn2PADOVGEjnHF5d2lE%3D&reserved=0"
moz-do-not-send="true">
https://nam02.safelinks.protection.outlook.com/?url=www.linkedin.com%2Fin%2Fmiconda&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=WytUIkS%2FT0cdu%2BEMhSLz8TFhkn2PADOVGEjnHF5d2lE%3D&reserved=0</a><br>
Kamailio Advanced Training - <a
href="https://nam02.safelinks.protection.outlook.com/?url=www.asipto.com&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=b8D9EWNFf5eocdwbjZDu8nKmFF777nNE5yknicVgDKs%3D&reserved=0"
moz-do-not-send="true">
https://nam02.safelinks.protection.outlook.com/?url=www.asipto.com&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=b8D9EWNFf5eocdwbjZDu8nKmFF777nNE5yknicVgDKs%3D&reserved=0</a><br>
Kamailio World Conference - May 14-16, 2018 - <a
href="https://nam02.safelinks.protection.outlook.com/?url=www.kamailioworld.com&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=X7KEbj5w3kLSiCPrpgnrdoCITpeBiWPfAeYFyY2yMhk%3D&reserved=0"
moz-do-not-send="true">
https://nam02.safelinks.protection.outlook.com/?url=www.kamailioworld.com&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=X7KEbj5w3kLSiCPrpgnrdoCITpeBiWPfAeYFyY2yMhk%3D&reserved=0</a><br>
<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a class="x_moz-txt-link-abbreviated"
href="mailto:sr-users@lists.kamailio.org"
moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=HLJ5knbTzvZ2EFRpdNEPawUUy5ArJVL6HVqitepIM2Q%3D&reserved=0"
moz-do-not-send="true">https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.kamailio.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fsr-users&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7C226fe2242ed4436c13fa08d53029444d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636467876150276887&sdata=HLJ5knbTzvZ2EFRpdNEPawUUy5ArJVL6HVqitepIM2Q%3D&reserved=0</a><br>
</div>
</span></font></div>
</blockquote>
<br>
<pre class="x_moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="x_moz-txt-link-abbreviated" href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.twitter.com%2Fmiconda&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7Cb0ef8c659a014ebc3bbc08d530eb0520%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636468708318318423&sdata=%2B6XNLL0f7NWcJWExn7P%2FBQSdjfry6ku79GWr1C9HFyA%3D&reserved=0" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="x_moz-txt-link-abbreviated" href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fmiconda&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7Cb0ef8c659a014ebc3bbc08d530eb0520%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636468708318318423&sdata=gctVv3a%2Fyt6K%2F5u8cdxDPOVCXpjAFtWYWdi0edqlQaE%3D&reserved=0" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="x_moz-txt-link-abbreviated" href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.asipto.com&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7Cb0ef8c659a014ebc3bbc08d530eb0520%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636468708318318423&sdata=PUjvVlxZ6%2B6i%2BVX1uyHDP7EHF4dbYgozNjlFRJMJICg%3D&reserved=0" moz-do-not-send="true">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="x_moz-txt-link-abbreviated" href="https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kamailioworld.com&data=02%7C01%7Csamuel_is_kewl%40hotmail.com%7Cb0ef8c659a014ebc3bbc08d530eb0520%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636468708318318423&sdata=n7wEMwvt38VIugGTLcT9mBZMNLCCaeWgYKDWtapcnVc%3D&reserved=0" moz-do-not-send="true">www.kamailioworld.com</a></pre>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com" moz-do-not-send="true">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com" moz-do-not-send="true">www.kamailioworld.com</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>