<p>In <a href="https://github.com/kamailio/kamailio/pull/17#discussion-diff-22765911">modules/dialplan/dp_repl.c</a>:</p>
<pre style='color:#555'>> @@ -188,7 +188,13 @@ int rule_translate(sip_msg_t *msg, str string, dpl_node_t * rule,
> }
>
> if(rule->tflags&DP_TFLAGS_PV_SUBST) {
> - subst_comp = dpl_dynamic_pcre(msg, &rule->subst_exp, NULL);
> + subst_comp = dpl_dynamic_pcre(msg, &rule->subst_exp, &cap_cnt);
> + if (cap_cnt > MAX_REPLACE_WITH) {
</pre>
<p>The other check is done a few lines later</p>
<pre><code>if(repl_comp->max_pmatch > cap_cnt){
</code></pre>
<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/files#r22765911">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZWHG5slWY29xAXAhyoznLXmelRaFks5ngk15gaJpZM4DOVWm.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/files#r22765911"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>