Hey I want to implement billing in Asterisk for a calling card type application. My scenario is like this: PSTN => Asterisk =(IAX)=> Asterisk => PSTN. I used the ${ANSWEREDTIME} and ${DIALEDTIME} variables but ${ANSWEREDTIME} always gives a value even if the call is not answered. e.g. If I dial on a Zap Channel, Zap answers the call the moment the channel starts ringing. So I get an answeredtime even if there has only been ringing. Has anyone encountered this before? Regards riz
Why not to use one of the existing CallingCard solutions such AstCC & AreskiCC! There are pretty mature already and perhaps it would be better to add your efforts on one of them! BTW you can look on the sources to see how we manage ANSWEREDTIME & DIALEDTIME! Rgds, Areski On Tue, 2005-04-19 at 09:33, Rizwan Chaudhry wrote:> Hey > > I want to implement billing in Asterisk for a calling card type application. > > My scenario is like this: PSTN => Asterisk =(IAX)=> Asterisk => PSTN. > I used the ${ANSWEREDTIME} and ${DIALEDTIME} variables but > ${ANSWEREDTIME} always gives a value even if the call is not answered. > e.g. If I dial on a Zap Channel, Zap answers the call the moment the > channel starts ringing. So I get an answeredtime even if there has > only been ringing. > > Has anyone encountered this before? > > Regards > > riz > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
http://www.asterisk-support.ru/Members/litnimax/HowTo/DTLHowto/ My howto for using asterisk with any billing.
Rizwan Chaudhry wrote:> Hey > > I want to implement billing in Asterisk for a calling card type application. > > My scenario is like this: PSTN => Asterisk =(IAX)=> Asterisk => PSTN. > I used the ${ANSWEREDTIME} and ${DIALEDTIME} variables but > ${ANSWEREDTIME} always gives a value even if the call is not answered. > e.g. If I dial on a Zap Channel, Zap answers the call the moment the > channel starts ringing. So I get an answeredtime even if there has > only been ringing. > > Has anyone encountered this before?This is the way it works with ANALOG FXO ports.
Maxim, based on the info in the URL below, you claim to say that completely asterisk based solution for calling card application may not scale. You suggest that the alternative is to use gnugk just to use its AAA, or Radius. In my opinion and experience, I would say by introducing Gnugk and OH323, you take more horsepower out of the Server that you are running the "calling card application". I believe you can do lot better even with an application like ASTCC. Better mean you will be able to handle more calls in the same box. I think one of the best ways to handle large call volume is to make sure that asterisk do the minimum and essential work and build your network around it. If you can set up asterisk to Answer SIP calls, Authenticate the user based on mysql database and then route, again using SIP with codec pass through, that will be the most minimum and efficient way to use asterisk. This kind of setup with a powerful processor based box, can easily handle 100 + concurrent calls with millions of minutes. Then you face the situation where, your most terminating parties are h.323. At this point is where a Cisco 2600XM come in handy. Also, now you want all front end work to be done via web interface, which would give customers real time account recharge, cdr etc. For that you could have a backup mysql with replication. Your website would be talking to this replicated server for real time data. I think this kind of a solution can compete with most medium to large calling card systems out there. Cheers Sathya> -----Original Message----- > From: Maxim Litnitsky [mailto:litnimax@gmail.com] > Sent: Tuesday, April 19, 2005 3:15 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] Billing > > > http://www.asterisk-support.ru/Members/litnimax/HowTo/DTLHowto/ > > My howto for using asterisk with any billing. > >
Just a note on scaling astcc, you can have a database with server replication, so that it scales well, and doesnt subtract from the cpu power of the asterisk boxes. This is regardless of medium for the voice calls. If you then distribute the load across multiple asterisk boxes you build in a system that is more fault tolerant and can scale better. While I havent looked specifically at astcc it would need to ensure that concurrent calls from the same account dont end up going over available minutes if prepaid. This can be accomplished by locking rows in the database, pulling a certain amount of minutes from the database (perhaps into a temp table incase something breaks) etc. Then at regular intervals pull more minutes or drop the call if none are present. I dont know how astcc deals with this particular issue. A scalable solution with redundancy could be implemented with astcc based on an overview of what it is. The fact that you have a realtime database for queries on calls could mean that you can have a easier time with a web interface than batch processing radius accounting logs later. It would also offer a prepaid solution, which would be almost impossible with radius alone. On Tue, 2005-04-19 at 09:16 -0700, Sathya Weerasooriya wrote:> Maxim, based on the info in the URL below, you claim to say that completely > asterisk based solution for calling card application may not scale. You > suggest that the alternative is to use gnugk just to use its AAA, or Radius. > In my opinion and experience, I would say by introducing Gnugk and OH323, > you take more horsepower out of the Server that you are running the "calling > card application". > I believe you can do lot better even with an application like ASTCC. Better > mean you will be able to handle more calls in the same box. I think one of > the best ways to handle large call volume is to make sure that asterisk do > the minimum and essential work and build your network around it. If you can > set up asterisk to Answer SIP calls, Authenticate the user based on mysql > database and then route, again using SIP with codec pass through, that will > be the most minimum and efficient way to use asterisk. This kind of setup > with a powerful processor based box, can easily handle 100 + concurrent > calls with millions of minutes. Then you face the situation where, your most > terminating parties are h.323. At this point is where a Cisco 2600XM come in > handy. Also, now you want all front end work to be done via web interface, > which would give customers real time account recharge, cdr etc. For that you > could have a backup mysql with replication. Your website would be talking to > this replicated server for real time data. I think this kind of a solution > can compete with most medium to large calling card systems out there. > > Cheers > > Sathya > >-- Trixter http://www.0xdecafbad.com UK +44 870 340 4605 Germany +49 801 777 555 3402 US +1 360 207 0479 or +1 516 687 5200 FreeWorldDialup: 635378 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20050419/78b12485/attachment.pgp
To breifly recap Your main asterisk box runs linux, asterisk, ASTCC and MySQL Another box runs linux, mysql, apache The two sql servers are joined, updating each other? or have I missed something?
I am using trixbox ,please any ont knows how to confiure billing on it, I want to make a billing ,I created an account at <http://x.x.x.x/a2billing> http://x.X.X.X/a2billing but it does work ********************************************* No employee or agent is authorized to conclude any binding agreement on behalf of Xplorium with another party by e-mail without express written confirmation by an officer of Xplorium. Any views expressed by an individual in this electronic message do not necessarily reflect views of Xplorium or its subsidiaries and associates. This electronic message and its attachments are solely addressed to the addressee(s), and contain confidential information protected from disclosure belonging to Xplorium. If you are not the intended addressee of this electronic message and its attachments, kindly delete it immediately from your system and notify the sender by electronic mail. You must not copy this message or attachment or disclose its content to any other person. Xplorium does not guarantee the integrity of this electronic message and any of its attachments, or that they are free from computer viruses or other defects. ********************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060623/de3a5af4/attachment.htm