[Serusers] nat_uac_test

Dinesh feedbak at imelhk.com
Mon Mar 1 23:24:07 CET 2004


I am using nat_uac_test("2") to only select UAs behind NAT that may need
NAThelper assistance.
However I find that natt_uac_test("2") is also giving a positive on some
ATA's that we have setup with port forwarding or DMZ.  These ATA have
also been set to determine the external IP of the routers they are on
using VIA - They function without the nathelper module.

These UA do not need any help from NAT helper but because they are
flaged they are pinged to keeps ports alive and they are forced through
the RTPProxy.

Any Ideas.  We know in advance which UA are setup with Port
Forwarding/DMZ.  Can a flag be set in the subscriber table which is also
tested at the time of Registration if so, how?

if (nat_uac_test("2")) {
	if (method == "REGISTER" || ! search("^Record-Route:")) {
	    fix_nated_contact(); # Rewrite contact with source IP of
signalling
	    if (method == "INVITE") {
	        fix_nated_sdp("1"); # Add direction=active to SDP
	    };
	    force_rport(); # Add rport parameter to topmost Via
	    setflag(6);    # Mark as NATed
	};
};

Thanks,
Dinesh




More information about the sr-users mailing list