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

<pre><code>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></pre>

<p>}</p>

<p></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/401#issuecomment-68879618">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciVHF3xc7CG2MWJJtcA6DPH4jb0Hrks5ne_a2gaJpZM4DOPEM.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/401#issuecomment-68879618"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>