<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 27.01.2020 16:38, Alexander Perkins
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CALLkTp0qaAUhg2GX3Ki554Y9cEuxaMbYp20Vkh+2HLfp2NdWcA@mail.gmail.com">when
      a call comes into my OpenSIPS server, I'd to send it to another
      SIP server.  Here's the flow
      <div><br>
      </div>
      <div>Call Comes In -> Hits OpenSIPS Server -> Needs to route
        to <a href="mailto:2125551212@1.2.3.4" moz-do-not-send="true">2125551212@1.2.3.4</a></div>
      <div><br>
      </div>
      <div>How would I go about doing this?</div>
    </blockquote>
    <p><tt>Hi Alexander,</tt></p>
    <p><tt>Starting from the default opensips.cfg [1], instead of
        looking up a registered device<br>
        (the entire "if" block I linked), act as a proxy by rewriting
        the Request URI [2] of<br>
        your SIP request:</tt></p>
    <p><tt>$ru = <a class="moz-txt-link-rfc2396E" href="mailto:sip:2125551212@1.2.3.4">"sip:2125551212@1.2.3.4"</a>;<br>
        <br>
        , then relay the request (no change needed there):<br>
        <br>
        ...<br>
        route(relay);<br>
        }<br>
      </tt></p>
    <p><tt>If you need to proxy the request further without editing its
        Request URI, you must set<br>
        the "Destination URI" or $du [3] variable instead.<br>
      </tt></p>
    <p><tt>Best regards,</tt></p>
    <p><tt>[1]: </tt><tt><a
href="https://github.com/OpenSIPS/opensips/blob/master/etc/opensips.cfg#L209">https://github.com/OpenSIPS/opensips/blob/master/etc/opensips.cfg#L209</a><br>
        [2]: </tt><tt><a
          href="https://www.opensips.org/Documentation/Script-CoreVar-3-1#toc75">https://www.opensips.org/Documentation/Script-CoreVar-3-1#toc75</a><br>
        [3]: </tt><tt><a
          href="https://www.opensips.org/Documentation/Script-CoreVar-3-1#toc36">https://www.opensips.org/Documentation/Script-CoreVar-3-1#toc36</a></tt></p>
    <pre class="moz-signature" cols="72">-- 
Liviu Chircu
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/liviuchircu">www.twitter.com/liviuchircu</a> | <a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a>

OpenSIPS Summit, Amsterdam, May 2020
  <a class="moz-txt-link-abbreviated" href="http://www.opensips.org/events">www.opensips.org/events</a>
OpenSIPS Bootcamp, Miami, March 2020
  <a class="moz-txt-link-abbreviated" href="http://www.opensips.org/training">www.opensips.org/training</a></pre>
  </body>
</html>