-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi guy's I've got an existing application which takes CDR information from a com port from an avaya switch, that we use for billing and accounting. Since the cost up upgrading the Index platform is extortionate, we're looking into alternatives and I've been told to come look at asterisk. First off, asterisk is excellent... It's fast, it doesn't cost a bomb to implement or connect and is easily extensible. Better than any Avaya kit :P Secondly and the reason for this email is that I'm looking to pipe the CDR information generated by Asterisk into a billing system... Can this be done? It's probably a stupid question... so feel free to tell me to feck off... Cheers Richard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6-2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAj8GBagACgkQvgpMAbM8iLRr9gCdFTpMon8fPSAIhcbByLxG7X9P JE0AoMy0fJm+9TRTNt74/wa0J2tJJVR7 =mMUQ -----END PGP SIGNATURE-----
BK [address only for mailing lists]
2003-Jul-04 23:18 UTC
[Asterisk-Users] CDR Information and Pipes
On Saturday, July 5, 2003, at 07:54 AM, Richard Smith wrote:> Secondly and the reason for this email is that I'm looking to pipe the > CDR information generated by Asterisk into a billing system... Can this > be done?Yes, it can be done. If you want to use the CDR's for billing, you should set the parameter "amaflags" in the respective configuration files (ie zapata.conf) to "billing" and issue a reload command on the asterisk console, so it reloads the configuration files. Now, you have two choices how you want Asterisk to give you the CDRs: right into a MySQL database (see cdr_mysql.conf) or into a flat file in /var/log/asterisk/cdr-csv. If you have a billing system that can import the CDRs directly from MySQL, then you will probably want to use the database route, but most billing systems I know expect CDRs in a flat file. Typically, you have what is called a mediation device between the switch generating the CDRs (in this case Asterisk) and the billing platform. In general, a mediation device performs the following functions: Stage 1: call collection read the CDRs from the switch, typically by polling (ie periodically perform an ftp get) Stage 2: integrity check verify the CDRs are not corrupt or incomplete, generate alarms if any are Stage 3: filtering make sure there are no duplicates and omit anything that is not required for billing Stage 4: normalisation convert the CDRs into an output format that downstream systems (ie billing system) can understand Stage 5: distribution provide the CDRs in the proper format to any downstream system (billing system, settlement, fraud) Now, you can either let the billing system poll the CDR files off your mediation device, or you can push them into the billing platform. Either way, it is important to make sure that files are renamed after the transfer is complete so as to make sure that you don't start to process them before they are complete. I have seen the biggest telcos lose hundred thousands of dollars because there was no proper handshake and the billing system would assume that it had reached the end of a CDR file while there were still CDRs being written to it which ended then up unbilled. As to the format that your billing system will want the CDRs to be in, you need to consult the documentation or the vendor of your billing platform. Within limits, this is configurable. As to a mediation device, I only know the market in respect of big telcos and there the typical installation will set you back a million USD and more. There may be solutions for smaller installations at a more affordable price tag, but you may also be able to write your own. I have led many mediation projects for big telcos where we needed an interim solution during the time it took to deploy the solution of the selected vendor. For that we wrote various mediation devices ourselves and strange as it may seem they often performed better and were more flexible than the final solution. In many cases you will find that there are code snippets for parsing CDRs in open source libraries such as the PERL archive but also we came across various Java libraries for CDR processing. hope this helps regards bk