Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] mod_cdr_csv and mysql


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
foxb at abv.bg
Guest





PostPosted: Tue Sep 08, 2009 10:56 am    Post subject: [Freeswitch-users] mod_cdr_csv and mysql Reply with quote

Hello,

I saw an sql option in mod_cdr_csv.

For my surprise it wrote sql code in Master.csv file instead of recording to mysql database (already setup as ODBC)

Is that normal or I'm missing something?

I read on the wiki that there is additional perl script to load csv to mysql.

Should I do it in that way?

Thanks,

_______________________________________________
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
Back to top
diego.viola at gmail.com
Guest





PostPosted: Tue Sep 08, 2009 11:22 am    Post subject: [Freeswitch-users] mod_cdr_csv and mysql Reply with quote

Hi Hristo,

I recommend that you take a look at mod_event_socket or ESL/FSR, you should make a script that listens for the CHANNEL_HANGUP_COMPLETE and get all the CDR vars from that event, once you do that you can send the CDR info to the db or do anything else.

You can find an example of how to do that here:

http://fisheye.freeswitch.org/browse/FreeSWITCH/contrib/diegoviola/ruby/callcard/cdr.rb

Best regards,

Diego

On Tue, Sep 8, 2009 at 3:50 PM, Hristo Benev <foxb@abv.bg (foxb@abv.bg)> wrote:
Quote:
 Hello,

I saw an sql option in mod_cdr_csv.

For my surprise it wrote sql code in Master.csv file instead of recording to mysql database (already setup as ODBC)

Is that normal or I'm missing something?

I read on the wiki that there is additional perl script to load csv to mysql.

Should I do it in that way?

Thanks,

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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
Back to top
msc at freeswitch.org
Guest





PostPosted: Tue Sep 08, 2009 12:42 pm    Post subject: [Freeswitch-users] mod_cdr_csv and mysql Reply with quote

On Tue, Sep 8, 2009 at 8:50 AM, Hristo Benev <foxb@abv.bg (foxb@abv.bg)> wrote:
Quote:
 Hello,

I saw an sql option in mod_cdr_csv.

For my surprise it wrote sql code in Master.csv file instead of recording to mysql database (already setup as ODBC)

Is that normal or I'm missing something?

The purpose of the SQL template is to create SQL-ready commands that will load your CDRs into a table. It does not perform the operation itself, it merely creates the records in a file on the HDD.
 

Quote:

I read on the wiki that there is additional perl script to load csv to mysql.

Should I do it in that way?


That is one way to do it. By dropping the records into a disk file you have a layer of protection for those annoying occasions when your db goes down. 

Other ways to handle CDRs would include the event socket (which Diego mentioned in his post) as well as mod_xml_cdr. They each have their advantages. Using SQL statements in CSV is pretty easy compared to the other options, however the other options will give you much more information about each call. If the CSV records contain all the data you need then I would use them since it's the easiest to implement.
-MC

Quote:
Thanks,

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services