<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    from a thread in sip-router user mailing list:
    <a class="moz-txt-link-freetext" href="http://lists.sip-router.org/pipermail/sr-users/2012-March/072657.html">http://lists.sip-router.org/pipermail/sr-users/2012-March/072657.html</a><br>
    <br>
    This thread talks about reloading lua scripts in runtime context.<br>
    <br>
    <pre>&gt;&gt;<i> I'm starting to play with lua scripting in Kamailio. It's really cool, 
</i>&gt;&gt;<i> some complex stuff in the script becomes really easy this way. The 
</i>&gt;&gt;<i> script is becoming quite big, therefore I'd like to use lua_run 
</i>&gt;&gt;<i> instead of lua_dofile. My doubt is pretty  basic: if i load a script 
</i>&gt;&gt;<i> in memory at startup via the "load" parameter and the script is 
</i>&gt;&gt;<i> modifed afterwards, is there any way to reload the module so the 
</i>&gt;&gt;<i> script is reread?
</i>&gt;the two contexts created by app_lua were designed one for loading at 
&gt;startup and the other for reloading every time. Reloading on demand at 
&gt;runtime is not possible. I thought of checking the timestamp of the 
&gt;script, but can be a bit risky if saving on intermediary state during 
&gt;updates. The scripts are loaded in each process, sending a mi/rpc 
&gt;command will require to do some inter-process signaling. Both doable, 
&gt;not in my short term plans, though, if someone is contributing, will be 
&gt;appreciated.</pre>
    <br>
    I have attached a test patch to start playing with this task.<br>
    <br>
    A new function app_lua.runfile is created, and called via sercmd
    tool to load some lua script in runtime context.<br>
    <br>
    Some signaling is needed so every kamailio child process would
    reload the script too.<br>
    <br>
    Could you give some clues about performing this interprocess
    signaling suitably for kamailio?<br>
    <br>
    Best regards,<br>
    Vicente.<br>
    <br>
    <br>
  </body>
</html>