[OpenSIPS-Users] quota documentation

samuel samu60 at gmail.com
Tue Nov 15 13:51:26 CET 2011


I've modified opensips and freeradius to use UserName and Realm and
everything seems to work but it looked like BillingPartyIdField was not
honoured...

Thanks again for everything,
samuel

On 15 November 2011 13:10, samuel <samu60 at gmail.com> wrote:

> inline...
>
> On 15 November 2011 12:54, Adrian Georgescu <ag at ag-projects.com> wrote:
>
>>
>> On Nov 15, 2011, at 12:42 PM, samuel wrote:
>>
>> I've dig a little and found out that Quotacheck.php uses UserName as
>> identifier for the user
>>
>>
>> OpenSIPSQuota class uses the BillingPartyIdField set in the CDRS class
>> passed to it at instantiation. Is not hardwired to UserName anywhere.
>>
>
> That's what I thought, but when I added a log for
> $this->BillingPartyIdField in rating.php (function
> initQuotaUsageFromDatabase), it appeared UserName instead of
> CallingStationId, which is the value I had set in global.inc file.
>
> I've looked into cdr_generic.php and can not locate where
> BillingPartyIdField is checked and set as source of the rating
> engine...I've made changes and it looks like as it is unused (CDRTool
> 8.2.2). That's the output of the search:
>
> root at cdrtool:/var/www/CDRTool/library# grep BillingPartyIdField *
> cdr_generic.php:            if ($this->CDRS->BillingPartyIdField &&
> $CarrierInfo['BillingPartyId']) {
> rating.php:        $this->BillingPartyIdField =
> $parent->CDRFields['BillingPartyId'];
> rating.php:            $usage_keys="and ".$this->BillingPartyIdField. " in
> (".$usage_keys.")";
> rating.php:        addslashes($this->BillingPartyIdField),
> rating.php:        addslashes($this->BillingPartyIdField)
> rating.php:
> $accounts[$this->CDRdb->f($this->BillingPartyIdField)]['usage']['calls']
> = $this->CDRdb->f('calls');
> rating.php:
> $accounts[$this->CDRdb->f($this->BillingPartyIdField)]['usage']['duration']
> = $this->CDRdb->f('duration');
> rating.php:
> $accounts[$this->CDRdb->f($this->BillingPartyIdField)]['usage']['cost']
> = $this->CDRdb->f('cost');
> rating.php:
> $accounts[$this->CDRdb->f($this->BillingPartyIdField)]['usage']['traffic']
> = $this->CDRdb->f('traffic');
> rating.php:
> $accounts[$this->CDRdb->f($this->BillingPartyIdField)]['usage']['cost_today']
> = 0;
>
> Am I using a non-stable version? I can set username in cdr_opensips, but I
> don't like the idea of changing the sources because I don't know all the
> implications of such change.
>
> Thanks a lot,
> Samuel.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20111115/3a2a0b6d/attachment-0001.htm>


More information about the Users mailing list