<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"><<a href="mailto:eremina.net@gmail.com" target="_blank">eremina.net@gmail.com</a>></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'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("/^0[9-0]{1,}@/",$CDR->CanonicalURINormalized))</b> {</div><div> $log=sprintf ("MaxSessionTime=unlimited Type=prepaid CallId=%s BillingParty=%s DestId=None",$NetFields['callid'],$CDR->BillingPartyId);</div><div> syslog(LOG_NOTICE, $log);</div><div> $this->logRuntime();</div><div> $ret="none"."\n"."type=prepaid";</div><div> return $ret;</div><div> } else {</div><div> if (!$CDR->DestinationId) {</div><div> $log = sprintf ("error: cannot figure out the destination id for %s",$CDR->CanonicalURI);</div><div> $this->logRuntime();</div><div> syslog(LOG_NOTICE, $log);</div><div> $ret=$log."\n"."type=prepaid";</div><div> return $ret;</div><div> }</div><div> }</div></div><div><br></div></div>
</blockquote></div><br></div>