<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Maybe you can work around by storing
      these parameters in htable, or DB or somewhere else and fetch it
      from there when needed. (eg you can reload or change htable with
      RPC))<br>
      <br>
      Am 27.05.2014 11:39, schrieb Rahul MathuR:<br>
    </div>
    <blockquote
cite="mid:CAM8wsqL2iwRW0mqRitDZm=zJ7YMV+gwwgSLSAPTe0j5N+kcCYw@mail.gmail.com"
      type="cite">
      <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"><br>
        <br>
        <div class="gmail_quote">On Tue, May 27, 2014 at 9:30 AM,
          Daniel-Constantin Mierla <span dir="ltr"><<a
              moz-do-not-send="true" 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 class="h5"><br>
                  <br>
                  <div>On 27/05/14 09:48, Rahul MathuR wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <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 moz-do-not-send="true" href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a>
<a moz-do-not-send="true" 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 class="HOEnZb"><font color="#888888">
</font></span></pre>
                <span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
              <span class="HOEnZb"><font color="#888888"> <br>
                  <pre cols="72">-- 
Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" 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 moz-do-not-send="true"
              href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
            <a moz-do-not-send="true"
              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>
        Warm Regds.<br>
        MathuRahul<br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>