[Spce-user] Strange rate-o-mat behaviour v2.8

Daniel Grotti dgrotti at sipwise.com
Wed Sep 3 03:49:21 EDT 2014


Hi,
in order to check which fees are used by rate-o-mat to caclutate your
cost, you have to check the CDR:

> select * from accounting.cdr where id="YOUR_CDR_ID"\G


Then check the "_fees_id" lines:

source_carrier_billing_fee_id: NULL
source_reseller_billing_fee_id: 1
source_customer_billing_fee_id: 1

then check the billing database:

> select * from billing_fees_history where id="YOUR_FEES_ID";


that's the fee matched by your destination number called, and the cost
is calculated by using that fees.

Daniel





On 09/02/2014 10:45 PM, George Mason wrote:
> Hi,
>
> Sorry to re-post but really struggling with this. Cannot find out where
> rate-o-mat appears to be getting its costs from. Is there any way I can
> increase logging? Run the process in interactive mode perhaps?
>
> Really grateful of any assistance or advice
>
> Thanks
>
> George
>
>
> On 01/09/14 16:23, George Mason wrote:
>> Hi,
>>
>> Having some trouble understanding carrier rating and interested to
>> understand what's going on. I have created contracts for my SIP peerings
>> with costs for destinations. I have then assigned these to the peering
>> groups and made some test calls.
>>
>> I can see that rate-o-mat is rating the calls and I can see in the cdr
>> table that the calls have a source_carrier_cost assigned after it has
>> run. However I cannot understand how it is calculating the costs, they
>> appear to have no relation to the costs in the billing fees.
>>
>> An example as follows:
>>
>> I set a contract with calls to 44 to have a 1 cent per second billing
>> fee. I then made a 20 secs call. The entry in the cdr table is as follows:
>>
>> +----+-------------+--------------+------------------+---------------------+----------+-----------+---------------------+---------------------+---------------+
>> | id | source_user | source_cli   | destination_user |
>> update_time         | duration | call_type | source_carrier_cost |
>> rated_at            | rating_status |
>> +----+-------------+--------------+------------------+---------------------+----------+-----------+---------------------+---------------------+---------------+
>> |  8 | 225544      | +12127450200 | +441273900741    | 2014-09-01
>> 11:02:01 |   26.170 | call      |                0.02 | 2014-09-01
>> 11:02:01 | ok            |
>> +----+-------------+--------------+------------------+---------------------+----------+-----------+---------------------+---------------------+---------------+
>> 1 row in set (0.00 sec)
>>
>> I cannot see where the system is getting this cost from - it appears to
>> be using a cost of 5c per minute, which I don't have anywhere. I have
>> also tried to change the fee in the billing fee for the contract but
>> this had no effect.
>>
>> Can I increase rate-o-mat's logging to see what it is doing? Or is there
>> some other diagnostic steps I can take?
>>
>> Thanks in advance
>>
>> George
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> https://lists.sipwise.com/listinfo/spce-user




More information about the Spce-user mailing list