[Spce-user] Custom rate-o-mat
Rene Krenn
rkrenn at sipwise.com
Wed Oct 25 06:05:35 EDT 2017
This part with balances is complex unfortunately, but mandatory for fast sum queries (->dashboard) and the prepaid logic.
Trying to summarize: essentially you need to create billing.contract_balances records (if not existent yet) before you begin rating a cdr („catchup“, „carry over“ from prior balance intervals and so on..), and update the balances a call duration is crossing (will usually be the most recent balance interval only) once you have calculated the definite call costs of the cdr. This then needs to be done for the balances of each involved contract (source customer, source provider, destination customer, destination provider).
Regards, rene
Von: Javier Valencia [mailto:jv at voiper.es]
Gesendet: Mittwoch, 25. Oktober 2017 11:54
An: Rene Krenn <rkrenn at sipwise.com>; spce-user at lists.sipwise.com
Betreff: Re: AW: [Spce-user] Custom rate-o-mat
thx
<http://www.voiper.es/>
Javier Valencia | CTO
Centro de Negocios Martín Buendía
Camino de las Cañadas, nº 1C, Portal 1, 2ºG
29649 Mijas (Málaga)
<tel:951562080> 951562080 (T) | <tel:687486759> 687486759 (M)
<http://www.voiper.es/> www.voiper.es
El 25/10/17 a las 10:33, Rene Krenn escribió:
Hi,
you can find what and how to populate in the in the sub catchup_contract_balance entry point in rate-o-mat.pl.
regards, rene
Von: Spce-user [mailto:spce-user-bounces at lists.sipwise.com] Im Auftrag von Javier Valencia
Gesendet: Mittwoch, 25. Oktober 2017 10:25
An: spce-user at lists.sipwise.com <mailto:spce-user at lists.sipwise.com>
Betreff: [Spce-user] Custom rate-o-mat
Hi,
We develop own custom rating engine, and stop a rate-o-mat.
When we rate a cdr (from accounting database) and it's marked as "rating_status: :ok, rated_at: Time.now" and sales/cost prices values, but antifraud and "Peering Costs" and "Customer Revenue" from dahsboard isn't counting.
Which tables must we update to do balances consistently?
Thanks.
Kind regards, Javier Valencia.
--
<http://www.voiper.es/>
Javier Valencia | CTO
Centro de Negocios Martín Buendía
Camino de las Cañadas, nº 1C, Portal 1, 2ºG
29649 Mijas (Málaga)
<tel:951562080> 951562080 (T) | <tel:687486759> 687486759 (M)
<http://www.voiper.es/> www.voiper.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20171025/ef218ee5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 7800 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20171025/ef218ee5/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 824 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20171025/ef218ee5/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 1139 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20171025/ef218ee5/attachment-0005.png>
More information about the Spce-user
mailing list