[OpenSIPS-Devel] [opensips] NAT Via Test Failure (#401)

jalung notifications at github.com
Tue Jan 6 16:28:54 CET 2015


If someone else wants to use this the full version.
<code>
route[CHECKTOPVIA] {

	if (pcre_match("$(hdr(via)[0])",".*UDP (172\.\b([1][6-9]|[2][0-9]|[3][0-1])\b\.\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\.\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b).*") || pcre_match("$(hdr(via)[0])",".*UDP (10\.\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\.\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\.\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b).*") || pcre_match("$(hdr(via)[0])",".*UDP (192\.\b([0-9]|[1-9][0-9]|1[0-6][0-8])\b\.\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\.\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b).*") ) {

		setflag(RFC1918);

	} 

}


</code>

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/401#issuecomment-68879618
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20150106/68b71d2d/attachment.htm>


More information about the Devel mailing list