<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi, Terrance!</tt><tt><br>
</tt><tt><br>
</tt><tt>The routing logic (determinig the IPs and ports) have to be
decided in the request route. The routing information in replies </tt><tt>should
be passed by OpenSIPS unchanged to the UAS, you _should not_
change the routing information in replies.</tt><tt><br>
</tt><tt>If your message is comming from the internet, then it
should have already arrived on the interface which as hassinged an
advertised address. If you want to pass it to a private network,
just use force_send_socket() to the private network. Let's take an
example</tt><tt>: if I have the following interfaces:</tt><tt><br>
</tt><tt><br>
</tt><tt>listen=udp:10.0.0.1:5060 as 1.1.1.1 # used for public
network</tt><tt><br>
</tt><tt>listen=udp:10.0.0.2:5060 # used for</tt><tt>
private network</tt><tt><br>
</tt><tt><br>
</tt><tt>The client sends the invite to OpenSIPS via public network,
so </tt><tt>it will get in OpenSIPS via 10.0.0.1. In request
route I would do:</tt><tt><br>
</tt><tt><br>
</tt><tt>route {</tt><tt><br>
</tt><tt> ...</tt><tt><br>
</tt><tt> if ($Ri == "</tt><tt>10.0.0.1")</tt><tt><br>
</tt><tt> force_send_socket(udp:10.0.0.2:5060)</tt><tt>;</tt><tt><br>
</tt><tt> ...</tt><tt><br>
</tt><tt>}</tt><tt><br>
</tt><tt><br>
</tt><tt>This request will go to UAS with two </tt><tt>Record
Routes:</tt><tt><br>
</tt><tt>udp:10.0.0.2:5060</tt><tt><br>
</tt><tt>udp:1.1.1.1:5060</tt><tt><br>
</tt><tt><br>
</tt><tt>Therefore, the reply will have the proper information in
the Record Route header.</tt><tt><br>
</tt><tt><br>
</tt><tt>I hope it is clear now.</tt><tt><br>
</tt><tt><br>
</tt><tt>Best regards,</tt><br>
<pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 03/26/2015 04:12 PM, Terrance Devor
wrote:<br>
</div>
<blockquote
cite="mid:CA+w+2f8dxFD2ji6dLVfCrK=U3TNou+f5kh7213DQt+b5jRRaJw@mail.gmail.com"
type="cite">
<div dir="ltr">I hope it's ok to re-phrase my question in this
same email. Where is the best place to change
<div>the ip address using set_advertised_address for 200OK being
sent out by OpenSIPS to the</div>
<div style="">UAS.</div>
<div style=""><br>
</div>
<div style="">T.</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>