[Freeswitch-users] where to put perl code to add cdr info

Steven Ayre steveayre at gmail.com
Thu Sep 23 05:58:54 PDT 2010


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



On 23 September 2010 12:29, <covici at ccs.covici.com> wrote:

> 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 at ccs.covici.com
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100923/c3e05ad3/attachment-0001.html 


More information about the FreeSWITCH-users mailing list