<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>adding a bit more on this topic: it should be also possible to
execute native config routing blocks from KEMI using
KSR.cfgutils.route_if_exists() or KSR.route().</p>
<p>Just test before when combining use of route or event_route
(especially for this ones) from KEMI, to be sure that the
conditions in the c code do not prevent execution of particular
native config blocks when cfg engine is set to a KEMI interpreter.
Open an issue on tracking whenever such case if found in order to
be sorted out properly.<br>
</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 23.10.20 07:19, Arsen Semenov wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAC3hFApVUg4mWzEz4XWNkLdDD9qnaX--H=XSdGpb1C1wetex_g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi Marcin,<br>
As a bit addition to the above comments<br>
once you set cfgengine to your prefered lang the routes become
the language's functions which should be defined, but you still
can keep some "event-routes" in native kamailio language, they
are being initialised at startup. <br>
If you migrate a large script, I'd suggest you split it into
several logically or by route divided scripts, so by this way
you can load/reload and troubleshoot them separately. Testing
framework could be much help. <br>
<div><br>
</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, Oct 22, 2020 at 10:13
PM Marcin Kowalczyk <a class="moz-txt-link-rfc2396E" href="mailto:marcin.kowalczyk@channels.app"><marcin.kowalczyk@channels.app></a>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">Hi,
<div><br>
</div>
<div> Thanks for your reply. </div>
<div>I have quite a large and complex kamailio.cfg and it
would be quite a challenging task to migrate it in one go.
This is the reason why I was thinking to do it block by
block to be sure it will not break a logic. </div>
<div><br>
</div>
<div>Regards</div>
<div>Marcin</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Oct 21, 2020 at
8:16 PM Henning Westerholt <<a
href="mailto:hw@skalatan.de" target="_blank"
moz-do-not-send="true">hw@skalatan.de</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div lang="DE">
<div>
<p class="MsoNormal"><span>Hello,</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span lang="EN-GB">other people
might be able to add more, but what you can
certainly can do is to have a usual kamailio.cfg
and then use e.g. lua_run(..) to execute some
functions defined in the loaded lua script.</span></p>
<p class="MsoNormal"><span lang="EN-GB">In my opinion
you will add some more complexity if you start to
mix also the routes, but it might be fine for a
certain migration period.</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Cheers,</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">-- </span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning
Westerholt –
</span><span><a href="https://skalatan.de/blog/"
target="_blank" moz-do-not-send="true"><span
style="color:rgb(5,99,193)" lang="EN-GB">https://skalatan.de/blog/</span></a></span><span
lang="EN-GB"></span></p>
<p class="MsoNormal"><span lang="EN-GB">Kamailio
services –
</span><span><a href="https://gilawa.com/"
target="_blank" moz-do-not-send="true"><span
style="color:rgb(5,99,193)" lang="EN-GB">https://gilawa.com</span></a></span><span>
<span lang="EN-GB"></span></span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<div
style="border-right:none;border-bottom:none;border-left:none;border-top:1pt
solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b>
sr-users <<a
href="mailto:sr-users-bounces@lists.kamailio.org"
target="_blank" moz-do-not-send="true">sr-users-bounces@lists.kamailio.org</a>>
<b>On Behalf Of </b>Marcin Kowalczyk<br>
<b>Sent:</b> Wednesday, October 21, 2020 7:25 PM<br>
<b>To:</b> <a
href="mailto:sr-users@lists.kamailio.org"
target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<b>Subject:</b> [SR-Users] KEMI and Native mixing</p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"> </p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hi,</p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> </p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> Is
it possible to mix both KEMI (lua) and Native
configs in one kamailio instance? So some blocks
are called from native script and some others
from KEMI (lua)? </p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"> </p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Marcin</p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank"
moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>Arsen Semenov<br>
</div>
<div><br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<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>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
</body>
</html>