[OpenSER-Users] CDRTool question - ShowPrice command changes
Dan-Cristian Bogos
danb.lists at googlemail.com
Wed May 28 18:40:52 CEST 2008
Great,
many thanks Adrian.
DanB
On Wed, May 28, 2008 at 6:29 PM, Adrian Georgescu <ag at ag-projects.com>
wrote:
> Dan, you are right and I found the problem. The fix will be available
> with the next CDRTool release due next week together with Mediaproxy 2.0
>
> Adrian
>
> If you need a fix now for your 6.4.1:
>
> --- rating_lib-6.4.1.phtml 2008-05-28 18:25:18.000000000 +0200
> +++ rating_lib.phtml 2008-05-28 18:27:00.000000000 +0200
> @@ -6078,26 +6078,28 @@
> $timestamp=time();
> }
>
> - $application="audio";
> - if ($NetFields['application']) $application=$NetFields
> ['application'];
> + $CDRStructure=array (
> + $this->CDRS->CDRFields
> ['callId'] => $NetFields['callid'],
> + $this->CDRS->CDRFields
> ['aNumber'] => $NetFields['from'],
> + $this->CDRS->CDRFields
> ['CanonicalURI'] => $NetFields['to'],
> + $this->CDRS->CDRFields
> ['duration'] => $NetFields['duration'],
> + $this->CDRS->CDRFields
> ['timestamp'] => time()
> + );
> +
> + $CDR = new $this->CDRS->CDR_class(&$this->CDRS, &
> $CDRStructure);
> + $CDR->normalize();
>
> $Rate = new Rate($this->settings, $this->db);
>
> $RateDictionary=array(
> - 'callId' => $NetFields
> ['callid'],
> - 'timestamp' => $timestamp,
> - 'duration' => $NetFields
> ['duration'],
> - 'inputTraffic' => $NetFields
> ['inputtraffic'],
> - 'outputTraffic' => $NetFields
> ['outputtraffic'],
> - 'DestinationId' => $NetFields
> ['destinationid'],
> - 'BillingPartyId' => $NetFields
> ['from'],
> - 'domain' => $NetFields
> ['domain'],
> - 'gateway' => $NetFields
> ['gateway'],
> - 'aNumber' => $NetFields
> ['from'],
> - 'cNumber' => $NetFields
> ['to'],
> - 'ENUMtld' => $NetFields
> ['enumtld'],
> - 'applicationType' => $application,
> - 'RatingTables' => &$this->CDRS-
> >RatingTables,
> + 'duration' => $CDR->duration,
> + 'callId' => $CDR->callId,
> + 'timestamp' => $CDR->timestamp,
> + 'DestinationId' => $CDR-
> >DestinationId,
> + 'domain' => $CDR->domain,
> + 'BillingPartyId' => $CDR-
> >BillingPartyId,
> + 'ENUMtld' => $CDR->ENUMtld,
> + 'RatingTables' => &$this->CDRS-
> >RatingTables
> );
>
> $Rate->calculate($RateDictionary);
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20080528/f6976a97/attachment.htm>
More information about the sr-users
mailing list