<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Kirill,<br>
      <br>
      Well, internally, the drouting module is also doing a query to DB
      , to the dr_group table (there is no cache here) -> so, it is
      the same, when comes to performance. Or you can keep the per-user
      routing group in the subscriber table and have it loaded during
      authentication (see the load_credential parameter).<br>
      <br>
      And again, the dr_groups is not cached, it is a real time query to
      DB ;). Only the rules/carriers/gateways are cached, but not the
      groups.<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>
OpenSIPS Summit 2018
  <a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
    <div class="moz-cite-prefix">On 06/05/2018 01:58 PM, Kirill
      Galinurov wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAPDUut_9PRi0ZgyV6q_i9YFtcg02wXifbzD6JenqSwQfY5L4Rw@mail.gmail.com">
      <div dir="ltr">Hello Вogdan. Thanks for answer. I thought so. I
        want to use db, and cache_db to store groups. But our new system
        is very highload. About 6M rules over 120 groups and 300 cps. So
        what about perfomance ? Internal drouting groups is in memory
        and it very good.   </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2018-06-05 11:39 GMT+03:00
          Bogdan-Andrei Iancu <span dir="ltr"><<a
              href="mailto:bogdan@opensips.org" target="_blank"
              moz-do-not-send="true">bogdan@opensips.org</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> <tt>Hello Kirill,<br>
                <br>
                The drouting module is fetching the original FROM
                header, as received from the network. So your changes
                from the script will be ignored.<br>
                <br>
                An alternative is to determine the routing group by
                yourself, at script level (like doing a DB query, even
                to the same dr_groups table, but using whatever value
                you want for the user) and push the group as parameter
                to the do_routing() function.<br>
                <br>
                Regards,<br>
              </tt>
              <pre class="m_-6174651022061898786moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="m_-6174651022061898786moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.<wbr>com</a>
OpenSIPS Summit 2018
  <a class="m_-6174651022061898786moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam" target="_blank" moz-do-not-send="true">http://www.opensips.org/<wbr>events/Summit-2018Amsterdam</a>
</pre>
              <div>
                <div class="h5">
                  <div class="m_-6174651022061898786moz-cite-prefix">On
                    06/01/2018 05:05 PM, Kirill Galinurov wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">Hi all. I use drouting module for
                      LCR. No i use do_routing function in
                      request_route() But i want normalize username in
                      From before do_routing.
                      <div>How I can do it. Now do_routing() use
                        old username for discover group.</div>
                      <div>Also I want to change username in contact
                        field before topology hiding.</div>
                    </div>
                    <br>
                    <fieldset
                      class="m_-6174651022061898786mimeAttachmentHeader"></fieldset>
                    <br>
                  </div>
                </div>
                <pre>______________________________<wbr>_________________
Users mailing list
<a class="m_-6174651022061898786moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="m_-6174651022061898786moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
              </blockquote>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>