[Spce-user] Strange rate-o-mat behaviour v2.8
George Mason
george.mason at xoomtalk.com
Wed Sep 3 05:32:58 EDT 2014
Hi Daniel
Thanks that's very helpful. So I can see the following in the cdr table:
+------------------+-------------------------------+--------------------------------+--------------------------------+
| destination_user | source_carrier_billing_fee_id |
source_reseller_billing_fee_id | source_customer_billing_fee_id |
+------------------+-------------------------------+--------------------------------+--------------------------------+
| +441273900741 | 46921
| NULL | 46921 |
+------------------+-------------------------------+--------------------------------+--------------------------------+
And this relates to the following fee:
+-------+-------+--------------------+--------------------------+--------+-------------+-----------+------+------------------+----------------------+--------------------+------------------------+-------------------+-----------------------+---------------------+-------------------------+---------------+
| id | bf_id | billing_profile_id | billing_zones_history_id | source
| destination | direction | type | onpeak_init_rate |
onpeak_init_interval | onpeak_follow_rate | onpeak_follow_interval |
offpeak_init_rate | offpeak_init_interval | offpeak_follow_rate |
offpeak_follow_interval | use_free_time |
+-------+-------+--------------------+--------------------------+--------+-------------+-----------+------+------------------+----------------------+--------------------+------------------------+-------------------+-----------------------+---------------------+-------------------------+---------------+
| 46921 | 46921 | 2 | 1147 | .
| 73900 | out | call | 0.0008 |
1 | 0.0008 | 1 | 0.0008
| 1 | 0.0008 | 1
| 0 |
+-------+-------+--------------------+--------------------------+--------+-------------+-----------+------+------------------+----------------------+--------------------+------------------------+-------------------+-----------------------+---------------------+-------------------------+---------------+
What I do not understand is why rate-o-mat matched this fee? The prefix
that I expected it to match was this one:
+-------+-------+--------------------+--------------------------+--------+-------------+-----------+------+------------------+----------------------+--------------------+------------------------+-------------------+-----------------------+---------------------+-------------------------+---------------+
| id | bf_id | billing_profile_id | billing_zones_history_id | source
| destination | direction | type | onpeak_init_rate |
onpeak_init_interval | onpeak_follow_rate | onpeak_follow_interval |
offpeak_init_rate | offpeak_init_interval | offpeak_follow_rate |
offpeak_follow_interval | use_free_time |
+-------+-------+--------------------+--------------------------+--------+-------------+-----------+------+------------------+----------------------+--------------------+------------------------+-------------------+-----------------------+---------------------+-------------------------+---------------+
| 49404 | 49404 | 2 | 1407 | .
| 44 | out | call | 1 |
1 | 1 | 1 | 1
| 1 | 1 | 1
| 0 |
+-------+-------+--------------------+--------------------------+--------+-------------+-----------+------+------------------+----------------------+--------------------+------------------------+-------------------+-----------------------+---------------------+-------------------------+---------------+
I have clearly misunderstood how to express dialled destinations in
billing fees - can you explain?
Thanks again
George
On 03/09/14 08:49, Daniel Grotti wrote:
> 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
> _______________________________________________
> 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