<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix"><tt>Hi Kaan,<br>
        <br>
        I'm glad you managed to fix all your issues and now you have a
        successfully working configuration.<br>
        <br>
        Regards,<br>
      </tt>
      <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 20.10.2014 22:09, Kaan Dandin wrote:<br>
    </div>
    <blockquote
      cite="mid:1413832141.7284.YahooMailNeo@web121505.mail.ne1.yahoo.com"
      type="cite">
      <div style="color:#000; background-color:#fff;
        font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
        Lucida Grande, sans-serif;font-size:16px">
        <div class="" style=""><span class="" style="">Hi Bogdan,</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; font-style: normal; background-color:
          transparent;" class=""><span class="" style=""><br class=""
              style="">
          </span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; font-style: normal; background-color:
          transparent;" class=""><span class="" style="">With the below
            workaround,  I have managed to make load balancing with
            Opensips dispather module . I am using record_route for
            INVITE message. </span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; font-style: normal; background-color:
          transparent;" class=""><span class="" style="">Thanks a lot
            for your support.</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; font-style: normal; background-color:
          transparent;" class=""><span class="" style="">Kind regards,</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; font-style: normal; background-color:
          transparent;" class=""><span class="" style="">Kaan</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; font-style: normal; background-color:
          transparent;" class=""><span class="" style=""><br class=""
              style="">
          </span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; font-style: normal; background-color:
          transparent;" class=""><span class="" style=""><br class=""
              style="">
          </span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; font-style: normal; background-color:
          transparent;" class=""><span class="" style="font-weight:
            bold;">Related part of Opensips script</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; font-style: normal; background-color:
          transparent;" class=""><span class="" style="font-weight:
            bold;"><br class="" style="">
          </span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; font-style: normal; background-color:
          transparent;" class=""><span class="" style="font-weight:
            bold;">.......</span></div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; font-style: normal; background-color:
          transparent;" class=""><span class="" style="font-weight:
            bold;"><br class="" style="">
          </span></div>
        <div style="background-color: transparent;" class=""><span
            style="font-weight: bold;" class="">        </span><span
            class="">else if (is_method("INVITE")) {</span></div>
        <div style="background-color: transparent;" class=""><span
            class="">                #load_balance("1","pstn");</span></div>
        <div style="background-color: transparent;" class=""><span
            class="">                xlog("xlog_initialinvite");</span></div>
        <div style="background-color: transparent;" class=""><span
            style="background-color: transparent;">               
            if($si=="192.168.2.11") {</span><br>
        </div>
        <div style="background-color: transparent;" class=""><span
            class="">                ds_select_dst("1","1");</span></div>
        <div style="background-color: transparent;" class=""><span
            class="">                }</span></div>
        <div style="background-color: transparent;" class=""><span
            class="">                record_route();</span></div>
        <div style="background-color: transparent;" class=""><span
            class="">                if(!t_relay()) {</span></div>
        <div style="background-color: transparent;" class=""><span
            class="">                sl_reply_error();</span></div>
        <div style="background-color: transparent;" class=""><span
            class="">                xlog("xlog_invitereplyerror");</span></div>
        <div style="background-color: transparent;" class=""><span
            class="">                }</span></div>
        <div style="background-color: transparent;" class=""><span
            class=""></span></div>
        <div style="background-color: transparent;" class=""><span
            class="">                exit;</span></div>
        <div class="" style=""><br class="" style="">
        </div>
        <div class="" style=""><br>
        </div>
        <div class="" style="">.......</div>
        <div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
          HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida
          Grande', sans-serif; font-style: normal; background-color:
          transparent;" class=""><span class="" style=""><br class=""
              style="">
          </span></div>
        <div style="background-color: transparent;" class="">           
              if (loose_route()) {</div>
        <div style="background-color: transparent;" class="">           
              xlog("xlog_loose_route");</div>
        <div style="background-color: transparent;" class="">           
              <span style="background-color: transparent;">if($si=="192.168.2.11")
            {</span></div>
        <div style="background-color: transparent;" class="">           
              t_relay();</div>
        <div style="background-color: transparent;" class="">           
              exit;</div>
        <div style="background-color: transparent;" class="">           
              }</div>
        <div style="background-color: transparent;" class="">           
              else if($si=="192.168.2.3" or $si=="192.168.2.5" ) {</div>
        <div style="background-color: transparent;" class="">           
              $du = "sip:192.168.2.11:4060";</div>
        <div style="background-color: transparent;" class="">           
              append_branch();</div>
        <div style="background-color: transparent;" class="">           
              t_relay();</div>
        <div style="background-color: transparent;" class="">           
              exit;</div>
        <div style="background-color: transparent;" class=""><span
            class="" style=""></span></div>
        <div style="background-color: transparent;" class="">           
              }</div>
        <div class="" style="">.....</div>
        <div class="" style=""><strong class="" style="">ims_bench
            output</strong></div>
        <div class="" style=""><br class="" style="">
           1-   ims_uac-0-   Scenario Screen    - [1-9]: Change Screen -
          6663<br class="" style="">
            Call-rate(length)     Port   Total-time  Total-calls 
          Remote-host<br class="" style="">
             0.0(0 ms)/1.000s   5060      65.32 s           65 
          192.168.2.141:4060(UDP)</div>
        <div class="" style=""> </div>
        <div class="" style="">  0 new calls during 0.287 s period     
          1 ms scheduler resolution<br class="" style="">
            0 calls (limit 0)                      Peak was 32 calls,
          after 45 s<br class="" style="">
            0 Running, 1 Paused, 1 Woken up, 0 Sync<br class="" style="">
            0 out-of-call msg (discarded)        <br class="" style="">
            0 open sockets                        </div>
        <div class="" style=""> </div>
        <div class="" style="">                                
          Messages  Retrans   Timeout   Unexpected-Msg<br class=""
            style="">
           0            [ NOP ]               <br class="" style="">
           1            [ SENDRMT ]         11       <br class=""
            style="">
           2            [ RECVRMT ]         11                  0       
          <br class="" style="">
           3            [ SYNC ]            11       </div>
        <div class="" style=""> </div>
        <div class="" style=""> 4     INVITE ----------&gt; B1,2,4 
          11        0         0        <br class="" style="">
           5        100 &lt;----------         11       
          0                   0        <br class="" style="">
           6        180 &lt;----------         11       
          0                   0        <br class="" style="">
           7        183 &lt;----------         0        
          0                   0        <br class="" style="">
           8        200 &lt;----------         11       
          0                   0        <br class="" style="">
           9        ACK ----------&gt;         11       
          0                            <br class="" style="">
          10        180 &lt;----------         0        
          0                   0        <br class="" style="">
          11      Pause [Exp(2:00)]        
          11                            0        <br class="" style="">
          12        BYE ----------&gt; B3      11        0        
          0        <br class="" style="">
          13        180 &lt;----------         0        
          0                   0        <br class="" style="">
          14        200 &lt;---------- E3,4    11       
          0                   0        </div>
        <div class="" style=""> </div>
        <div class="" style="">15            [ RECVRMT ]        
          11                  0        <br class="" style="">
          ------------------------------ Test Terminated
          --------------------------------</div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>