asterisk2billing.org
http://forum.asterisk2billing.org/

Blocking Account at Zero
http://forum.asterisk2billing.org/viewtopic.php?f=35&t=8121
Page 1 of 1

Author:  SCDcomm [ Sat Sep 11, 2010 10:57 am ]
Post subject:  Blocking Account at Zero

I have been noticing that if there is a call in progess and the account goes into the negative the call continues and does not cut it off. Additionally other calls can enter as long as there is some funds, further taking the account into the negative. Is there a way of having the account shut off after it gets to zero and or reach the minimum amount to make a call? By having this happen it would make the account a true prepaid since a prepaid should not be allowed to into the negative.

Thank you for your great work.

Author:  jroper [ Sat Sep 11, 2010 11:14 am ]
Post subject:  Re: Blocking Account at Zero

Hi

The system works as follows:-

    Call made,
    match dialled digits to dialcodes, and discover rate
    Check balance and calculate maximum total duration
    Send dial command to Asterisk, containing the total duration of the call with the L parameter
    Calls hangs up, either forcibly, or because customer hangs up.
    Calculate cost of call.
    Update balance.

So with a single call, there is no way (unless you have made some "improvements") that the balance can go into negative balance.

However, you will notice that the balance is updated at the end of the call. Therefore calls on the same account that start during the first call will be given the same maximum time duration as the first.

This problem can be alleviated with the dial balance reservation setting in the agi-conf.

Joe

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/