Hi, All! Let's dance with CDRTool

I am trying to use it on heavy load system and get stack.

Why in this code author match canonical number with string started by 0?(in
hard way) Because of this line all calls are postpaid...:(

           * if
(!preg_match("/^0[9-0]{1,}@/",$CDR->CanonicalURINormalized))* {
                $log=sprintf ("MaxSessionTime=unlimited Type=prepaid
CallId=%s BillingParty=%s
DestId=None",$NetFields['callid'],$CDR->BillingPartyId);
                syslog(LOG_NOTICE, $log);
                $this->logRuntime();
                $ret="none"."\n"."type=prepaid";
                return $ret;
            } else {
                if (!$CDR->DestinationId) {
                    $log = sprintf ("error: cannot figure out the
destination id for %s",$CDR->CanonicalURI);
                    $this->logRuntime();
                    syslog(LOG_NOTICE, $log);
                    $ret=$log."\n"."type=prepaid";
                    return $ret;
                }
            }
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to