<!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>Hi Kevin,<br>
      <br>
      See inline.<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 02/01/2013 02:41 PM, Kevin Mathy wrote:
    <blockquote
cite="mid:CAOmzhX=vGdw9nnaomfDvznQY3cGGZEadUXWc51-tsUrbjYNaSA@mail.gmail.com"
      type="cite">Hi Bogdan,&nbsp;
      <div><br>
      </div>
      <div>Thanks for your answer, but, we've got another idea ;-)</div>
      <div>As our customers aren't directly connected to our OpenSIPS,
        we can't use your method...&nbsp;</div>
      <div>This is what we thought :</div>
      <div><br>
      </div>
      <div>Customers ===&gt; Access SBC (Add a "X-Quality" header, with
        "premium" or "lowcost") ====&gt; OpenSIPS (look for X-Quality
        header, and choose drouting group based on header's value)
        ====&gt; Route to chosen provider</div>
    </blockquote>
    That;s ok also.<br>
    <br>
    <blockquote
cite="mid:CAOmzhX=vGdw9nnaomfDvznQY3cGGZEadUXWc51-tsUrbjYNaSA@mail.gmail.com"
      type="cite">
      <div><br>
      </div>
      <div>So, we don't use external module, but only a "if" test in
        opensips's configuration</div>
    </blockquote>
    avoid using IF with hardcoded values - you will have to restart each
    time you want to add/delete/change something there. Better use
    something like dialplan module to do the translation between the
    quality and the group.<br>
    <blockquote
cite="mid:CAOmzhX=vGdw9nnaomfDvznQY3cGGZEadUXWc51-tsUrbjYNaSA@mail.gmail.com"
      type="cite">
      <div><br>
      </div>
      <div>One more thing, is it possible to make some loadbalancing
        with drouting module ? For example, if we set same priority to
        different rules ?</div>
      <div>What we want to do is : for certain prefixes, we'd like to
        route to only one provider, and for some other prefixes, we'd
        like to route to different providers in loadbalancing</div>
      <div><br>
      </div>
      <div>Example :&nbsp;</div>
      <div>prefix 33 ==&gt; Route to provider A only</div>
      <div>prefix 44 ==&gt; Route to provider B only</div>
      <div>prefix 72 ==&gt; Route to A and B, with loadbalancing, 50/50</div>
    </blockquote>
    No need for priority - simply make a rule for prefix 72 with 2 GWs
    (A and B) and use weights - set the wight flag for the rule and as
    gw_list put "A=50;B=50" - See the DR doc on that.<br>
    <br>
    <blockquote
cite="mid:CAOmzhX=vGdw9nnaomfDvznQY3cGGZEadUXWc51-tsUrbjYNaSA@mail.gmail.com"
      type="cite">
      <div><br>
      </div>
      <div>Thanks,&nbsp;</div>
      <div>
        <div name="sig_2e0eb8fbaa" style="margin: 2em 0pt;">
          Bien cordialement,<br>
          Best regards,<br>
          <br>
          <b>Kevin MATHY</b><br>
          ----
          <br>
          <b>HEXANET</b> | Op&eacute;rateur T&eacute;l&eacute;com et fournisseur de services
          internet<br>
          T&eacute;l. +33 (0) 3 26 79 30 05<br>
          Web. <a moz-do-not-send="true" href="http://www.hexanet.fr">http://www.hexanet.fr</a><br>
          Twitter. <a moz-do-not-send="true"
            href="http://twitter.com/Hexanet">http://twitter.com/Hexanet</a><br>
          <br>
          Pour toute demande de <b>Support Technique</b>, merci de nous
          contacter au <b>+33 (0) 3 51 08 42 07</b> / <b><a
              moz-do-not-send="true" href="mailto:support@hexanet.fr">support@hexanet.fr</a></b></div>
        <div class="gmail_quote">2013/2/1 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><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 Kevin,<br>
                <br>
                DR does not have a buit-in way of selecting the routing
                set based on SRC ip. But you can integrate this with
                permissions module (address table +&nbsp;
                check_source_address() function).<br>
                <br>
                Idea:<br>
                &nbsp;&nbsp; - in address table, put the IPs of your providers and
                in the "context_info" fields put the routing group you
                for it<br>
                &nbsp;&nbsp; - call comes in -&gt; </tt><tt>check_source_address()
                -&gt; it will load in script the </tt><tt>"context_info"
                into an AVP<br>
                &nbsp;&nbsp; - do do_routing("$avp(id)") - push directly in DR the
                routing group you want.<br>
              </tt><tt><br>
                Regards,<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 class="h5"> <br>
                  On 01/31/2013 06:43 PM, Kevin Mathy wrote: </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">Hi List,&nbsp;
                    <div><br>
                    </div>
                    <div>Just a question about Drouting module, and
                      Source Routing; is there any way to do that ?&nbsp;</div>
                    <div><br>
                    </div>
                    <div>Example : I've got some SIP providers, and I'd
                      like to be able to route some calls to lowcost
                      ones, and other calls to premium ones.</div>
                    <div><br>
                    </div>
                    <div>I've found that I can make a drouting choose
                      based on R-URI domain or username, but I'd like to
                      do it based on FROM domain...</div>
                    <div><br>
                    </div>
                    <div>Have you got any idea, suggestions ?&nbsp;</div>
                    <div><br>
                    </div>
                    <div><br>
                    </div>
                    <div>Thanks a lot,&nbsp;</div>
                    <div><br>
                    </div>
                    <div>Regards,&nbsp;</div>
                    <div><br>
                    </div>
                    <div>Kevin&nbsp;</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>
      </div>
    </blockquote>
  </body>
</html>