Hi Daniel, I am not sure that nat_uac_test can determine type of NAT device. and why you need all these checks if you always use rtpproxy? (another q from 2013 :)
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. On Wed, Feb 8, 2017 at 12:01 PM, Daniel Tryba <d.tr...@pocos.nl> wrote: > On Wed, Feb 08, 2017 at 01:12:05AM -0700, Arsen Semionov wrote: > > good question from 2013 :) > > Maybe someone has experience and can confirm this? > > The answer to the 2013 question is: if you can depend on this (I have > never seen it) you can script kamailio to make use of it. > > > My main question: is it possible to determine when it's required to use > RTP > > proxy ? In other words can we know that the client is behind symmetric > NAT > > device or we just use rtpproxy as a silver bullet? > > The "default" config has rtpproxy on detected NAT as an example. But > personally I go for the always proxy option, it never failed so far > (except for misconfigured client side firewalls that wouldn't have > permitted p2p rtp anyway but now can easily fixed by permitting the > traffic from the rtp range of udp ports from the rtpengine/proxy > servers). > > NAT detect example below (so take a look at nat_uac_test to see what > kind of tests there are): > > route[NATDETECT] { > #!ifdef WITH_NAT > force_rport(); > if (nat_uac_test("19")) { > if (is_method("REGISTER")) { > fix_nated_register(); > } else { > if(is_first_hop()) > set_contact_alias(); > } > setflag(FLT_NATS); > } > #!endif > return; > } > > > route[NATMANAGE] { > #!ifdef WITH_NAT > if (is_request()) { > if(has_totag()) { > if(check_route_param("nat=yes")) { > setbflag(FLB_NATB); > } > } > } > if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))) > return; > > rtpproxy_manage("co"); > > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users > -- Regards, Arsen.
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users