inline...<br><br><div class="gmail_quote">On 15 November 2011 12:54, Adrian Georgescu <span dir="ltr">&lt;<a href="mailto:ag@ag-projects.com">ag@ag-projects.com</a>&gt;</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 class="im"><div>On Nov 15, 2011, at 12:42 PM, samuel wrote:</div><br><blockquote type="cite">I&#39;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><br>That&#39;s what I thought, but when I added a log for  $this-&gt;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&#39;ve looked into cdr_generic.php and can not locate where BillingPartyIdField is checked and set as source of the rating engine...I&#39;ve made changes and it looks like as it is unused (CDRTool 8.2.2). That&#39;s the output of the search:<br>
<br></div></div>root@cdrtool:/var/www/CDRTool/library# grep BillingPartyIdField *<br>cdr_generic.php:            if ($this-&gt;CDRS-&gt;BillingPartyIdField &amp;&amp; $CarrierInfo[&#39;BillingPartyId&#39;]) {<br>rating.php:        $this-&gt;BillingPartyIdField = $parent-&gt;CDRFields[&#39;BillingPartyId&#39;];<br>
rating.php:            $usage_keys=&quot;and &quot;.$this-&gt;BillingPartyIdField. &quot; in (&quot;.$usage_keys.&quot;)&quot;;<br>rating.php:        addslashes($this-&gt;BillingPartyIdField),<br>rating.php:        addslashes($this-&gt;BillingPartyIdField)<br>
rating.php:            $accounts[$this-&gt;CDRdb-&gt;f($this-&gt;BillingPartyIdField)][&#39;usage&#39;][&#39;calls&#39;]    = $this-&gt;CDRdb-&gt;f(&#39;calls&#39;);<br>rating.php:            $accounts[$this-&gt;CDRdb-&gt;f($this-&gt;BillingPartyIdField)][&#39;usage&#39;][&#39;duration&#39;] = $this-&gt;CDRdb-&gt;f(&#39;duration&#39;);<br>
rating.php:            $accounts[$this-&gt;CDRdb-&gt;f($this-&gt;BillingPartyIdField)][&#39;usage&#39;][&#39;cost&#39;]     = $this-&gt;CDRdb-&gt;f(&#39;cost&#39;);<br>rating.php:            $accounts[$this-&gt;CDRdb-&gt;f($this-&gt;BillingPartyIdField)][&#39;usage&#39;][&#39;traffic&#39;]  = $this-&gt;CDRdb-&gt;f(&#39;traffic&#39;);<br>
rating.php:            $accounts[$this-&gt;CDRdb-&gt;f($this-&gt;BillingPartyIdField)][&#39;usage&#39;][&#39;cost_today&#39;] = 0;<br><br>Am I using a non-stable version? I can set username in cdr_opensips, but I don&#39;t like the idea of changing the sources because I don&#39;t know all the implications of such change.<br>
<br>Thanks a lot,<br>Samuel.<br>