<p><a href="http://www.opensips.org/html/docs/modules/2.1.x/load_balancer.html#id293920">http://www.opensips.org/html/docs/modules/2.1.x/load_balancer.html#id293920</a> says, "A value 0 for the port means "any" - will match any port"</p>

<p>However, it would seem you can only put a pvar there?</p>

<p>test 1: Fail</p>

<pre><code>if (lb_is_destination("$si", 0) ) {
                ...
        }

CRITICAL:core:yyerror: parse error in config file /usr/local/etc/opensips/opensips.cfg, line 130, column 28-29: numbers used as parameters - they should be quoted

</code></pre>

<p>test 2: Fail</p>

<pre><code>if (lb_is_destination("$si", "0") ) {
                ...
        }

ERROR:core:fixup_pvar: parsing of pseudo variable 0 failed!
</code></pre>

<p>test 3: Fail</p>

<pre><code>if (lb_is_destination("$si", '0') ) {
                ...
        }

ERROR:core:fixup_pvar: parsing of pseudo variable 0 failed!
</code></pre>

<p>test 4: Fail</p>

<pre><code>if (lb_is_destination("$si") ) {
                ...
        }

CRITICAL:core:yyerror: parse error in config file /usr/local/etc/opensips/opensips.cfg, line 131, column 26-27: unknown command &lt;lb_is_destination&gt;, missing loadmodule?
</code></pre>

<p>Workaround below produces no error, and correctly matches with any port</p>

<pre><code>
$avp(lb_port) = "0";

if (lb_is_destination("$si", "$avp(lb_port)") ) {
                ...
        }

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