<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <tt>See the second option, where you copy only the domain part of
      URIs.<br>
      <br>
      $rd = $dd;<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>
    <br>
    On 06/11/2012 03:28 PM, dileep r wrote:
    <blockquote
cite="mid:CAH0yDSR52t+gvNyAAFs7LGetAw1djDTOq2QUidMbJ6jPiZPExA@mail.gmail.com"
      type="cite">is there a way to retain the user name?<br>
      <br>
      <div class="gmail_quote">On Mon, Jun 11, 2012 at 4:34 PM,
        Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
            moz-do-not-send="true" href="mailto:bogdan@opensips.org"
            target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#ffffff" text="#000000"> <tt>Actually the LB
              function changes only the destination URI, not the RURI -
              my bad. If you want to push the change into the RURI also,
              you can do :<br>
              &nbsp;&nbsp;&nbsp; $ru = $du ;&nbsp; (change the entire RURI with value of
              destination URI - you will loose the username part)<br>
              &nbsp;&nbsp;&nbsp; $rd = $dd ;&nbsp; (push only the domain part from
              destination uri to RURI)<br>
              <br>
              Do the above after LB function and before the t_relay();<br>
              <br>
              Regards,<br>
            </tt>
            <div class="im">
              <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
              <br>
            </div>
            <div>
              <div class="h5"> On 06/11/2012 01:55 PM, dileep r wrote:
                <blockquote type="cite"><span>Bogdan, i would completely
                    agree with you. I&nbsp;don't&nbsp;see the RURI being changed
                    in the INVITE request.below is the script snippet
                    for load_balance. please let me know is there any
                    thing to be corrected.&nbsp;</span>
                  <div> <br>
                  </div>
                  <div>
                    <div style="color: rgb(80, 0, 80);">
                      <div>&nbsp;if (!load_balance("1","calls")) {</div>
                      <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        send_reply("503","Service Unavailable");</div>
                      <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;</div>
                      <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>
                      <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else{</div>
                      <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # dst URI points to the new
                        destination</div>
                      <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xlog("sending call to
                        $du\n");</div>
                    </div>
                    <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# t_relay();</div>
                    <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;t_relay();</div>
                    <div>}</div>
                  </div>
                  <br>
                  <div class="gmail_quote">On Mon, Jun 11, 2012 at 4:23
                    PM, dileep r <span dir="ltr">&lt;<a
                        moz-do-not-send="true"
                        href="mailto:dileep0206@gmail.com"
                        target="_blank">dileep0206@gmail.com</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin: 0pt
                      0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
                      204, 204); padding-left: 1ex;">Bogdan, i would
                      completely agree with you. I&nbsp;don't&nbsp;see the RURI
                      being changed in the INVITE request.below is the
                      script snippet for load_balance. please let me
                      know is there any thing to be corrected.&nbsp;
                      <div> <br>
                      </div>
                      <div>
                        <div>
                          <div>&nbsp;if (!load_balance("1","calls")) {</div>
                          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                            send_reply("503","Service Unavailable");</div>
                          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;</div>
                          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div>
                          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else{</div>
                          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # dst URI points to the
                            new destination</div>
                          <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; xlog("sending call to
                            $du\n");</div>
                        </div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# t_relay();</div>
                        <div> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;t_relay();</div>
                        <div>
                          <div>
                            <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</div>
                            <div><br>
                            </div>
                            <br>
                            <div class="gmail_quote">On Mon, Jun 11,
                              2012 at 4:13 PM, Bogdan-Andrei Iancu <span
                                dir="ltr">&lt;<a moz-do-not-send="true"
                                  href="mailto:bogdan@opensips.org"
                                  target="_blank">bogdan@opensips.org</a>&gt;</span>
                              wrote:<br>
                              <blockquote class="gmail_quote"
                                style="margin: 0pt 0pt 0pt 0.8ex;
                                border-left: 1px solid rgb(204, 204,
                                204); padding-left: 1ex;">
                                <div bgcolor="#ffffff" text="#000000"> <tt>Pleas

                                    keep the list CC'ed to this
                                    discussion !<br>
                                    <br>
                                    The LB function changes only the
                                    RURI part from INVITE - it does not
                                    change TO headers. Normally there is
                                    no reason to change it at all, as
                                    routing is done based on RURI only.<br>
                                    <br>
                                    Regards,<br>
                                  </tt>
                                  <div>
                                    <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                                    <br>
                                  </div>
                                  <div>
                                    <div> On 06/11/2012 01:40 PM, dileep
                                      r wrote:
                                      <blockquote type="cite">Hi Bogdan,
                                        i did use
                                        t_relay()&nbsp;previously&nbsp;and the SIP
                                        requested was routed to
                                        the&nbsp;destination&nbsp;URI . but the
                                        RURI and 'To' header did not
                                        change as the destination URI in
                                        the INVITE request. I'm i doing
                                        any thing wrong here?
                                        <div> <br>
                                        </div>
                                        <div>Thanks</div>
                                        <div>Dileep<br>
                                          <br>
                                          <div class="gmail_quote">On
                                            Mon, Jun 11, 2012 at 3:32
                                            PM, Bogdan-Andrei Iancu <span
                                              dir="ltr">&lt;<a
                                                moz-do-not-send="true"
                                                href="mailto:bogdan@opensips.org"
                                                target="_blank">bogdan@opensips.org</a>&gt;</span>
                                            wrote:<br>
                                            <blockquote
                                              class="gmail_quote"
                                              style="margin: 0pt 0pt 0pt
                                              0.8ex; border-left: 1px
                                              solid rgb(204, 204, 204);
                                              padding-left: 1ex;">
                                              <div bgcolor="#ffffff"
                                                text="#000000"> <tt>The
                                                  LB function does not
                                                  send out the INVITE,
                                                  just sets the RURI to
                                                  a one of the
                                                  destinations (from LB
                                                  set) - after doing LB,
                                                  you need to do
                                                  standard relay from
                                                  script (via t_relay()
                                                  ).<br>
                                                  <br>
                                                  Regards,<br>
                                                </tt>
                                                <div>
                                                  <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                                                  <br>
                                                </div>
                                                <div>
                                                  <div> On 06/11/2012
                                                    12:45 PM, dileep r
                                                    wrote:
                                                    <blockquote
                                                      type="cite">Hi
                                                      Bogdan, is there
                                                      any logging
                                                      mechanism to check
                                                      why the
                                                      load_balance() ,
                                                      API not routing
                                                      the INVITE request
                                                      to destination
                                                      URI.<br>
                                                      <br>
                                                      <div
                                                        class="gmail_quote">On

                                                        Mon, Jun 11,
                                                        2012 at 3:08 PM,
                                                        Bogdan-Andrei
                                                        Iancu <span
                                                          dir="ltr">&lt;<a
moz-do-not-send="true" href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span>
                                                        wrote:<br>
                                                        <blockquote
                                                          class="gmail_quote"
                                                          style="margin:
                                                          0pt 0pt 0pt
                                                          0.8ex;
                                                          border-left:
                                                          1px solid
                                                          rgb(204, 204,
                                                          204);
                                                          padding-left:
                                                          1ex;">
                                                          <div
                                                          bgcolor="#ffffff"
                                                          text="#000000">
                                                          <tt>Hi Dileep,<br>
                                                          <br>
                                                          Check some
                                                          working
                                                          examples:<br>
                                                          <br>
                                                          &nbsp; - LB
                                                          tutorial - <a
moz-do-not-send="true"
                                                          href="http://www.opensips.org/Resources/DocsTutLoadbalancing"
target="_blank">http://www.opensips.org/Resources/DocsTutLoadbalancing</a><br>
                                                          &nbsp; - use
                                                          "menuconfig"
                                                          to generate a
                                                          script for LB
                                                          scenario - <a
moz-do-not-send="true"
                                                          href="http://www.opensips.org/Resources/GettingStartedTut"
target="_blank">http://www.opensips.org/Resources/GettingStartedTut</a><br>
                                                          <br>
                                                          Regards,<br>
                                                          Bogdan<br>
                                                          </tt>
                                                          <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                                                          <div>
                                                          <div> <br>
                                                          On 06/11/2012
                                                          10:50 AM,
                                                          dileep r
                                                          wrote: </div>
                                                          </div>
                                                          <blockquote
                                                          type="cite">
                                                          <div>
                                                          <div>HI all,
                                                          <div>&nbsp; I'm
                                                          trying to set
                                                          up openSips
                                                          with LB module
                                                          enabled. I
                                                          have done the
                                                          all the
                                                          required
                                                          configuration
                                                          for LB. The
                                                          load_balance()
                                                          API returns
                                                          success, but
                                                          i'm not
                                                          receiving the
                                                          INVITE request
                                                          to my
                                                          destination
                                                          server as
                                                          configured in
                                                          the DB. If any
                                                          one has faced
                                                          similar
                                                          problems or
                                                          know why this
                                                          might be
                                                          happening,please
                                                          let me know ?</div>
                                                          <div><br>
                                                          </div>
                                                          <div><br>
                                                          </div>
                                                          <div>Thanks</div>
                                                          <div>Dileep</div>
                                                          </div>
                                                          </div>
                                                          <pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                                                          </blockquote>
                                                          </div>
                                                        </blockquote>
                                                      </div>
                                                      <br>
                                                    </blockquote>
                                                  </div>
                                                </div>
                                              </div>
                                            </blockquote>
                                          </div>
                                          <br>
                                        </div>
                                      </blockquote>
                                    </div>
                                  </div>
                                </div>
                              </blockquote>
                            </div>
                            <br>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </blockquote>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
  </body>
</html>