[asterisk-users] Asterisk Realtime Billing Question???

Sherwood McGowan sherwood.mcgowan at gmail.com
Thu Oct 21 11:09:09 CDT 2010


Tarek,

Ouch, I'm quite sorry. I couldn't sleep when I tried to around 4:30AM
after working on a project all night. Unfortunately, I'm not quite
sure what your question was...

:( Maybe when I wake up a bit more


On Thu, Oct 21, 2010 at 5:38 AM, Tarek Sawah <tareksawah at hotmail.com> wrote:
>
> actually my mail was not meant to be disrespectful. it was an inquiry. i have a billing system and had a few of those thoughts regarding real time billing. my issue was explaining to a customer that his call disconnected an hour earlier because someone else used his account.. I'm doing retail not wholesale, you may understand my question more clearly now?
>
> Regards
>
>
> Tarek Sawah
>
> Information Technology Adviser
>
> Integrated Digital Systems
>
> CCNP, MCSE, RHCE, TELECOM
>
> USA: +1 386 492 9993
>
>
>
>
>
>
>
> ----------------------------------------
>> From: sherwood.mcgowan at gmail.com
>> Date: Thu, 21 Oct 2010 05:18:17 -0500
>> To: asterisk-users at lists.digium.com
>> Subject: Re: [asterisk-users] Asterisk Realtime Billing Question???
>>
>> Tarek,
>>
>> I'm not sure why it would be our problem is someone came into your
>> office and started making long distance calls over a trunk I was
>> providing your company.... I'm pretty sure that if I had tried that
>> with some of my carriers in the past they would have laughed until
>> they cried...
>>
>> Oh, and also, since this was a wholesale carrier, the customers were
>> in control of their own freeze amount. It was there to allow THEM to
>> control their account better. I'd be willing to bet that my clients
>> would have been happy to just keep billing them for every minute they
>> used.
>>
>> Lastly, I would like to just say, I'm not the guy who requested the
>> feature, I'm the guy who figured out how to make it happen, and making
>> it happen back in early 2006, when the MySQL addon was just BARELY
>> stable...
>>
>> It's ok, I don't need respect, I have the knowledge that I'm the mick,
>> and I'm awesome :P
>>
>> Cheers :D
>>
>> On Thu, Oct 21, 2010 at 4:37 AM, Tarek Sawah  wrote:
>> > If you look at it the way you want it.. you usually tell your customer the
>> > available funds and minutes in their account right?
>> > How will you explain "politely" that you have dropped their calls for lack
>> > of balance because someone else used their account?
>> > If you don't tell them their balance and call duration before call .. then
>> > that won't be a problem.
>> > Now you can do some kind of script to do the math and disconnect calls when
>> > balance is over.
>> >
>> > From: asterisk-users-bounces at lists.digium.com
>> > [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of DHAVAL
>> > INDRODIYA
>> > Sent: Thursday, October 21, 2010 9:31 AM
>> > To: Asterisk Users Mailing List - Non-Commercial Discussion
>> > Subject: Re: [asterisk-users] Asterisk Realtime Billing Question???
>> >
>> > Hi Sherwood ,
>> >
>> > well , i think you did not understand my question , i want real time billing
>> > like as i mentioned that if i want to dial 5 number with different call rate
>> > how can i access same
>> > balance into those 5 people, if all are connected how can i periodically
>> > update billing , as you suggested it will assign total balance to those 5
>> > people but actually we can not do like this as total balance of user $100 ,
>> > as per your suggestion it will give $100 for those 5 people which is
>> > practically wrong i think.
>> >
>> > give your thougts.
>> >
>> > regards
>> > dhaval
>> > On Thu, Oct 21, 2010 at 11:44 AM, Sherwood McGowan
>> >  wrote:
>> > On Thu, Oct 21, 2010 at 12:24 AM, DHAVAL INDRODIYA
>> >  wrote:
>> > Hello All,
>> >
>> > after so long time i posted a new question regarding billing, hope  anyone
>> > have some solution.
>> >
>> > I have situation in that i want to do billing of more than 1 call in real
>> > time below are scenario and explanation.
>> >
>> >
>> > Scenario:
>> >  A customer called my DID number and after that from here i dial few number
>> > let say 5 number. once number are placed into DIAL
>> > i will put this customer into conference [MEETME] , once a Members are
>> > picked up call they will also patched into conference and
>> > talking is started, every thing working fine with DIAL-PLAN and DB look up.
>> >
>> > Now, i want to do billing on customer dialed my DID, and from that actually
>> > it DIALED 5 numbers, how can i DO real time billing
>> > into this situation, like numbers can be different It can be ISD,STD,Local
>> > and also free .
>> >
>> > if customer having initial balance of $100 then how can i check balance
>> > every time.in a situation once balance is nil then i want to disconnect
>> > calls . is any one facing this type of situation.
>> >
>> > give me some  idea ,
>> >
>> > regards
>> > Dhaval
>> >
>> > --
>> > _____________________________________________________________________
>> > -- 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
>> >
>> >
>> > Dhaval,
>> > This sounds very much like a system I'm working on for a client right now.
>> > I'm not permitted to disclose much about it due to the NDA i signed, but
>> > I'll risk giving you a point in the right direction.
>> >
>> > First, you should create a table in your database that has a column called
>> > callid, and other columns that you will have to decide upon. This table will
>> > be called something like 'call_references'. Oh, and you'll want to define
>> > callid as the primary key for records in that table, but DO NOT make it an
>> > autoincrement, you're going to populate it with a value that is described in
>> > the next step.
>> >
>> > Second, at the beginning of the original call you mentioned, define a
>> > variable that will be unique to that call. I personally have done this by
>> > stripping all non-digits from the caller's callerid (using
>> > Set(newcid=${FILTER(0123456789,${CALLERID(number)})} ), and then adding the
>> > to ${EPOCH}. I did it this way: ${MATH(${newcid}+${EPOCH})}.
>> >
>> > Next (this is where I have to start being a bit vague), you're going to
>> > perform an INSERT query, creating a new call_references record (using that
>> > variable I just showed you how to construct as callid's value).
>> >
>> > Now, when you defined that variable, you should have preceded the variable
>> > name with two underscores ( __ ), which will tell Asterisk that channels
>> > spawned by the current channel will inherit that variable and it's value.
>> >
>> > Voila, you now have a method for storing realtime data such as billing
>> > information between MULTIPLE calls.
>> >
>> > I wish I could tell you more, but I can't violate my client's Non-Disclosure
>> > Agreement.
>> >
>> > Hope this helps you out!
>> >
>> > Sherwood McGowan
>> >
>> >
>> > --
>> > _____________________________________________________________________
>> > -- 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
>
> --
> _____________________________________________________________________
> -- 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