<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 12.02.18 13:52, Francisco Valentin
      Vinagrero wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:D344618A4B7B0F4ABA8047A07E92D47401F673E662@CERNXCHG51.cern.ch">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1510025990;
        mso-list-type:hybrid;
        mso-list-template-ids:43963732 -38355674 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:31;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Calibri",sans-serif;
        mso-fareast-font-family:Calibri;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hello,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I am configuring a Kamailio node that will
          interface with 3 carriers and will implement Least Cost
          Routing for around 900 destinations.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I have already implemented a quick
          prototype with the LCR module and I have been reading the
          CarrierRoute doc and the CGrates site.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I don’t really need advanced functionality,
          just:<o:p></o:p></p>
        <p class="MsoListParagraph"
          style="text-indent:-.25in;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
            style="mso-list:Ignore">-<span style="font:7.0pt "Times
              New Roman"">         
            </span></span><!--[endif]-->Re-routing to a backup carrier
          when the main one is not available.<o:p></o:p></p>
        <p class="MsoListParagraph"
          style="text-indent:-.25in;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
            style="mso-list:Ignore">-<span style="font:7.0pt "Times
              New Roman"">         
            </span></span><!--[endif]-->Ping with OPTIONS to all
          carriers so I can detect if any of them is not available (à la
          Dispatcher)<o:p></o:p></p>
        <p class="MsoListParagraph"
          style="text-indent:-.25in;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
            style="mso-list:Ignore">-<span style="font:7.0pt "Times
              New Roman"">         
            </span></span><!--[endif]-->Translate prices from a central
          DB to routing priorities.<o:p></o:p></p>
        <p class="MsoListParagraph"
          style="text-indent:-.25in;mso-list:l0 level1 lfo1"><!--[if !supportLists]--><span
            style="mso-list:Ignore">-<span style="font:7.0pt "Times
              New Roman"">         
            </span></span><!--[endif]-->Get some accounting post-call
          info about the routing decision (acc module)<o:p></o:p></p>
        <p class="MsoListParagraph"><o:p> </o:p></p>
        <p class="MsoNormal">So far, while testing the LCR module I have
          had some issues with the rule IDs being integers that
          auto-increment, so the LCR rules need to be referenced from
          the rule_target table using this numeric ID. I can see some
          issues when scaling this to 900 lcr_rules and 2700
          lcr_rule_targets with 3 priorities.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">In addition to that, I think the OPTIONS
          mechanism is just used by the lcr module when a gateway is
          marked as defunct, but the gateways are not actively monitored
          in the normal status. Is this correct?<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I have been considering CarrierRoute, which
          has a slightly simpler table structure, but I can’t find any
          other advantage for my use case. Regarding CGrates, it looks
          great but it looks like it exceeds my current needs.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">For those who have implemented LCR in your
          kamailios, am I missing something regarding performance,
          scalability, etc?<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Are there any newer modules that can
          implement this, or maybe just a dispatcher-on-steroids setup
          will do the trick?<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <br>
      </div>
    </blockquote>
    Look also at drouting module, the latest version should do OPTIONS
    keep alives using keepalive module, otherwise it is a lcr
    implementation as well -- I haven't tested myself the keep alive
    feature, though.<br>
    <br>
    As for me, typically I go in this case for a combination of mtree +
    dispatcher. I have mtree translating from longest prefix to a
    dispatcher group id, inside dispatcher group you can use priority
    based routing. This works just fine even when you end up in several
    dispatcher groups with same destinations but different order based
    on priority per group.<br>
    <br>
    You can even map the prefix in mtree to dispatcher group +
    dispatching algorithm, latest version supports having many columns
    loaded in the value and then you can use script operations to split.<br>
    <br>
    Cheers,<br>
    Daniel<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 - March 5-7, 2018, Berlin - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>