Hi Andrew,<br>Yes, I&#39;ve tried that, and it seems to be working, but the problem is following. I have clients who connect both from LAN and from WAN. So, on incoming INVITE request I can do nat_uac_test(&quot;4&quot;) to check if request&#39;s latest VIA is from Internet. Then I do a lookup on clients to find out where is that client connected from. But how do I check if that&#39;s an Internet IP address or not? I will have something like &quot;<a href="http://sip:9999999@10.65.1.1:5060">sip:9999999@10.65.1.1:5060</a>&quot; in there in case of LAN, but it can be ANY private or Internet IP address. Right now on my test server I&#39;m doing ugly thing like this:<br>
<br>        if (is_method(&quot;INVITE&quot;))<br>        {<br>            if (has_body(&quot;application/sdp&quot;))<br>            {<br>                if (nat_uac_test(&quot;4&quot;))<br>                {<br>                    xlog(&quot;Call from LAN&quot;);<br>
                    if (!$ru=~&quot;10.65.\d{1,3}\.\d{1,3}&quot;)<br>                    {<br>                        xlog(&quot;PROXY: $fU-&gt;$tU, LAN to WAN, $ci\n&quot;);<br>                        if (!rtpproxy_offer(&quot;fieoc&quot;))<br>
                        {<br>                            xlog(&quot;ERROR: Unable to offer RTP Proxy, $ci\n&quot;);<br>                            sl_send_reply(&quot;500&quot;,&quot;Internal Server Error RTP&quot;);<br>                            exit;<br>
                        }<br>                    }<br>                    else<br>                    {<br>                        xlog(&quot;PROXY: $fU-&gt;$tU, LAN to LAN, $ci\n&quot;);<br>                        if (!rtpproxy_offer(&quot;fiioc&quot;))<br>
                        {<br>                            xlog(&quot;ERROR: Unable to offer RTP Proxy, $ci\n&quot;);<br>                            sl_send_reply(&quot;500&quot;,&quot;Internal Server Error RTP&quot;);<br>                            exit;<br>
                        }<br>                    }<br>                }<br>                else<br>                {<br>                    xlog(&quot;Call from Internet&quot;);<br>                    if (!$ru=~&quot;10.65.\d{1,3}\.\d{1,3}&quot;)<br>
                    {<br>                        xlog(&quot;PROXY: $fU-&gt;$tU, WAN to WAN, $ci\n&quot;);<br>                        if (!rtpproxy_offer(&quot;feeoc&quot;))<br>                        {<br>                            xlog(&quot;ERROR: Unable to offer RTP Proxy, $ci\n&quot;);<br>
                            sl_send_reply(&quot;500&quot;,&quot;Internal Server Error RTP&quot;);<br>                            exit;<br>                        }<br>                    }<br>                    else<br>                    {<br>
                        xlog(&quot;PROXY: $fU-&gt;$tU, WAN to LAN, $ci\n&quot;);<br>                        if (!rtpproxy_offer(&quot;feioc&quot;))<br>                        {<br>                            xlog(&quot;ERROR: Unable to offer RTP Proxy, $ci\n&quot;);<br>
                            sl_send_reply(&quot;500&quot;,&quot;Internal Server Error RTP&quot;);<br>                            exit;<br>                        }<br>                    }<br>                }<br>            }<br>
<br><br>Which seems to be working, but that&#39;s really ugly and not efficient. If only I could do nat_uac_test on outgoing client&#39;s R-URI - that would simplify things a lot! Do you have any ideas how to implement something like that? Because right now I&#39;m analyzing against one network, of course, I can add regex to check for private LAN IP in there, but I really don&#39;t like such solution...<br>
<br>Thanks for answering!<br><br><div class="gmail_quote">2011/8/17 Andrew Pogrebennyk <span dir="ltr">&lt;<a href="mailto:andrew.pogrebennyk@portaone.com">andrew.pogrebennyk@portaone.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Yuri,<div class="im"><br>
<br>
On 17.08.2011 07:27, Yuri Kirsanov wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Do you have any idea why is it behaving this way? I&#39;m using OpenSIPS 1.6.4 and RTP Proxy 1.2.1 without any patches. I&#39;m not using &quot;mhomed=1&quot; option, I&#39;m using &quot;force_send_socket()&quot; on outgoing calls from Internet client to LAN and it works fine. Should I also use that command for outgoing calls from LAN to Internet client? But that shouldn&#39;t affect RTP Proxy behavior, shouldn&#39;t it? Also, I&#39;ve tried to use &quot;r&quot; and &quot;w&quot; options when invoking RTP Proxy, but that doesn&#39;t help.<br>

</blockquote>
<br></div>
Have you tried using options &quot;ie&quot; for calls from lan to internet, &quot;ei&quot; vice versa and &quot;ee&quot; for calls from one client on the internet to another? This used to work for me.. one flag i|e may be not enough.<br>
<font color="#888888">
<br>
-- <br>
Sincerely,<br>
Andrew Pogrebennyk<br>
<br>
______________________________<u></u>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<u></u>bin/mailman/listinfo/users</a><br>
</font></blockquote></div><br>