<div dir="ltr">Ok, thanks Carlos !!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 29, 2014 at 7:00 PM, Carlos Ruiz Díaz <span dir="ltr"><<a href="mailto:carlos.ruizdiaz@gmail.com" target="_blank">carlos.ruizdiaz@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Rahul,<div><br></div><div>currently, there's no way of updating those values on-the-fly. That information is stored in memory and after a restart everything gets lost, so you have to make sure no calls are active before doing the restart. This is only true for cnxcc, and not for dialog module for example, which has the option of backing everything up to a permanent storage such a database.</div>

<div><br></div><div>Regards,</div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Tue, May 27, 2014 at 4:39 AM, Rahul MathuR <span dir="ltr"><<a href="mailto:rahul.ultimate@gmail.com" target="_blank">rahul.ultimate@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello Daniel,</div><div> </div><div>Thanks for replying.</div><div> </div><div>My query is purely from the perspective of updating few parameters (my apologies for using words which gave you an impression that I want to change the logic).</div>


<div>The parameters I'm focussing on are:</div><div><p>a) $var(max_chan) </p><p>b) $var(client)</p><p>as used under CNXCC module's channel limitation.</p><p> </p><p>So if I want to update the value of max_chan from (lets say) 50 to 100 and client from "bob" to "joe". How to reload these new values ?</p>


<p> </p><p> </p></div></div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On Tue, May 27, 2014 at 9:30 AM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Hello,<br>
    <br>
    the config logic cannot be reloaded. There are options to change
    various parameters at runtime without restart.<br>
    <br>
    The logic can be reloaded if it is written in Lua (or, I guess, in
    some other embedded scripting language).<br>
    <br>
    On the other hand, restarting kamailio doesn't affect ongoing calls
    at all, and extremely rarely affects initiated transactions, they
    typically recover due to retransmissions.<br>
    <br>
    Cheers,<br>
    Daniel<div><div><br>
    <br>
    <div>On 27/05/14 09:48, Rahul MathuR wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div>
      <div dir="ltr">
        <div>Hello,</div>
        <div> </div>
        <div>Is it possible to reload kamailio.cfg at the runtime after
          doing few modifications on the business rules laid under CNXCC
          module.</div>
        <div> </div>
        <div>Eg:</div>
        <p>#!ifdef CNXCC_CHANNEL </p>
        <div>
        </div>
        <p>xlog("L_INFO", "Setting up channel based credit control");</p>
        <div>
        </div>
        <p>$var(max_chan) = 2;</p>
        <div>
        </div>
        <p>$var(retcode) = cnxcc_set_max_channels("$var(client)",
          "$var(max_chan)");</p>
        <div>
        </div>
        <p>if ($var(retcode) == -1) {</p>
        <div>
        </div>
        <p>xlog("Error setting up credit control");</p>
        <div>
        </div>
        <p>return;</p>
        <div>
        </div>
        <p>}</p>
        <div>
        </div>
        <p>$var(count) = -1;</p>
        <div>
        </div>
        <p>if (!cnxcc_get_channel_count("$var(client)", "$var(count)"))
          {</p>
        <div>
        </div>
        <p>xlog("Error getting customer's channel count");</p>
        <div>
        </div>
        <p>}</p>
        <div>
        </div>
        <p>xlog("L_INFO", "CNXCC ROUTE: $var(client) has $var(count)
          call(s)");</p>
        <div>
        </div>
        <p>if ($var(retcode) < -1) {</p>
        <div>
        </div>
        <p>xlog("Too many channels for customer");</p>
        <div>
        </div>
        <p>sl_send_reply(403, "Forbidden");</p>
        <div>
        </div>
        <p>if (!cnxcc_terminate_all("$var(client)")) {</p>
        <div>
        </div>
        <p>xlog("Error terminating customer's calls");</p>
        <div>
        </div>
        <p>}</p>
        <div>
        </div>
        <p>exit;</p>
        <div>
        </div>
        <p>}</p>
        <div>
          #!endif</div>
        <div>******************************************************</div>
        <div> </div>
        <div>Now I want to change the value of max_chan on the fly. Does
          this step neccassitates a restart of kamailio process as a
          whole ? If no, then could somebody please guide me how to
          achieve this ?</div>
        <div> </div>
        <div> </div>
        <div>Thanks !</div>
        <div> </div>
        <div> </div>
        <div> </div>
        <div><br clear="all">
          <br>
          -- <br>
          Warm Regds.<br>
          MathuRahul<br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
sr-dev mailing list
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><span><font color="#888888">
</font></span></pre><span><font color="#888888">
    </font></span></blockquote><span><font color="#888888">
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
  </font></span></div>

<br>_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br></div></div>Warm Regds.<br>MathuRahul<br>
</div>
<br>_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br></div></div><div dir="ltr">Carlos<div><a href="http://caruizdiaz.com" target="_blank">http://caruizdiaz.com</a></div><div><a href="http://ngvoice.com" target="_blank">http://ngvoice.com</a></div>

<div><a href="tel:%2B52%2055%203048%203303" value="+525530483303" target="_blank">+52 55 3048 3303</a></div></div>
</div>
<br>_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Warm Regds.<br>MathuRahul<br>
</div>