Too early, the call hangs up then enters the reporting stage where it will write CDRs.
3 approaches I can think of:
- Write a perl daemon that monitors the file for filesize/mtime changes and runs if it sees the file change. You could look at either a periodic stat with a sleep smaller than cron allows or using inotify.
- Make the CSV a FIFO with your perl daemon at the other end (I'd be wary of that - there's no other copy for backup and if your daemon isn't running the FIFO can fill up and lose CDRs)
- Move to mod_xml_cdr which is actually designed for that. You can either use your perl code as a CGI or under apache+mod_perl so you don't have to do a complete rewrite.
I'd say mod_xml_cdr is the best approach.
-Steve
I would like to insert the cdr information when the call hangsup,
rather than some kron job or something -- is there a way I can use
hangup_api_hook to execute the perl code, or is this too early for
cdr_csv to have populated the variables?
Thanks.
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici
covici@ccs.covici.com
_______________________________________________
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