[OpenSIPS-Users] CDRtool
Pavel Eremin
eremina.net at gmail.com
Mon Sep 29 18:29:24 CEST 2014
This code in rating.php...
2014-09-29 22:18 GMT+06:00 Pavel Eremin <eremina.net at gmail.com>:
> 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/f0fd400c/attachment.htm>
More information about the Users
mailing list