<div dir="ltr">This code in rating.php...</div><div class="gmail_extra"><br><div class="gmail_quote">2014-09-29 22:18 GMT+06:00 Pavel Eremin <span dir="ltr">&lt;<a href="mailto:eremina.net@gmail.com" target="_blank">eremina.net@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, All! Let&#39;s dance with CDRTool<div><br></div><div>I am trying to use it on heavy load system and get stack.</div><div><br></div><div>Why in this code author match canonical number with string started by 0?(in hard way) Because of this line all calls are postpaid...:(</div><div><br></div><div><div>           <b> if (!preg_match(&quot;/^0[9-0]{1,}@/&quot;,$CDR-&gt;CanonicalURINormalized))</b> {</div><div>                $log=sprintf (&quot;MaxSessionTime=unlimited Type=prepaid CallId=%s BillingParty=%s DestId=None&quot;,$NetFields[&#39;callid&#39;],$CDR-&gt;BillingPartyId);</div><div>                syslog(LOG_NOTICE, $log);</div><div>                $this-&gt;logRuntime();</div><div>                $ret=&quot;none&quot;.&quot;\n&quot;.&quot;type=prepaid&quot;;</div><div>                return $ret;</div><div>            } else {</div><div>                if (!$CDR-&gt;DestinationId) {</div><div>                    $log = sprintf (&quot;error: cannot figure out the destination id for %s&quot;,$CDR-&gt;CanonicalURI);</div><div>                    $this-&gt;logRuntime();</div><div>                    syslog(LOG_NOTICE, $log);</div><div>                    $ret=$log.&quot;\n&quot;.&quot;type=prepaid&quot;;</div><div>                    return $ret;</div><div>                }</div><div>            }</div></div><div><br></div></div>
</blockquote></div><br></div>