<div dir="ltr"><div class="gmail_extra"><div class="gmail_extra">I guess this means it's gone to zero somehow.</div><div class="gmail_extra"><br></div><div class="gmail_extra">My question is ... how did it start off with a value there and how is it zero ... if you can let me know what's happening cuz I have a few more contracts which have zero value as well.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">+----+-------------+--------------+-----------------------+-------------------+----------------------------+---------------------+---------------------+------------+</div>
<div class="gmail_extra">| id | contract_id | cash_balance | cash_balance_interval | free_time_balance | free_time_balance_interval | start | end | invoice_id |</div><div class="gmail_extra">
+----+-------------+--------------+-----------------------+-------------------+----------------------------+---------------------+---------------------+------------+</div><div class="gmail_extra">| 4 | 5 | 0 | 69047.2996051473 | 0 | 0 | 2013-07-01 00:00:00 | 2013-07-31 23:59:59 | NULL |</div>
<div class="gmail_extra">| 9 | 5 | 0 | 180614.057300869 | 0 | 0 | 2013-08-01 00:00:00 | 2013-08-31 23:59:59 | NULL |</div><div class="gmail_extra">
| 36 | 5 | 0 | 118444.60765611 | 0 | 0 | 2013-09-01 00:00:00 | 2013-09-30 23:59:59 | NULL |</div><div class="gmail_extra">| 49 | 5 | 0 | 110544.34936783 | 0 | 0 | 2013-10-01 00:00:00 | 2013-10-31 23:59:59 | NULL |</div>
<div class="gmail_extra">| 70 | 5 | 0 | 308513.299971317 | 0 | 0 | 2013-11-01 00:00:00 | 2013-11-30 23:59:59 | NULL |</div><div class="gmail_extra">
| 80 | 5 | 0 | 0 | 0 | 0 | 2014-01-01 00:00:00 | 2014-01-31 23:59:59 | NULL |</div><div class="gmail_extra">| 99 | 5 | 0 | 0 | 0 | 0 | 2014-02-01 00:00:00 | 2014-02-28 23:59:59 | NULL |</div>
<div class="gmail_extra">+----+-------------+--------------+-----------------------+-------------------+----------------------------+---------------------+---------------------+------------+</div><br><div class="gmail_quote">
On Fri, Feb 21, 2014 at 6:28 PM, Daniel Grotti <span dir="ltr"><<a href="mailto:dgrotti@sipwise.com" target="_blank">dgrotti@sipwise.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi,<br>
looks like contact_balance is missing for that account_id.<br>
please check the following output:<br>
<br>
mysql> select * from billing.contract_balances where contract_id="5";<br>
<br>
where "5" is the source_account_id value in you CDR table.<br>
<br>
<br>
Daniel<br>
<div><div class="h5"><br>
<br>
<br>
On 02/21/2014 06:14 AM, Martin Wong wrote:<br>
> Hi guys,<br>
><br>
> can someone guide me on this? Rate-o-mat died and is causing all sort of<br>
> issues on my end.<br>
><br>
> The error says<br>
><br>
> Error rating CDR batch: No contract balance for CDR 1211994 found<br>
><br>
> Looking at 1211994, it's the following ... any idea? I've never had this<br>
> stop like this before.<br>
><br>
> ----------+---------------+-------+----------+---------------+-------------+---------------+<br>
> | id | update_time | source_user_id |<br>
> source_provider_id | source_external_subscriber_id |<br>
> source_external_contract_id | source_account_id | source_user |<br>
> source_domain | source_cli | source_clir | source_ip |<br>
> destination_user_id | destination_provider_id |<br>
> destination_external_subscriber_id | destination_external_contract_id |<br>
> destination_account_id | destination_user | destination_domain |<br>
> destination_user_dialed | destination_user_in | destination_domain_in |<br>
> peer_auth_user | peer_auth_realm | call_type | call_status | call_code |<br>
> init_time | start_time | duration | call_id<br>
> | source_carrier_cost | source_reseller_cost |<br>
> source_customer_cost | source_carrier_free_time |<br>
> source_reseller_free_time | source_customer_free_time |<br>
> source_carrier_billing_fee_id | source_reseller_billing_fee_id |<br>
> source_customer_billing_fee_id | source_carrier_billing_zone_id |<br>
> source_reseller_billing_zone_id | source_customer_billing_zone_id |<br>
> destination_carrier_cost | destination_reseller_cost |<br>
> destination_customer_cost | destination_carrier_free_time |<br>
> destination_reseller_free_time | destination_customer_free_time |<br>
> destination_carrier_billing_fee_id | destination_reseller_billing_fee_id<br>
> | destination_customer_billing_fee_id |<br>
> destination_carrier_billing_zone_id |<br>
> destination_reseller_billing_zone_id |<br>
> destination_customer_billing_zone_id | frag_carrier_onpeak |<br>
> frag_reseller_onpeak | frag_customer_onpeak | is_fragmented | split |<br>
> rated_at | rating_status | exported_at | export_status |<br>
> +---------+---------------------+--------------------------------------+--------------------+-------------------------------+-----------------------------+-------------------+---------------------+---------------+-------------+-------------+-----------------+---------------------+-------------------------+------------------------------------+----------------------------------+------------------------+------------------+--------------------+-------------------------+---------------------+-----------------------+----------------+-----------------+-----------+-------------+-----------+----------------+----------------+----------+----------------------------------------------+---------------------+----------------------+----------------------+--------------------------+---------------------------+---------------------------+-------------------------------+--------------------------------+--------------------------------+--------------------------------+---------------------------------<br>
+<br>
---------------------------------+--------------------------+---------------------------+---------------------------+-------------------------------+--------------------------------+--------------------------------+------------------------------------+-------------------------------------+-------------------------------------+-------------------------------------+--------------------------------------+--------------------------------------+---------------------+----------------------+----------------------+---------------+-------+----------+---------------+-------------+---------------+<br>
> | 1211994 | 2013-12-01 16:49:02 | f1c1382d-57f9-4b86-bc6b-3c9c316be6ed |<br>
> 1 | username1 | user1 |<br>
> 5 | username1 | X.X.X.X | 61411571373 | 0 |<br>
> X.X.X.X | 0 | 3 |<br>
> | |<br>
> 0 | 61411787787 | X.X.X.X | 0411787787 |<br>
> 61411787787 | X.X.X.X | |<br>
> | call | ok | 200 | 1385876899.128 |<br>
> 1385876934.180 | 3.110 | NDgwNjUzZWFjNWM1M2Q0MTU5NGJmYmZhMDE1ODE3M2E.<br>
> | 0.00 | 0.00 | 0.00 |<br>
> NULL | NULL |<br>
> NULL | NULL | NULL |<br>
> NULL | NULL |<br>
> NULL | NULL |<br>
> 0.00 | 0.00 | 0.00 |<br>
> NULL | NULL |<br>
> NULL | NULL |<br>
> NULL | NULL |<br>
> NULL | NULL |<br>
> NULL | NULL |<br>
> NULL | NULL | NULL | 0 | NULL |<br>
> unrated | NULL | unexported |<br>
> +---------+---------------------+--------------------------------------+--------------------+<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Spce-user mailing list<br>
> <a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><br>
> <a href="http://lists.sipwise.com/listinfo/spce-user" target="_blank">http://lists.sipwise.com/listinfo/spce-user</a><br>
><br>
<br>
_______________________________________________<br>
Spce-user mailing list<br>
<a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><br>
<a href="http://lists.sipwise.com/listinfo/spce-user" target="_blank">http://lists.sipwise.com/listinfo/spce-user</a><br>
</blockquote></div><br></div></div>