<div dir="ltr"><div>Hi Daniel,</div><div><br></div><div>I am not sure that nat_uac_test can determine type of NAT device.</div><div>and why you need all these checks if you always use rtpproxy? (another q from 2013 :)</div><div><br></div><div>The idea is to reduce using of rtpproxy for better scalability and voice quality. If we can beat all types of NAT with a near-end NAT traversal, except symmetric NAT why do we always use proxy option in case if NAT is detected.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 8, 2017 at 12:01 PM, Daniel Tryba <span dir="ltr"><<a href="mailto:d.tryba@pocos.nl" target="_blank">d.tryba@pocos.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Feb 08, 2017 at 01:12:05AM -0700, Arsen Semionov wrote:<br>
> good question from 2013 :)<br>
> Maybe someone has experience and can confirm this?<br>
<br>
</span>The answer to the 2013 question is: if you can depend on this (I have<br>
never seen it) you can script kamailio to make use of it.<br>
<span class=""><br>
> My main question: is it possible to determine when it's required to use RTP<br>
> proxy ? In other words can we know that the client is behind symmetric NAT<br>
> device or we just use rtpproxy as a silver bullet?<br>
<br>
</span>The "default" config has rtpproxy on detected NAT as an example. But<br>
personally I go for the always proxy option, it never failed so far<br>
(except for misconfigured client side firewalls that wouldn't have<br>
permitted p2p rtp anyway but now can easily fixed by permitting the<br>
traffic from the rtp range of udp ports from the rtpengine/proxy<br>
servers).<br>
<br>
NAT detect example below (so take a look at nat_uac_test to see what<br>
kind of tests there are):<br>
<br>
route[NATDETECT] {<br>
#!ifdef WITH_NAT<br>
        force_rport();<br>
        if (nat_uac_test("19")) {<br>
                if (is_method("REGISTER")) {<br>
                        fix_nated_register();<br>
                } else {<br>
                        if(is_first_hop())<br>
                                set_contact_alias();<br>
                }<br>
                setflag(FLT_NATS);<br>
        }<br>
#!endif<br>
        return;<br>
}<br>
<br>
<br>
route[NATMANAGE] {<br>
#!ifdef WITH_NAT<br>
        if (is_request()) {<br>
                if(has_totag()) {<br>
                        if(check_route_param("nat=yes"<wbr>)) {<br>
                                setbflag(FLB_NATB);<br>
                        }<br>
                }<br>
        }<br>
        if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))<br>
                return;<br>
<br>
        rtpproxy_manage("co");<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<wbr>_________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Regards,<br>Arsen.<br></div>
</div>