[asterisk-users] differential billing

Tarek Sawah tareksawah at hotmail.com
Sat Sep 25 17:30:53 CDT 2010


the way i see it can be done.. is using ${CDR(billsec)}  into a dial plan or your AGI, A2billing is a script that runs and waits till the call ends then exists with status 0. it doesn't listen to AMI (as i expect) it pulls the variables after the channel is hungup and then does the calculation something like 
ROUND(${CDR(billsec)}/60) to get FULL MINUTES if calculation in full minute round for example then do the calculation in mysql when inserting the sessionbill or let the PHP or AGI script do the math for you.
200 calls won't be a problem with Server that has good resources.
Just give it a try and let me know.



Tarek Sawah

Information Technology Adviser

Integrated Digital Systems

CCNP, MCSE, RHCE, TELECOM

USA: +1 386 492 9993







________________________________
> From: basit.engg at gmail.com
> Date: Sun, 26 Sep 2010 02:43:05 +0500
> To: asterisk-users at lists.digium.com
> Subject: Re: [asterisk-users] differential billing
>
> Yes. you are right. I was thinking to avoid reinventing the wheel.
> Will write AGIs. Trick is how to charge at 3min 59 sec or 4 min 01 sec
> during live call.
>
> We can monitor channel variables over AMI. But this will be a CPU
> overhead (say for 100 or 200 calls) if we monitor channel variables on
> every second. I want some thing to push channel details on each
> transition (or events like IVR level changed, call duration updated to
> next minute) rather than i request on AMI. Don't know if this logic is
> workable.
>
> Just want a right direction.
>
> --
> Regards,
>
> Abdul Basit | +92 32 1416 4196
>
>
>
>
>
>
> On Sat, Sep 25, 2010 at 11:37 PM, Tarek Sawah
> > wrote:
>
> if you are deploying your own system.. then you can build a small
> application (AGI) that would do the math for you .. will devide the
> call duration into the stages you want .. and does the calculation.. i
> think MYSQL already can do that.. but a PHP script will do it faster
> and easier.. or like our billing system.. C# application interacting
> with Asterisk doing all the math. after all it's all SQL and Asterisk
> working. you can do that with a dial plan i believe.. so why not build
> an AGI to do it for you?
>
>
>
> -- Tarek Sawah
>
> Integrated Digital Systems
>
> CCNA, MCSE, RHCE, VoIP USA: +13864929993
>
>
>
>
>
>
>
>
> ________________________________
> > From: basit.engg at gmail.com
> > Date: Sat, 25 Sep 2010 23:27:56 +0500
> > To: asterisk-users at lists.digium.com
> > Subject: Re: [asterisk-users] differential billing
> >
> > Tarek,
> >
> > I already tested this feature with a2billing.
> >
> > This is difficult to extract the working code from a2billing.
> > Also we are developing billing system so this is not a good idea
> > to deploy another billing system in parallel.
> >
> > Any idea or link might help full.
> >
> >
> >
> >
> > On Fri, Sep 24, 2010 at 9:30 PM, Tarek Sawah
> > > wrote:
> >
> > A quick answer? A2billing.
> >
> > It has what you call it differential billing.. but they call it
> > progressive billing.. 3 steps .. for 3 different rates ..
> >
> > Go for it.. easy to setup and quick to learn and use.
> >
> > Regards
> >
> >
> >
> > From:
> >
> asterisk-users-bounces at lists.digium.com
> >
> [mailto:asterisk-users-bounces at lists.digium.com]
> > On Behalf Of Danny Nicholas
> > Sent: Friday, September 24, 2010 4:19 PM
> >
> > To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
> > Subject: Re: [asterisk-users] differential billing
> >
> >
> >
> > ________________________________
> >
> > From:
> >
> asterisk-users-bounces at lists.digium.com
> >
> [mailto:asterisk-users-bounces at lists.digium.com]
> > On Behalf Of Abdul Basit
> >
> > Sent: Friday, September 24, 2010 8:13 AM
> > To: Asterisk Users Mailing List - Non-Commercial Discussion
> > Subject: [asterisk-users] differential billing
> >
> >
> >
> > Hi All,
> >
> >
> >
> > How can we develop a differential charging setup using asterisk like
> > for 1st min we charge 1 cent, for 2nd min we charge 0.5 cent, for next
> > 30 sec charge @15cent, etc?
> >
> >
> >
> > Any idea, suggestion.
> >
> > --
> > Regards,
> >
> > Abdul Basit | +92 32 1416 4196
> >
> >
> >
> > Since the CDR records the call duration in seconds, this should be a
> > relative “no-brainer”, assuming you are billing post-call. If you are
> > wanting to generate the charges during the live calls, AMI would be
> > your best option for getting a running duration of the connection.
> >
> > --
> > _____________________________________________________________________
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> > New to Asterisk? Join us for a live introductory webinar every Thurs:
> > http://www.asterisk.org/hello
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> >
> >
> > --
> > Regards,
> >
> > Abdul Basit | +92 32 1416 4196
> >
> > --
> > _____________________________________________________________________ --
> > Bandwidth and Colocation Provided by http://www.api-digital.com -- New
> > to Asterisk? Join us for a live introductory webinar every Thurs:
> > http://www.asterisk.org/hello asterisk-users mailing list To
> > UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-users
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
> --
> _____________________________________________________________________ --
> Bandwidth and Colocation Provided by http://www.api-digital.com -- New
> to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello 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