[Asterisk-Users] billing realtime

random cluster ramcluster at gmail.com
Wed Apr 26 01:32:09 MST 2006


 Hi Senad

    i looking for same thing, that is consider absolutetimeout as a
timer, everytime is  near t zero, 3 secs for example, renew it,
reacalculate real credit, and start again until some of the parties
hangup.

    The problem is how to iterate in asterisk config, or in deadagi,
you will need some time values from asterisk anyway, CDR{billsec} and
CDR{duration}, because i think we have to give this control to
asterisk, he really knows the timing of calls. Now the problem number
two. Asterisk set those values above, when the call is completely
finished, i have tried with deadagi in php whit sleep function,
nothing, the values of the varialbles are set after hangup extension,
after deadagi final execution.









 The solution that I looking for  is to take a average-time-call, and
create a timer with it.
 Then base on this value, and the price for destination call, every
time the average-time-call pass substract the consume credit from the
real credit, and set absolute timeout, for this average-time-call.

  But I dont know how to implement this is asterisk. With pseudo-code

    while




2006/4/26, Senad Jordanovic <senad at bicom.us>:
> asterisk-users-bounces at lists.digium.com wrote:
> > On Wed April 26 2006 16:31, Jon Farmer <jon at bctech.co.uk> wrote:
> >> JP Carballo wrote:
> >>> Yes, certainly, through deadagi.
> >>> I just have one question though, why reinvent the wheel?
> >>> There are prepaid systems that work with asterisk.
> >>
> >> I have yet to find a prepaid system that allows multiple concurrent
> >> calls per account. Most seem to be based on a pin number also which I
> >> don't want. Anyone know of a system that allows concurrent calls? --
> >> Jon Farmer
> >> Telford, Shropshire, UK
> >
> >
> > Hi Jon. If a customer has 10 minutes of call credit left and he makes
> > 2 concurrent calls, how do you know to cut off the 2 calls at the 5
> > minute mark rather than cut off both calls after 10 minutes?
>
> The way we solved this is:
>
> 1/ Each account has incoming/outgoing channels
> 2/ Once call is started then the total balance is divided by number of
> outgoing channels for that account. This sets the time limit.
> 3/ If more calls are made then each new call has same absolute timeout.
>
> Above is not perfect, since we are limiting each call to less talk time then
> total balance allows, hence why we are currently
> looking into possibility in changing the value of absolute timeout in memory
> for each of the calls.
>
>
> Senad
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list