Dan Bogos from ITsysCOM explains how to support various prepaid and postpaid billing modes, and build your billing system tightly integrated with your Asterisk installation through its ARI Interface.
http://www.cgrates.org/
https://www.asterisk.org/