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

Simultaneous Access allowing customers to go negative
http://forum.asterisk2billing.org/viewtopic.php?f=22&t=8525
Page 1 of 1

Author:  RobinA [ Sat Jan 22, 2011 7:08 pm ]
Post subject:  Simultaneous Access allowing customers to go negative

Hello All,
This may not be a bug but simple misconfiguration in A2B 1.4.X.
A customer is setup for simultaneous access and calls someone. they then put the first call on hold and calls a second person. The time announced is based on the current balance. Both calls are completed and the customer is now negative to the tune of a few dollars. If I use balance reservation customers go negative a few pennies on a single call.
Maybe someone can help figure out the problem from the attached call log.
NOTE: At the end of call #1, the custoer has a balance of -4.03.

Thanks,

Robin.

Attachments:
callA2Blog.JPG
callA2Blog.JPG [ 51.98 KiB | Viewed 3111 times ]

Author:  jroper [ Tue Jan 25, 2011 12:24 pm ]
Post subject:  Re: Simultaneous Access allowing customers to go negative

Hi

Because of the fact that the balance is updated at the end of the call, calls starting while another is in progress will use the same initial balance, and therefore maximum duration. there is nothing that can be done about this,

The problem can be alleviated by using dial balance reservation.

Joe

Author:  RobinA [ Tue Jan 25, 2011 2:11 pm ]
Post subject:  Re: Simultaneous Access allowing customers to go negative

Joe,

Thanks for your response. I looked at the [balance reservation] and that seems punitive for those making a single call. A balance reservation of $0.25 may be reasonable in most cases, but with long expensive calls, that will not work. One of the major problems I've encountered with all versions (up to 1.8.5) is the [in use] flag not being reset even though the balance is adjusted correctly. Maybe I'm not setting something correctly. So! I was wondering if the [in use] flag could be checked when the call is initiated and the minutes adjusted for the call(s) in session, only for prepaid customers. This would not be the ideal solution, since subsequent calls could be to different destinations with different rates, but it would avoid large negative balances.
The second part of my proposal would be to run a cron job every X minutes to check if there are any ghost [in use] flags set and reset them. Your thoughts would be appreciated.

Robin.

Author:  faizan123 [ Wed Mar 18, 2015 4:28 am ]
Post subject:  Re: Simultaneous Access allowing customers to go negative

The second part of my proposal would be to run a cron job every X minutes to check if there are any ghost [in use] flags set and reset them. Your thoughts would be appreciated.



__________________
aliii

Author:  jroper [ Wed Mar 18, 2015 12:26 pm ]
Post subject:  Re: Simultaneous Access allowing customers to go negative

Hi

The difficulty would be working out what is supposed to be inuse, because it is, and what is not supposed to be inuse.

You could only run a script like this if there were zero calls on the platform.

Something like every 5 or 10 minutes,
asterisk -rx "show channels"
If channels in use, exit.
If no channels in use then MySQL update inuse to 0

Joe

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