[Freeswitch-users] where to put perl code to add cdr info
covici at ccs.covici.com
covici at ccs.covici.com
Fri Sep 24 01:29:45 PDT 2010
OK, thanks for that -- so am I correct that the XML will appear as
standard input to the script? And I guess I will have to write out the
.csv myself which will be a pain, but its really convenient to have
that.
Thanks again.
Steven Ayre <steveayre at gmail.com> wrote:
> 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
> >
>
> ----------------------------------------------------
> Alternatives:
>
> ----------------------------------------------------
> _______________________________________________
> 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
--
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
More information about the FreeSWITCH-users
mailing list