<p>Present in OpenSIPS 1.9+. This should work:</p>

<pre><code>route [foo]
{
    if (not $param(1)) {
        ...
    }
}

route(foo, NULL, $var(bar));
</code></pre>

<p>Currently, you can hack it to make it work like this:</p>

<pre><code>$var(nullvar) = NULL;
route(foo, $var(nullvar), $var(bar));
</code></pre>

<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/516">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciXkh3WRdGz-zeKR4r7fTp_HFC5vZks5oK0v6gaJpZM4Egcy6.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/516"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>