<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Mark,<br>
      <br>
      Using the group support in drouting is optional. You can directly
      supply the routing group as parameter to the do_routing() function
      - this gives you the possibility to use more flexible way to
      determine the routing group, like using the dialplan module (which
      does regexp based matching and translation) - feed in the username
      and get back the group (by using the dp_translate() function).<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="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Summit 2019
  <a class="moz-txt-link-freetext" href="https://www.opensips.org/events/Summit-2019Amsterdam/">https://www.opensips.org/events/Summit-2019Amsterdam/</a>
</pre>
    <div class="moz-cite-prefix">On 03/25/2019 01:32 PM, Mark Farmer
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOvQDetGYOnWbcXEFJzDJHMebacV7ZbfCTSCmrQ07saQeXUiWg@mail.gmail.com">
      <div dir="ltr">OK I think I realised my mistake - rules are
        matched on longest prefix.<br>
        <div>So I think my question should be: Can I use the same
          principle for usernames in groups?</div>
        <div><br>
        </div>
        <div>On a side note, is it possible to match the group based on
          the destination domain instead of the source domain?</div>
        <div><br>
        </div>
        <div>Thanks</div>
        <div>Mark.</div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, 25 Mar 2019 at 09:56,
          Mark Farmer <<a href="mailto:farmorg@gmail.com"
            moz-do-not-send="true">farmorg@gmail.com</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">Hi everyone, can I use pattern matching in
            drouting groups and rules?
            <div>So for example I'd like to match onĀ +4412345678*@<a
                href="http://example.com" target="_blank"
                moz-do-not-send="true">example.com</a></div>
            <div>
              <div><br>
              </div>
              <div>In Asterisk dialplan I would do _+4412345678X</div>
              <div><br>
              </div>
              <div>Many thanks</div>
              <div>Mark.</div>
              <div><br>
              </div>
              <div><br>
              </div>
              -- <br>
              <div dir="ltr"
                class="gmail-m_-3680943109419696468gmail_signature">Mark
                Farmer<br>
                <a href="mailto:farmorg@gmail.com" target="_blank"
                  moz-do-not-send="true">farmorg@gmail.com</a></div>
            </div>
          </div>
        </blockquote>
      </div>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      <div dir="ltr" class="gmail_signature">Mark Farmer<br>
        <a href="mailto:farmorg@gmail.com" target="_blank"
          moz-do-not-send="true">farmorg@gmail.com</a></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>