Hi Guys I'm looking for some pointers on how to collect CDR's and store in mysql. Is there anything built in yet? I can rate the calls as a batch process, I simply need the call data. Regards
Use the script in scripts/contrib/wasim/ as a starting point. Basically, you log to csv files, and then the script periodically picks them up and loads to your DB. This is using mysql as an example, but you can do the same with postgres as well. If you need realtime inserts, then use mod_cdr_xml and have those post to a script on a webserver that parses the xml and inserts into appropriate tables. This is what I use along with a rails app. Remember that if you do real time, you also need to periodically scrape the error directory and load those (mod_cdr_xml will save to error if it can't successfully post to your script). On 2/6/2009 10:09 AM, Nik Middleton wrote:
Hi Guys
I’m looking for some pointers on how to collect CDR’s and store in mysql. Is there anything built in yet?
I can rate the calls as a batch process, I simply need the call data.
Regards
Thanks, I was confused because I saw that mod cdr had been dropped. Due anticipated call volumes, batch processing is ideal, it keeps any MySql load issues away from FS Regards, -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Rupa Schomaker (lists) Sent: 06 February 2009 16:27 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's Use the script in scripts/contrib/wasim/ as a starting point. Basically, you log to csv files, and then the script periodically picks them up and loads to your DB. This is using mysql as an example, but you can do the same with postgres as well. If you need realtime inserts, then use mod_cdr_xml and have those post to a script on a webserver that parses the xml and inserts into appropriate tables. This is what I use along with a rails app. Remember that if you do real time, you also need to periodically scrape the error directory and load those (mod_cdr_xml will save to error if it can't successfully post to your script). On 2/6/2009 10:09 AM, Nik Middleton wrote:
Hi Guys
I'm looking for some pointers on how to collect CDR's and store in mysql. Is there anything built in yet?
I can rate the calls as a batch process, I simply need the call data.
Regards
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Is mod_cdr_xml asynchronous ... by that I mean .. if there is a communication failure how does this effect load on the system or the call for that matter... it wouldn’t hold up the progress or delay the turn up of the call or anything would it? I understand it would write to the error directory (but my thoughts are what is the impact of this beyond the obvious IO hit) I guess a good question is what is more load intensive??? 1.) mod_cdr_csv (with batch script that loads into DB somewhere) 2.) mod_cdr_xml (posting to lighttpd on remote host inserting into DB) I'm thinking about this for a system that would be handling in excess of 200-300 call setups per second. -Adam -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Rupa Schomaker (lists) Sent: Friday, February 06, 2009 11:27 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's Use the script in scripts/contrib/wasim/ as a starting point. Basically, you log to csv files, and then the script periodically picks them up and loads to your DB. This is using mysql as an example, but you can do the same with postgres as well. If you need realtime inserts, then use mod_cdr_xml and have those post to a script on a webserver that parses the xml and inserts into appropriate tables. This is what I use along with a rails app. Remember that if you do real time, you also need to periodically scrape the error directory and load those (mod_cdr_xml will save to error if it can't successfully post to your script). On 2/6/2009 10:09 AM, Nik Middleton wrote:
Hi Guys
I’m looking for some pointers on how to collect CDR’s and store in mysql. Is there anything built in yet?
I can rate the calls as a batch process, I simply need the call data.
Regards
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Mod_xml_cdr will drop a file to the file system on failure to post. You can also leverage this drop a file to the file system and run a CDR processor locally. We handle call rates in the 500+ range using the local file system as a caching mechanism and a simple PHP script to rate the CDRs and load them into a pgsql db.
From: Adam Long <ajlong@worldlink.net> Reply-To: <freeswitch-users@lists.freeswitch.org> Date: Fri, 6 Feb 2009 12:30:34 -0500 To: <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Call accounting - CDR's
Is mod_cdr_xml asynchronous ... by that I mean .. if there is a communication failure how does this effect load on the system or the call for that matter... it wouldn¹t hold up the progress or delay the turn up of the call or anything would it?
I understand it would write to the error directory (but my
thoughts are what is the impact of this beyond the obvious IO hit)
I guess a
good question is what is more load intensive???
1.) mod_cdr_csv (with batch
script that loads into DB somewhere) 2.) mod_cdr_xml (posting to lighttpd on remote host inserting into DB)
I'm thinking about this for a system that
would be handling in excess of 200-300 call setups per second.
-Adam -----Original Message----- From:
freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Rupa Schomaker (lists) Sent: Friday, February 06, 2009 11:27 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's
Use the script in scripts/contrib/wasim/ as a starting
point.
Basically, you log to csv files, and then the script periodically
picks them up and loads to your DB. This is using mysql as an example, but you can do the same with postgres as well.
If you need realtime inserts,
then use mod_cdr_xml and have those post to a script on a webserver that parses the xml and inserts into appropriate tables. This is what I use along with a rails app.
Remember that if you do real time, you also need to
periodically scrape the error directory and load those (mod_cdr_xml will save to error if it can't successfully post to your script).
On 2/6/2009 10:09 AM,
Nik Middleton wrote: Hi Guys
I¹m looking for some pointers on how to collect CDR¹s and store in mysql. Is there anything built in yet?
I can rate the calls as a batch process, I simply need the call data.
Regards
_______________________________________________ Freeswitch-users mailing
list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman /listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/freeswitch-users http://www.freeswitch.org
____________________________
___________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman /listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/freeswitch-users http://www.freeswitch.org
So you're simply posting this file to a web server? How do you find the load on it at this rate of calls? BTW can anyone point me to resources discussing how to do this? (Using a web server to post data to a db) I've not this sort of thing before, and I'm not too sure what I should be goggling for Regards, -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Ken Rice Sent: 06 February 2009 17:40 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's Mod_xml_cdr will drop a file to the file system on failure to post. You can also leverage this drop a file to the file system and run a CDR processor locally. We handle call rates in the 500+ range using the local file system as a caching mechanism and a simple PHP script to rate the CDRs and load them into a pgsql db.
From: Adam Long <ajlong@worldlink.net> Reply-To: <freeswitch-users@lists.freeswitch.org> Date: Fri, 6 Feb 2009 12:30:34 -0500 To: <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Call accounting - CDR's
Is mod_cdr_xml asynchronous ... by that I mean .. if there is a communication failure how does this effect load on the system or the call for that matter... it wouldn¹t hold up the progress or delay the turn up of the call or anything would it?
I understand it would write to the error directory (but my
thoughts are what is the impact of this beyond the obvious IO hit)
I guess a
good question is what is more load intensive???
1.) mod_cdr_csv (with batch
script that loads into DB somewhere) 2.) mod_cdr_xml (posting to lighttpd on remote host inserting into DB)
I'm thinking about this for a system that
would be handling in excess of 200-300 call setups per second.
-Adam -----Original Message----- From:
freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Rupa Schomaker (lists) Sent: Friday, February 06, 2009 11:27 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's
Use the script in scripts/contrib/wasim/ as a starting
point.
Basically, you log to csv files, and then the script periodically
picks them up and loads to your DB. This is using mysql as an example, but you can do the same with postgres as well.
If you need realtime inserts,
then use mod_cdr_xml and have those post to a script on a webserver that parses the xml and inserts into appropriate tables. This is what I use along with a rails app.
Remember that if you do real time, you also need to
periodically scrape the error directory and load those (mod_cdr_xml will save to error if it can't successfully post to your script).
On 2/6/2009 10:09 AM,
Nik Middleton wrote: Hi Guys
I¹m looking for some pointers on how to collect CDR¹s and store in mysql. Is there anything built in yet?
I can rate the calls as a batch process, I simply need the call data.
Regards
_______________________________________________ Freeswitch-users mailing
list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman /listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/freeswitch-users http://www.freeswitch.org
____________________________
___________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman /listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
This is built into mod_xml_cdr and should be covered on its wiki page... I personally don't post the records to a web server as I think that's too much over head at this load... I use a script to scrape the directory and process the CDRs... This gives me the FileSystem as a buffer, and allows me to get a ton of info out of the xml cdrs like custom channel variables etc K
From: Nik Middleton <nik.middleton@noblesolutions.co.uk> Reply-To: <freeswitch-users@lists.freeswitch.org> Date: Fri, 6 Feb 2009 21:07:12 -0000 To: <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Call accounting - CDR's
So you're simply posting this file to a web server? How do you find the load on it at this rate of calls?
BTW can anyone point me to resources discussing how to do this? (Using a web server to post data to a db) I've not this sort of thing before, and I'm not too sure what I should be goggling for
Regards,
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Ken Rice Sent: 06 February 2009 17:40 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's
Mod_xml_cdr will drop a file to the file system on failure to post. You can also leverage this drop a file to the file system and run a CDR processor locally.
We handle call rates in the 500+ range using the local file system as a caching mechanism and a simple PHP script to rate the CDRs and load them into a pgsql db.
From: Adam Long <ajlong@worldlink.net> Reply-To: <freeswitch-users@lists.freeswitch.org> Date: Fri, 6 Feb 2009 12:30:34 -0500 To: <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Call accounting - CDR's
Is mod_cdr_xml asynchronous ... by that I mean .. if there is a communication failure how does this effect load on the system or the call for that matter... it wouldn¹t hold up the progress or delay the turn up of the call or anything would it?
I understand it would write to the error directory (but my
thoughts are what is the impact of this beyond the obvious IO hit)
I guess a
good question is what is more load intensive???
1.) mod_cdr_csv (with batch
script that loads into DB somewhere) 2.) mod_cdr_xml (posting to lighttpd on remote host inserting into DB)
I'm thinking about this for a system that
would be handling in excess of 200-300 call setups per second.
-Adam
-----Original Message----- From:
freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Rupa Schomaker (lists) Sent: Friday, February 06, 2009 11:27 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's
Use the script in scripts/contrib/wasim/ as a starting
point.
Basically, you log to csv files, and then the script periodically
picks them up and loads to your DB. This is using mysql as an example, but you can do the same with postgres as well.
If you need realtime inserts,
then use mod_cdr_xml and have those post to a script on a webserver that parses the xml and inserts into appropriate tables. This is what I use along with a rails app.
Remember that if you do real time, you also need to
periodically scrape the error directory and load those (mod_cdr_xml will save to error if it can't successfully post to your script).
On 2/6/2009 10:09 AM,
Nik Middleton wrote: Hi Guys
I¹m looking for some pointers on how to collect CDR¹s and store in mysql. Is there anything built in yet?
I can rate the calls as a batch process, I simply need the call data.
Regards
_______________________________________________ Freeswitch-users mailing
list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman /listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/freeswitch-users http://www.freeswitch.org
____________________________
___________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman /listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/opt ions/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Just out of curiosity ... You actually set the values in xml_cdr_conf.xml to an invalid value ... and then FS tries it and then dumps it into the err_dir? Nik, Just configure the xml_conf_cdr and it will post all of the channel variables to your web server ... you can look at the variables and see what you want. Or I actually like Ken's suggestion ... that makes a lot of sense ... same benefit of having all of the channel variables ... no overhead. SDR
Nope you comment out that line and it wont even attempt to post and will drop it into the log/xml_cdr directory From: Shelby Ramsey <sicfslist@gmail.com> Reply-To: <freeswitch-users@lists.freeswitch.org> Date: Fri, 6 Feb 2009 15:30:13 -0600 To: <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Call accounting - CDR's Just out of curiosity ... You actually set the values in xml_cdr_conf.xml to an invalid value ... and then FS tries it and then dumps it into the err_dir? Nik, Just configure the xml_conf_cdr and it will post all of the channel variables to your web server ... you can look at the variables and see what you want. Or I actually like Ken's suggestion ... that makes a lot of sense ... same benefit of having all of the channel variables ... no overhead. SDR _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Guy's, Thanks for all the responses; it's truly refreshing to get so much valuable input. I'm reading the docs furiously, but I still don't know what I don't know yet. But given time I will return the favor to those that come later. Regards
Thanks for all the responses; it's truly refreshing to get so much valuable input. I'm reading the docs furiously, but I still don't know what I don't know yet. But given time I will return the favor to those that come later.
Sounds good! If you feel up to doing any wiki documentation please let me know and I'll be happy to offer some pointers, etc. -MC
More than happy to add my 2 cents worth when I have something useful to say Question regarding the xml cdr's Let's say I have a cron job looking at these files and processing them. How does FS create them. Does a MV occur from some other DIR, as otherwise it's possible I might try and open an in progress record. Regards -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael Collins Sent: 06 February 2009 22:42 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's
Thanks for all the responses; it's truly refreshing to get so much
valuable
input. I'm reading the docs furiously, but I still don't know what I don't know yet. But given time I will return the favor to those that come later.
Sounds good! If you feel up to doing any wiki documentation please let me know and I'll be happy to offer some pointers, etc. -MC _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Question regarding the xml cdr's
Let's say I have a cron job looking at these files and processing them. How does FS create them. Does a MV occur from some other DIR, as otherwise it's possible I might try and open an in progress record.
No worries - the file isn't "available" until it's ready to go, just like being mv'd into the dir. -MC
Great, thanks for that. One of the big issues with Asterisk's way of billing is that if let's say a remote phone diverts a call to another number, say a mobile, because a local channel is created for the redirect, Asterisk loses critical information such as the account code and therefore cannot be billed for. I'm going to try this with FS today and see what happens. It would be awesome if it is accountable. That way I wouldn't have to force the user to do diverts from a web page Regards, -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Michael Collins Sent: 07 February 2009 00:00 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's
Question regarding the xml cdr's
Let's say I have a cron job looking at these files and processing them. How does FS create them. Does a MV occur from some other DIR, as otherwise it's possible I might try and open an in progress record.
No worries - the file isn't "available" until it's ready to go, just like being mv'd into the dir. -MC _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Sat, Feb 7, 2009 at 2:07 AM, Nik Middleton <nik.middleton@noblesolutions.co.uk> wrote:
Great, thanks for that.
One of the big issues with Asterisk's way of billing is that if let's say a remote phone diverts a call to another number, say a mobile, because a local channel is created for the redirect, Asterisk loses critical information such as the account code and therefore cannot be billed for. I'm going to try this with FS today and see what happens. It would be awesome if it is accountable. That way I wouldn't have to force the user to do diverts from a web page
Let us know how it goes and if you have any questions. I'm sure that we can help you nail this one down. -MC
I'm doing this on low volume pbx setup, so posting to the web server is fine with my load. If you are doing high load, then definitely write to files and batch process them. On 2/6/2009 3:07 PM, Nik Middleton wrote:
So you're simply posting this file to a web server? How do you find the load on it at this rate of calls?
BTW can anyone point me to resources discussing how to do this? (Using a web server to post data to a db) I've not this sort of thing before, and I'm not too sure what I should be goggling for
Regards,
-----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Ken Rice Sent: 06 February 2009 17:40 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's
Mod_xml_cdr will drop a file to the file system on failure to post. You can also leverage this drop a file to the file system and run a CDR processor locally.
We handle call rates in the 500+ range using the local file system as a caching mechanism and a simple PHP script to rate the CDRs and load them into a pgsql db.
From: Adam Long <ajlong@worldlink.net> Reply-To: <freeswitch-users@lists.freeswitch.org> Date: Fri, 6 Feb 2009 12:30:34 -0500 To: <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] Call accounting - CDR's
Is mod_cdr_xml asynchronous ... by that I mean .. if there is a communication failure how does this effect load on the system or the call for that matter... it wouldn¹t hold up the progress or delay the turn up of the call or anything would it?
I understand it would write to the error directory (but my
thoughts are what is the impact of this beyond the obvious IO hit)
I guess a
good question is what is more load intensive???
1.) mod_cdr_csv (with batch
script that loads into DB somewhere) 2.) mod_cdr_xml (posting to lighttpd on remote host inserting into DB)
I'm thinking about this for a system that
would be handling in excess of 200-300 call setups per second.
-Adam
-----Original Message----- From:
freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Rupa Schomaker (lists) Sent: Friday, February 06, 2009 11:27 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's
Use the script in scripts/contrib/wasim/ as a starting
point.
Basically, you log to csv files, and then the script periodically
picks them up and loads to your DB. This is using mysql as an example, but you can do the same with postgres as well.
If you need realtime inserts,
then use mod_cdr_xml and have those post to a script on a webserver that parses the xml and inserts into appropriate tables. This is what I use along with a rails app.
Remember that if you do real time, you also need to
periodically scrape the error directory and load those (mod_cdr_xml will save to error if it can't successfully post to your script).
On 2/6/2009 10:09 AM,
Nik Middleton wrote: Hi Guys
I¹m looking for some pointers on how to collect CDR¹s and store in mysql. Is there anything built in yet?
I can rate the calls as a batch process, I simply need the call data.
Regards
What about using a radius server, would that be more resilient? Regards -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Adam Long Sent: 06 February 2009 17:31 To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's Is mod_cdr_xml asynchronous ... by that I mean .. if there is a communication failure how does this effect load on the system or the call for that matter... it wouldn't hold up the progress or delay the turn up of the call or anything would it? I understand it would write to the error directory (but my thoughts are what is the impact of this beyond the obvious IO hit) I guess a good question is what is more load intensive??? 1.) mod_cdr_csv (with batch script that loads into DB somewhere) 2.) mod_cdr_xml (posting to lighttpd on remote host inserting into DB) I'm thinking about this for a system that would be handling in excess of 200-300 call setups per second. -Adam -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Rupa Schomaker (lists) Sent: Friday, February 06, 2009 11:27 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Call accounting - CDR's Use the script in scripts/contrib/wasim/ as a starting point. Basically, you log to csv files, and then the script periodically picks them up and loads to your DB. This is using mysql as an example, but you can do the same with postgres as well. If you need realtime inserts, then use mod_cdr_xml and have those post to a script on a webserver that parses the xml and inserts into appropriate tables. This is what I use along with a rails app. Remember that if you do real time, you also need to periodically scrape the error directory and load those (mod_cdr_xml will save to error if it can't successfully post to your script). On 2/6/2009 10:09 AM, Nik Middleton wrote:
Hi Guys
I'm looking for some pointers on how to collect CDR's and store in mysql. Is there anything built in yet?
I can rate the calls as a batch process, I simply need the call data.
Regards
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org _______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Nik, There are a bunch of ways to do this ... mod_xml_cdr posts to a url then you can parse and dump ... or you can use mod_cdr_csv which allows you to dictate exactly what you want to collect and then parse the file and dump into mysql. There are also a couple of examples here --> http://wiki.freeswitch.org/wiki/Mod_cdr for hacking up the cdr_csv.conf and making it do what you want. SDR
Nik Middleton wrote:
Hi Guys
I’m looking for some pointers on how to collect CDR’s and store in mysql. Is there anything built in yet?
I can rate the calls as a batch process, I simply need the call data.
Regards
------------------------------------------------------------------------
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I use mod_cdr_csv and then run a process every minute to import them into the mysql database. It seems to work well. -- Darren Wiebe darren@aleph-com.net Aleph Communications www.aleph-com.net
participants (8)
-
Adam Long
-
Darren Wiebe
-
Ken Rice
-
Ken Rice
-
Michael Collins
-
Nik Middleton
-
Rupa Schomaker (lists)
-
Shelby Ramsey