[OpenSIPS-Users] CDRtool

Pavel Eremin eremina.net at gmail.com
Mon Sep 29 18:18:17 CEST 2014


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;
                }
            }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140929/5ffb3182/attachment.htm>


More information about the Users mailing list