<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    On 3/12/12 10:11 AM, Klaus Darilion wrote:
    <blockquote cite="mid:4F5DBDD5.7000509@pernau.at" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Hi!<br>
      <br>
      Kamailio can count the number of calls per gateway and use the
      least loaded one.</blockquote>
    <br>
    not sure this is out of the box with carrier route module, but
    dispatcher module has call load balancing. Another option to track
    active calls per destination is using dialog module and profiles.<br>
    <br>
    However, I would go with round robin and the failure route solution
    as pointed by Klaus, it is more flexible and lightweight.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote cite="mid:4F5DBDD5.7000509@pernau.at" type="cite">
      Another approach, which is more reliable uses failure-routing.
      This means, the load balancer chooses any of the gateways, but if
      the gateway response with a certain error code, the
      "failure_route" will choose the next gateway and re-sends the
      request. You can do the failure routing multiple times until you
      ran out of gatways.<br>
      <br>
      regards<br>
      Klaus<br>
      <br>
      Am 12.03.2012 10:00, schrieb Sasa Vilic:
      <blockquote cite="mid:4F5DBB45.1090807@gmail.com" type="cite">
        <meta http-equiv="content-type" content="text/html;
          charset=ISO-8859-1">
        <div class="moz-text-flowed" style="font-family: -moz-fixed;
          font-size: 14px;" lang="x-western">Hello, <br>
          <br>
          I have read here about load balancing between multiple
          gateways by using carrierroute module, but there is one
          particular question for which I found no answer. <br>
          <br>
          Let's say I have two asterisk servers (X und Y), that are my
          gateways to PSTN. Let we do it simple. Let's say that each
          gateway supports only one outgoing call at the time and there
          is no incoming calls from PSTN. Now: <br>
          <br>
          Bob calls one number and Kamailio uses X gateway. <br>
          Alice calls other number and Kamailio uses Y gateway. <br>
          Alice terminates the call. <br>
          Alice place a new call, but Bob's call is still in progress. <br>
          If we were used round robin algorithm, Kamailio would then use
          X gateway, but X gateway is currently occupied. What shell
          happen now? <br>
          And what if Alice didn't tear down call ordinary? What if it
          her SIP client simply crashed? (Then kamailio would think that
          there is now free gateway) <br>
          <br>
          So the main question is: can kamailio know/detect, how much
          calls are going over one particular gateway and what can be
          done when limit for this gateway is reached? <br>
          <br>
          Thank you in advance. <br>
          <br>
          Kind Regards, <br>
          Sasa Vilic <br>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
      </blockquote>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
<a class="moz-txt-link-freetext" href="http://www.asipto.com/index.php/kamailio-advanced-training/">http://www.asipto.com/index.php/kamailio-advanced-training/</a></pre>
  </body>
</html>