[Asterisk-Dev] Real Time Billing ??

Peter Svensson psvasterisk at psv.nu
Sun May 29 06:00:41 MST 2005


On Sun, 29 May 2005, Ousmane Wilane wrote:

>   AKA> This workaround is ok for simple stuff but imagine you have a
>   AKA> billing account assigned to many users, when there is more than
>   AKA> 1 call at the same time autohangup workaround is inefficient.
> 
> No you didn't read enough as usual :). This problem is already solved
> and no need to autohangup, no need to hook anything (you'll got it
> wrong anyway :). Read the doc of Dial and you'll see that any call can
> get hanged up for a given duration and even announce can be played
> before the hangup for a configurable duration (that even can be
> recurrent).

I think you missed the point of the original poster. When seveal calls 
billed to the same account are allowed the simple Dial-options are not 
sufficient. See the following example:

  The account has 15 minutes of call time left when call 1 is started. The 
  limit for that call is set to 15 minutes. After 5 minutes call 2 is 
  started. At this point there is 10 minutes left on the account. The 
  second call get either a 10 minutes limit (without taking call 1 into 
  account), or 5 minutes limit. In either case call 1 can overdraw the
  credit.

Of course, this may or may not be a problem. Business accounts are 
typically billed after the calls rather than in advance, with a resonable 
credit. These are the accounts where multiple simultaneous calls are most 
requested.

Hanging up calls when the credit runs out, playing announcements etc 
should probably be outside Asterisk in a piece of business logic. Ideally 
it would be able to integrate with e.g. AOC from isdn or OSP for voip 
links.

Peter





More information about the asterisk-dev mailing list