<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi @SamyGo and Bodan,<br>
    <br>
    thank you very much for all your help:)<br>
    <br>
    I think I need a bit more reading about opensips configuration. So I
    will first read few things and that ask questions, I think this
    would be better:)<br>
    <br>
    Thank you very much for all your help!<br>
    <br>
    Reagrds,<br>
    Miha<br>
    <br>
    On 4/4/2012 1:59 PM, Bogdan-Andrei Iancu wrote:
    <blockquote cite="mid:4F7C37B3.7080804@opensips.org" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Currently there is no such function in LB (not even in trunk) - I
      added a "feature request" on tracker, so we will add it in the
      next versions.<br>
      <br>
      Regards,<br>
      Bogdan<br>
      <br>
      On 04/04/2012 12:08 PM, SamyGo wrote:
      <blockquote
cite="mid:CAJUJwtgQ8J1YHvivWK50a0XDTDFjOuJ5cCaj5tbcY+mGmNNTTQ@mail.gmail.com"
        type="cite">
        <div><br>
        </div>
        that would be great,&nbsp;in fact&nbsp;I am currently installing latest
        1.8 version and I guess I saw these functions appearing
        somewhere !! - that would really make life easier :)
        <div>Thanks Sir. :)<br>
          <br>
          <div class="gmail_quote"> On Wed, Apr 4, 2012 at 1:17 PM,
            Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
                moz-do-not-send="true" href="mailto:bogdan@opensips.org">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"> Hi Sammy,<br>
                <br>
                I was thinking to simplify a bit this and to add to LB
                module a function like lb_is_from_peer() , to test if an
                IP + port matches on of the peers defined in LB...<br>
                <br>
                Regards,<br>
                Bogdan
                <div>
                  <div class="h5"><br>
                    <br>
                    On 04/04/2012 10:23 AM, SamyGo wrote:
                    <blockquote type="cite">Hi Miha,
                      <div><br>
                      </div>
                      <div>I do exactly what Bogdan said, but using DB
                        connecitons. IF its an Initial INVITE connect to
                        DB and query table load_balancer and see if the
                        source ip of INVITE matches any of the
                        load_balanaced FS servers then I know that its
                        from inside-media-serves to outside.&nbsp;</div>
                      <div><br>
                      </div>
                      <div>The next thing is identifying what original
                        destination your FS was trying to send the calls
                        to i.e carrier-ip / uri !</div>
                      <div><br>
                      </div>
                      <div>So in your FS dialplan add a sip header where
                        you store the real destination of the SBC/trunk
                        and once you are in the IF condition where you
                        detect your internal FS servers, strip off that
                        header &nbsp;change the $ru and t-relay the call !!</div>
                      <div><br>
                      </div>
                      <div>phone(dial 007@FS )&lt;===&gt; FS
                        (P-Real-DST: CAR.RIE.R.IP &amp; dial
                        007@OpenSIPS )&lt;====&gt;OpenSIPS(<a
                          moz-do-not-send="true"
                          href="mailto:007@CAR.RIE.R.IP" target="_blank">007@CAR.RIE.R.IP</a>)&lt;===&gt;


                        ITSP(<a moz-do-not-send="true"
                          href="mailto:007@CAR.RIE.R.IP" target="_blank">007@CAR.RIE.R.IP</a>&nbsp;)</div>
                      <div><br>
                      </div>
                      <div>I hope this is what you wanted.</div>
                      <div><br>
                      </div>
                      <div>Regards,</div>
                      <div>Sammy</div>
                      <div><br>
                        <div class="gmail_quote">On Wed, Apr 4, 2012 at
                          11:49 AM, Miha <span dir="ltr">&lt;<a
                              moz-do-not-send="true"
                              href="mailto:miha@softnet.si"
                              target="_blank">miha@softnet.si</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;"> Hi
                            Bogan,<br>
                            <br>
                            that is a bit tricky as phones are
                            registering on Opensips server. If I make
                            this that the phones will not register as
                            FSs servers are on different ips than SBC.<br>
                            <br>
                            What would you sugget?<br>
                            <br>
                            Regards,<br>
                            Miha
                            <div>
                              <div><br>
                                <br>
                                On 4/2/2012 6:30 PM, Bogdan-Andrei Iancu
                                wrote:<br>
                                <blockquote class="gmail_quote"
                                  style="margin: 0pt 0pt 0pt 0.8ex;
                                  border-left: 1px solid rgb(204, 204,
                                  204); padding-left: 1ex;"> Hi Miha,<br>
                                  <br>
                                  Well, in your script, when dealing
                                  with the initial requests, just look
                                  at the source IP of the INVITEs - if
                                  from SBC, do the lb stuff, otherwise
                                  route it back to SBC.<br>
                                  &nbsp; &nbsp;if (src_ip==11.22.33.44) {<br>
                                  &nbsp; &nbsp; &nbsp; &nbsp;# do LB<br>
                                  &nbsp; &nbsp;} else {<br>
                                  &nbsp; &nbsp; &nbsp; &nbsp; # send to SBC<br>
                                  &nbsp; &nbsp;}<br>
                                  <br>
                                  Regards,<br>
                                  Bogdan<br>
                                  <br>
                                  On 04/02/2012 09:30 AM, Miha wrote:<br>
                                  <blockquote class="gmail_quote"
                                    style="margin: 0pt 0pt 0pt 0.8ex;
                                    border-left: 1px solid rgb(204, 204,
                                    204); padding-left: 1ex;"> Hi,<br>
                                    <br>
                                    as I am dealing with opensips for
                                    the first time I would ask you for a
                                    little help.<br>
                                    I have installed and configured
                                    opensips that works like
                                    load_balancer (<a
                                      moz-do-not-send="true"
                                      href="http://wiki.freeswitch.org/wiki/Enterprise_deployment_OpenSIPS"
                                      target="_blank">http://wiki.freeswitch.org/wiki/Enterprise_deployment_OpenSIPS</a>).<br>
                                    <br>
                                    I tested it and works. Than I have
                                    created siptrunk and point it to
                                    Opensips. Opensips was balacing the
                                    calls to one of the FSs, that I have
                                    set in opensips configuration.<br>
                                    <br>
                                    How can I now configure opensips, if
                                    the call is made from FS, that
                                    opensips will send it to SBC (from
                                    where sip trunk is made), so that
                                    the calls will be working in both
                                    direction?<br>
                                    <br>
                                    <br>
                                    Thanks!<br>
                                    <br>
                                    Miha<br>
                                    <br>
_______________________________________________<br>
                                    Users mailing list<br>
                                    <a moz-do-not-send="true"
                                      href="mailto:Users@lists.opensips.org"
                                      target="_blank">Users@lists.opensips.org</a><br>
                                    <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><br>
                                    <br>
                                  </blockquote>
                                  <br>
                                  <br>
                                </blockquote>
                                <br>
                                <br>
_______________________________________________<br>
                                Users mailing list<br>
                                <a moz-do-not-send="true"
                                  href="mailto:Users@lists.opensips.org"
                                  target="_blank">Users@lists.opensips.org</a><br>
                                <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><br>
                              </div>
                            </div>
                          </blockquote>
                        </div>
                        <br>
                      </div>
                    </blockquote>
                    <br>
                    <br>
                  </div>
                </div>
                <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>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </blockquote>
      <br>
      <br>
      <pre class="moz-signature" cols="72">-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>