<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>if you want to do routing in lua via kemi, the kamailio.cfg has
only the passive part (global parameters, loading modules and
modparams) and the active part (routing blocks) is a separate file
written in the desired scripting language (e.g., lua). See
examples:</p>
<p> -
<a class="moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/blob/master/misc/examples/kemi/kamailio-basic-kemi.cfg">https://github.com/kamailio/kamailio/blob/master/misc/examples/kemi/kamailio-basic-kemi.cfg</a></p>
<p> -
<a class="moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/blob/master/misc/examples/kemi/kamailio-basic-kemi-lua.lua">https://github.com/kamailio/kamailio/blob/master/misc/examples/kemi/kamailio-basic-kemi-lua.lua</a></p>
<p>If you still want to have the native kamailio.cfg with its
routing blocks, but executed some Lua scripts inline, see app_lua
exported functions:</p>
<p> -
<a class="moz-txt-link-freetext" href="http://www.kamailio.org/docs/modules/5.1.x/modules/app_lua.html#app_lua.f.lua_run">http://www.kamailio.org/docs/modules/5.1.x/modules/app_lua.html#app_lua.f.lua_run</a></p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 02.08.17 13:28, Yuriy Gorlichenko
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CABSP_Vfr6nTX2SUd+xoQ4JpYV=zn7HGJyHnvbDgg+bEeFdvWXw@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">Hi, no<br>
I wanna include lua routes part at existing kamailio.cfg file<br>
<br>
Just wanna rewrite some route with lua code using kemi because
lua more flexible for my needs, but want to call this route at
the cfg file.<br>
<br>
like <br>
kamailio.cfg<br>
...<br>
route {<br>
[MY_SUPER_ROUTE_IN_LUA]<br>
}<br>
...<br>
<br>
Where MY_SUPER_ROUTE_IN_LUA is a route written with kemi on
lua language.<br>
<br>
<br>
<div class="gmail_quote">2017-08-02 14:10 GMT+03:00
Daniel-Constantin Mierla <span dir="ltr"><<a
href="mailto:miconda@gmail.com" target="_blank"
moz-do-not-send="true">miconda@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hello,<br>
<div>
<div class="gmail-m_-6876203992600536125h5"><br>
<br>
On 02.08.17 12:02, Yuriy Gorlichenko wrote:<br>
> Hello. I found how to implement lua routimg logic
with<br>
> cfgengine but didn't found how to include cimple
route in lua at the<br>
> cfg file<br>
><br>
> Presume i have routing logic and want to include<br>
> my_super_custom_route written with Kemo on lua.
How i need to set up<br>
> my config for it work with both engines?<br>
><br>
</div>
</div>
I am not sure I understand what you try to do. The path to
yiour Lua<br>
script with routing logic has to be set via modparam of
app_lua module.<br>
<br>
Are you trying to include a lua file in another lua file?<br>
<br>
Cheers,<br>
Daniel<br>
<span class="gmail-m_-6876203992600536125HOEnZb"><font
color="#888888"><br>
--<br>
Daniel-Constantin Mierla<br>
<a href="http://www.twitter.com/miconda"
rel="noreferrer" target="_blank"
moz-do-not-send="true">www.twitter.com/miconda</a>
-- <a href="http://www.linkedin.com/in/miconda"
rel="noreferrer" target="_blank"
moz-do-not-send="true">www.linkedin.com/in/miconda</a><br>
Kamailio Advanced Training - <a
href="http://www.asipto.com" rel="noreferrer"
target="_blank" moz-do-not-send="true">www.asipto.com</a><br>
Kamailio World Conference - <a
href="http://www.kamailioworld.com" rel="noreferrer"
target="_blank" moz-do-not-send="true">www.kamailioworld.com</a><br>
<br>
</font></span></blockquote>
</div>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<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>
<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 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
</body>
</html>