<div dir="ltr">So what happened here where the contract became zero?<div><br></div><div>Is there a way to make it almighty contract so this doesn't happen again?</div><div class="gmail_extra"><div><div dir="ltr"><br></div>
</div>
<br><br><div class="gmail_quote">On Mon, Feb 24, 2014 at 6:45 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Martin,<br>
in order to upgrade rate-o-mat:<br>
<br>
/etc/init.d/rate-o-mat stop<br>
apt-get update<br>
apt-get install ngcp-rate-o-mat<br>
/etc/init.d/rate-o-mat start<br>
<br>
<br>
Yes, it looks like rate-o-mat is blocked since Dicember.<br>
It's trying to rate calls from Dicember but it fails because no contract<br>
balance are there.<br>
<br>
You can't "turn contract off".<br>
Contract is part of billing system.<br>
<br>
Daniel<br>
<div class=""><br>
<br>
<br>
On 02/24/2014 04:55 AM, Martin Wong wrote:<br>
> Also, can you let me know what this contract does?<br>
><br>
> is it possible to turn this off?<br>
><br>
> and also, why is rate-o-mat looking at december ones? Does it mean that<br>
> it hasn't been doing its rating since Jan?<br>
><br>
> Please advise soonest.<br>
><br>
> Thanks<br>
><br>
> Martin<br>
><br>
> On Mon, Feb 24, 2014 at 2:44 PM, Martin Wong<br>
> <<a href="mailto:martin.wong@binaryelements.com.au">martin.wong@binaryelements.com.au</a><br>
</div><div class="">> <mailto:<a href="mailto:martin.wong@binaryelements.com.au">martin.wong@binaryelements.com.au</a>>> wrote:<br>
><br>
> Hi, it's getting stuck all over in the CDR.<br>
><br>
> This is a fairly utilized system and I don't want to upgrade the<br>
> system if it's working.<br>
><br>
> Can you tell me how to get only rate-o-mat upgraded?<br>
><br>
> Martin<br>
><br>
> On Fri, Feb 21, 2014 at 7:06 PM, Daniel Grotti <<a href="mailto:dgrotti@sipwise.com">dgrotti@sipwise.com</a><br>
</div><div><div class="h5">> <mailto:<a href="mailto:dgrotti@sipwise.com">dgrotti@sipwise.com</a>>> wrote:<br>
><br>
> Hi,<br>
> Ok, problem is that the contract_balance from dicember 2013 is<br>
> missing<br>
> and rate-o-mat is traying to rate a call from dicember.<br>
><br>
> I suggest to:<br>
><br>
> 1. upgrade your rate-o-mat (at least v1.5.6)<br>
> 2. delete line 80 and 99 in contract_balance for that user<br>
> 3. restart rate-o-mat<br>
><br>
> if you get the same error for other users (regardind calls from<br>
> Dicember), just delete the lines in contract_balances relate to<br>
> Feb and<br>
> Jan and restart rate-o-mat.<br>
><br>
><br>
> Daniel<br>
><br>
><br>
><br>
><br>
><br>
><br>
> On 02/21/2014 08:57 AM, Martin Wong wrote:<br>
> > I guess this means it's gone to zero somehow.<br>
> ><br>
> > My question is ... how did it start off with a value there and<br>
> how is it<br>
> > zero ... if you can let me know what's happening cuz I have a<br>
> few more<br>
> > contracts which have zero value as well.<br>
> ><br>
> ><br>
> +----+-------------+--------------+-----------------------+-------------------+----------------------------+---------------------+---------------------+------------+<br>
> > | id | contract_id | cash_balance | cash_balance_interval |<br>
> > free_time_balance | free_time_balance_interval | start<br>
> |<br>
> > end | invoice_id |<br>
> ><br>
> +----+-------------+--------------+-----------------------+-------------------+----------------------------+---------------------+---------------------+------------+<br>
> > | 4 | 5 | 0 | 69047.2996051473 |<br>
> > 0 | 0 | 2013-07-01 00:00:00 |<br>
> 2013-07-31<br>
> > 23:59:59 | NULL |<br>
> > | 9 | 5 | 0 | 180614.057300869 |<br>
> > 0 | 0 | 2013-08-01 00:00:00 |<br>
> 2013-08-31<br>
> > 23:59:59 | NULL |<br>
> > | 36 | 5 | 0 | 118444.60765611 |<br>
> > 0 | 0 | 2013-09-01 00:00:00 |<br>
> 2013-09-30<br>
> > 23:59:59 | NULL |<br>
> > | 49 | 5 | 0 | 110544.34936783 |<br>
> > 0 | 0 | 2013-10-01 00:00:00 |<br>
> 2013-10-31<br>
> > 23:59:59 | NULL |<br>
> > | 70 | 5 | 0 | 308513.299971317 |<br>
> > 0 | 0 | 2013-11-01 00:00:00 |<br>
> 2013-11-30<br>
> > 23:59:59 | NULL |<br>
> > | 80 | 5 | 0 | 0 |<br>
> > 0 | 0 | 2014-01-01 00:00:00 |<br>
> 2014-01-31<br>
> > 23:59:59 | NULL |<br>
> > | 99 | 5 | 0 | 0 |<br>
> > 0 | 0 | 2014-02-01 00:00:00 |<br>
> 2014-02-28<br>
> > 23:59:59 | NULL |<br>
> ><br>
> +----+-------------+--------------+-----------------------+-------------------+----------------------------+---------------------+---------------------+------------+<br>
> ><br>
> > On Fri, Feb 21, 2014 at 6:28 PM, Daniel Grotti<br>
> <<a href="mailto:dgrotti@sipwise.com">dgrotti@sipwise.com</a> <mailto:<a href="mailto:dgrotti@sipwise.com">dgrotti@sipwise.com</a>><br>
</div></div><div><div class="h5">> > <mailto:<a href="mailto:dgrotti@sipwise.com">dgrotti@sipwise.com</a> <mailto:<a href="mailto:dgrotti@sipwise.com">dgrotti@sipwise.com</a>>>> wrote:<br>
> ><br>
> > 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<br>
> contract_id="5";<br>
> ><br>
> > where "5" is the source_account_id value in you CDR table.<br>
> ><br>
> ><br>
> > Daniel<br>
> ><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<br>
> causing all<br>
> > sort of<br>
> > > issues on my end.<br>
> > ><br>
> > > The error says<br>
> > ><br>
> > > Error rating CDR batch: No contract balance for CDR<br>
> 1211994 found<br>
> > ><br>
> > > Looking at 1211994, it's the following ... any idea?<br>
> I've never<br>
> > had this<br>
> > > stop like this before.<br>
> > ><br>
> > ><br>
> ><br>
> ----------+---------------+-------+----------+---------------+-------------+---------------+<br>
> > > | id | update_time | source_user_id<br>
> > |<br>
> > > source_provider_id | source_external_subscriber_id |<br>
> > > source_external_contract_id | source_account_id |<br>
> source_user<br>
> > |<br>
> > > source_domain | source_cli | source_clir | source_ip<br>
> |<br>
> > > destination_user_id | destination_provider_id |<br>
> > > destination_external_subscriber_id |<br>
> > destination_external_contract_id |<br>
> > > destination_account_id | destination_user |<br>
> destination_domain |<br>
> > > destination_user_dialed | destination_user_in |<br>
> > destination_domain_in |<br>
> > > peer_auth_user | peer_auth_realm | call_type | call_status |<br>
> > call_code |<br>
> > > init_time | start_time | duration | call_id<br>
> > > | source_carrier_cost |<br>
> 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 |<br>
> source_reseller_billing_fee_id |<br>
> > > source_customer_billing_fee_id |<br>
> source_carrier_billing_zone_id |<br>
> > > source_reseller_billing_zone_id |<br>
> 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 |<br>
> destination_customer_free_time |<br>
> > > destination_carrier_billing_fee_id |<br>
> > 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 |<br>
> is_fragmented | split |<br>
> > > rated_at | rating_status | exported_at | export_status |<br>
> > ><br>
> ><br>
> +---------+---------------------+--------------------------------------+--------------------+-------------------------------+-----------------------------+-------------------+---------------------+---------------+-------------+-------------+-----------------+---------------------+-------------------------+------------------------------------+----------------------------------+------------------------+------------------+--------------------+-------------------------+---------------------+-----------------------+----------------+-----------------+-----------+-------------+-----------+----------------+----------------+----------+----------------------------------------------+---------------------+----------------------+----------------------+--------------------------+---------------------------+---------------------------+-------------------------------+--------------------------------+--------------------------------+--------------------------------+-------------------------<br>
-<br>
---<br>
> -<br>
> ---<br>
> > +<br>
> ><br>
> ---------------------------------+--------------------------+---------------------------+---------------------------+-------------------------------+--------------------------------+--------------------------------+------------------------------------+-------------------------------------+-------------------------------------+-------------------------------------+--------------------------------------+--------------------------------------+---------------------+----------------------+----------------------+---------------+-------+----------+---------------+-------------+---------------+<br>
> > > | 1211994 | 2013-12-01 16:49:02 |<br>
> > f1c1382d-57f9-4b86-bc6b-3c9c316be6ed |<br>
> > > 1 | username1 | user1<br>
> |<br>
> > > 5 | username1 | X.X.X.X | 61411571373<br>
</div></div>> <tel:<a href="tel:61411571373" value="+61411571373">61411571373</a>> | 0 |<br>
> > > X.X.X.X | 0 | 3 |<br>
> > > | |<br>
> > > 0 | <a href="tel:61411787787" value="+61411787787">61411787787</a> <tel:<a href="tel:61411787787" value="+61411787787">61411787787</a>> | X.X.X.X<br>
> | <a href="tel:0411787787" value="+61411787787">0411787787</a> <tel:<a href="tel:0411787787" value="+61411787787">0411787787</a>> |<br>
> > > <a href="tel:61411787787" value="+61411787787">61411787787</a> <tel:<a href="tel:61411787787" value="+61411787787">61411787787</a>> | X.X.X.X<br>
<div><div class="h5">> | |<br>
> > > | call | ok | 200 | 1385876899.128 |<br>
> > > 1385876934.180 | 3.110 |<br>
> > NDgwNjUzZWFjNWM1M2Q0MTU5NGJmYmZhMDE1ODE3M2E.<br>
> > > | 0.00 | 0.00 |<br>
> 0.00 |<br>
> > > NULL | NULL |<br>
> > > NULL | NULL |<br>
> > NULL |<br>
> > > NULL |<br>
> NULL |<br>
> > > NULL |<br>
> NULL |<br>
> > > 0.00 | 0.00 |<br>
> > 0.00 |<br>
> > > NULL |<br>
> NULL |<br>
> > > NULL |<br>
> NULL |<br>
> > > NULL |<br>
> NULL |<br>
> > > NULL |<br>
> NULL |<br>
> > > NULL | NULL |<br>
> > > NULL | NULL | NULL | 0 |<br>
> NULL |<br>
> > > unrated | NULL | unexported |<br>
> > ><br>
> ><br>
> +---------+---------------------+--------------------------------------+--------------------+<br>
> > ><br>
> > ><br>
> > > _______________________________________________<br>
> > > Spce-user mailing list<br>
> > > <a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><br>
> <mailto:<a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>><br>
</div></div>> <mailto:<a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><br>
<div class="">> <mailto:<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>
> <mailto:<a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a>><br>
</div>> <mailto:<a href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><br>
> <mailto:<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>
><br>
><br>
><br>
</blockquote></div><br></div></div>