<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I tried to understand what you ask but I could not.<div><br></div><div>Nevertheless, the rating logic is described here in detail if you care about reading:</div><div><br></div><div><a href="http://cdrtool.ag-projects.com/projects/cdrtool/repository/entry/doc/RATING.txt">http://cdrtool.ag-projects.com/projects/cdrtool/repository/entry/doc/RATING.txt</a></div><div><br></div><div>Adrian</div><div><div><br><div><div>On Nov 8, 2012, at 10:18 AM, Adria Vidal wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I'm performing some CDR rating with CDRtool, and would like to have multiple ratings depending on domain or customer.<br><br>customers table<br><br>id reseller_id gateway domain subscriber profile_name1 profile_name1_alt profile_name2 profile_name2_alt timezone increment min_duration<br>

11 0 <a href="http://domainA.net">domainA.net</a> domainA_default grn_premium domainA_default grn_premium Europe/Amsterdam 0 0<br>18 0 <a href="http://domainB.net">domainB.net</a> grn_premium grn_premium Europe/Amsterdam 0 0<br><span><a onmouseover="dialecticShowPhoneNumberLinkIcon(this);" onmouseout="dialecticHidePhoneNumberLinkIcon();" title="Dial “17 0 62890009” with Dialectic" href="javascript:dialecticDial('17%200%2062890009');">17 0 62890009</a>@domainA.net linea900_profile grn_premium linea900_profile grn_premium Europe/Amsterdam 0 0</span><br>

<br><br>asterisk_cdr table<br><br>id src dst calldate clid dcontext channel dstchannel lastapp lastdata duration billsec disposition amaflags accountcode uniqueid userfield DestinationId Rate Price Normalized<br><span><a onmouseover="dialecticShowPhoneNumberLinkIcon(this);" onmouseout="dialecticHidePhoneNumberLinkIcon();" title="Dial “41800 62890000” with Dialectic" href="javascript:dialecticDial('41800%2062890000');">41800 62890000</a> <a onmouseover="dialecticShowPhoneNumberLinkIcon(this);" onmouseout="dialecticHidePhoneNumberLinkIcon();" title="Dial “34699980125 2012-10-01” with Dialectic" href="javascript:dialecticDial('34699980125%202012-10-01');">34699980125 2012-10-01</a> 17:27:<a onmouseover="dialecticShowPhoneNumberLinkIcon(this);" onmouseout="dialecticHidePhoneNumberLinkIcon();" title="Dial “47 62890000 0 373” with Dialectic" href="javascript:dialecticDial('47%2062890000%200%20373');">47 62890000 0 373</a> 0 0 0 346 Duration: 373 s</span><br>

&nbsp; &nbsp; &nbsp; &nbsp; <br>Only using <a href="http://domainA.net">domainA.net</a> at dcontext i get correct rating, everything else is rated as Default with <br><br>ConnectFee=0.0000 CallId=41800 Span=1 Duration=373 DestId=346 default Profile=linea900_profile Period=weekday Rate=linea900 Interval=0-24 Cost=0.4568/60 Price=2.8398 PriceIn=0.0000<br>

&nbsp;<br>&nbsp;<br>&nbsp;after putting in dcontext <a href="http://domainA.net">domainA.net</a> i get<br>&nbsp;<br>&nbsp;ConnectFee=0.0000 CallId=41800 Span=1 Duration=373 DestId=346 domain=domainA.net Profile=domainA_default Period=weekday Rate=domainA_default Interval=0-24 Cost=0.0900/60 Price=0.5595 PriceIn=0.0000<br>

&nbsp;<br>&nbsp;<br>&nbsp;and trying with the secondary domain domainB it's ignored and rated as <a href="http://domainA.net">domainA.net</a><br>&nbsp;<br>&nbsp;ConnectFee=0.0000 CallId=41800 Span=1 Duration=373 DestId=346 domain=domainA.net Profile=domainA_default Period=weekday Rate=domainA_default Interval=0-24 Cost=0.0900/60 Price=0.5595 PriceIn=0.0000<br>

&nbsp;<br>&nbsp;Tried too using domain at src user@<br>&nbsp;<br>&nbsp;<br>&nbsp;There is some way to get diferent rates from these data?<br><br>--<br><br>Adriΰ Vidal Romero<br><br><br>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br></blockquote></div><br></div></div></body></html>