<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix"><tt>Hi Nick,</tt><br>
      <br>
      If you want to do "prefix" based routing, you should not use the
      "L" flag - this flag says that the whole number you have in RURI
      must match the "prefix" in DB.<br>
      <br>
      Regards,<br>
      <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 08.02.2015 03:58, symack wrote:<br>
    </div>
    <blockquote
cite="mid:CAGWRaZZre315nq04Q67cew3=Cn9Nx38DCMyPOO64HWJgbrNRRw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello Everyone,
        <div><br>
        </div>
        <div style="">Currently we are using do_routing to route our
          calls based on group id's. Now we would</div>
        <div style="">like to offer some different routes to every group
          based on prefixes. Essentially it would be something like</div>
        <div style=""><br>
        </div>
        <div style="">do_routing(2,L)<br>
        </div>
        <div style=""><br>
        </div>
        <div style="">
          <div>INSERT INTO dr_rules (groupid, prefix, timerec, priority,
            routeid, gwlist, attrs, description) VALUES
            ('2','00111','',1,'0','1','yes','Standard Wholesale Route');</div>
          <div>INSERT INTO dr_rules (groupid, prefix, timerec, priority,
            routeid, gwlist, attrs, description) VALUES
            ('2','00112','',1,'0','2','yes','Premium Wholesale Route');</div>
          <div><br>
          </div>
          <div style="">In essence, a group can be routed to many
            gateways based on prefix sent in initial invite.</div>
          <div style=""><br>
          </div>
          <div style="">Reading the documentation:</div>
          <div style=""><br>
          </div>
          <div style=""><span class=""
              style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:medium"><em>L</em></span><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:medium"> </span><span
style="color:rgb(0,0,0);font-family:Helvetica,Arial;font-size:medium">-
              Do strict length matching over the prefix - actually DR
              engine will do full number matching and not prefix
              matching anymore.</span></div>
          <div style=""><font size="3" color="#000000" face="Helvetica,
              Arial"><br>
            </font></div>
          <div style=""><font size="3" color="#000000" face="Helvetica,
              Arial">Will I not be able to route the call based on the
              prefix alone? I do not know the full number, unless we use
              regex which is the job of dialplan and not dr_rules.</font></div>
          <div style=""><font size="3" color="#000000" face="Helvetica,
              Arial"><br>
            </font></div>
          <div style=""><font size="3" color="#000000" face="Helvetica,
              Arial">Nick.<br>
            </font>
            <div><font size="3" color="#000000" face="Helvetica, Arial"><br>
              </font></div>
          </div>
          <div><br>
          </div>
        </div>
      </div>
      <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>