<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Mark,<br>
      <br>
      The Dynamic Routing module is doing routing based on prefix/number
      - that's what the engine knows. Of course you can combine with
      source IP by translating/mapping groups of src IPs into routing
      groups.<br>
      <br>
      Not sure what you are expect the module to do, if you want to
      route only based on SRC and DST IPs....In order to have drouting
      setting a destination GW, you need to do the actual routing (via
      do_routing()).<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/05/2019 04:01 PM, Mark Farmer
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOvQDetUACU-PS=qpmU1kW1VTu86GNyMxKNQR31Xkfxg9LGZMQ@mail.gmail.com">
      <div dir="ltr">
        <div dir="ltr">Hi all
          <div><br>
          </div>
          <div>I'm using drouting and I need to route calls to various
            Gateway types based on $si and destination IP but it seems
            that $dd is not known at this point.</div>
          <div>How can I get the IP address of the destination gateway
            from the drouting database and assign it to a usable
            variable?</div>
          <div><br>
          </div>
          <div>I'm thinking something like this:</div>
          <div><br>
          </div>
          <div>
            <div>if ($si =~"^(10\.*)" && goes_to_gw("1")) {</div>
            <div><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>$dd
              = ???????</div>
          </div>
          <div>                }</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>Many thanks</div>
          <div>Mark.</div>
          <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>
          </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>