I've modified opensips and freeradius to use UserName and Realm and everything seems to work but it looked like BillingPartyIdField was not honoured...<br><br>Thanks again for everything,<br>samuel<br><br><div class="gmail_quote">
On 15 November 2011 13:10, samuel <span dir="ltr"><<a href="mailto:samu60@gmail.com">samu60@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
inline...<br><br><div class="gmail_quote"><div class="im">On 15 November 2011 12:54, Adrian Georgescu <span dir="ltr"><<a href="mailto:ag@ag-projects.com" target="_blank">ag@ag-projects.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><br><div><div><div>On Nov 15, 2011, at 12:42 PM, samuel wrote:</div><br><blockquote type="cite">I've dig a little and found out that Quotacheck.php uses UserName as identifier for the user </blockquote>
<div><br></div></div><div>OpenSIPSQuota class uses the BillingPartyIdField set in the CDRS class passed to it at instantiation. Is not hardwired to UserName anywhere.</div></div></div></blockquote></div><div><br>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.<br>
<br>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:<br>
<br></div></div>root@cdrtool:/var/www/CDRTool/library# grep BillingPartyIdField *<br>cdr_generic.php: if ($this->CDRS->BillingPartyIdField && $CarrierInfo['BillingPartyId']) {<br>rating.php: $this->BillingPartyIdField = $parent->CDRFields['BillingPartyId'];<br>
rating.php: $usage_keys="and ".$this->BillingPartyIdField. " in (".$usage_keys.")";<br>rating.php: addslashes($this->BillingPartyIdField),<br>rating.php: addslashes($this->BillingPartyIdField)<br>
rating.php: $accounts[$this->CDRdb->f($this->BillingPartyIdField)]['usage']['calls'] = $this->CDRdb->f('calls');<br>rating.php: $accounts[$this->CDRdb->f($this->BillingPartyIdField)]['usage']['duration'] = $this->CDRdb->f('duration');<br>
rating.php: $accounts[$this->CDRdb->f($this->BillingPartyIdField)]['usage']['cost'] = $this->CDRdb->f('cost');<br>rating.php: $accounts[$this->CDRdb->f($this->BillingPartyIdField)]['usage']['traffic'] = $this->CDRdb->f('traffic');<br>
rating.php: $accounts[$this->CDRdb->f($this->BillingPartyIdField)]['usage']['cost_today'] = 0;<br><br>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.<br>
<br>Thanks a lot,<br><font color="#888888">Samuel.<br>
</font></blockquote></div><br>