<p>subexpressions should not be checked when the expression has private variables</p>

<p>output of the error</p>

<pre><code> 0(10175) DEBUG: dialplan [dp_db.c:496]: build_rule(): building rule for [2:^(00|\+)([1-9][0-9]+)$/^(00|\+)([1-9][0-9]+)$/\2]
 0(10175) DEBUG: dialplan [dp_db.c:533]: build_rule(): attrs are: ''
 0(10175) DEBUG: dialplan [dp_db.c:580]: add_rule2hash(): new dpl_id 1
 0(10175) DEBUG: dialplan [dp_db.c:593]: add_rule2hash(): new index , len 0
 0(10175) DEBUG: dialplan [dp_db.c:629]: add_rule2hash(): added the rule id 1 index 0 pr 1 next (nil) to the index with 0 len
 0(10175) DEBUG: dialplan [dp_repl.c:146]: repl_exp_parse(): replacement expression is [\1]
 0(10175) DEBUG: dialplan [dp_db.c:102]: dpl_check_pv(): parsing [^$avp(s:caller_cc)$avp(s:caller_ac)([1-9][0-9]+)$]
 0(10175) DEBUG: <core> [pvapi.c:419]: pv_spec_lookup(): PV <$avp(s:caller_cc)> is not in cache
 0(10175) DEBUG: <core> [usr_avp.c:882]: parse_avp_ident(): Parsing 's:caller_cc'
 0(10175) DEBUG: <core> [pvapi.c:293]: pv_cache_add(): pvar [$avp(s:caller_cc)] added in cache
 0(10175) DEBUG: dialplan [dp_db.c:124]: dpl_check_pv(): string [^$avp(s:caller_cc)$avp(s:caller_ac)([1-9][0-9]+)$] has variables
 0(10175) DEBUG: dialplan [dp_db.c:496]: build_rule(): building rule for [2:^$avp(s:caller_cc)$avp(s:caller_ac)([1-9][0-9]+)$/^$avp(s:caller_cc)$avp(s:caller_ac)([1-9][0-9]+)$/\1]
 0(10175) ERROR: dialplan [dp_db.c:502]: build_rule(): repl_exp \1 refers to 1 sub-expressions, but subst_exp ^$avp(s:caller_cc)$avp(s:caller_ac)([1-9][0-9]+)$ has only 0
 0(10175) DEBUG: dialplan [dp_db.c:685]: destroy_rule(): destroying rule with priority 1
</code></pre>

<hr>

<h4>You can merge this Pull Request by running</h4>
<pre>  git pull https://github.com/linuxmaniac/kamailio vseva/dialplan_fix</pre>
<p>Or view, comment on, or merge it at:</p>
<p>  <a href='https://github.com/kamailio/kamailio/pull/17'>https://github.com/kamailio/kamailio/pull/17</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>dialplan: don't check subexpressions on expressions with pvs</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/17/files#diff-0">modules/dialplan/dp_db.c</a>
    (6)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/17.patch'>https://github.com/kamailio/kamailio/pull/17.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/17.diff'>https://github.com/kamailio/kamailio/pull/17.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/pull/17">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZQHG5suSrkzjmE28axwGcvhwNZIUks5nem92gaJpZM4DOVWm.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/kamailio/kamailio/pull/17"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>