[Freeswitch-users] Pushing CDR Information into Zeromq
Michael Giagnocavo
mgg at giagnocavo.net
Sat Jul 7 14:56:48 MSD 2012
Regarding "safe" variables like billsec: The issue is that most of those things are not calculated and set until later on in the lifecycle of a request, well after your Lua script has run. You can access them in C by adding a state handler, but I don't believe that's easily exposed to "API" apps/scripts. Anthony humoured me a quite a bit trying to get that kind of stuff working, but (at least a while ago), it was just not feasible. I would suggest that your Lua script add in its own data variables that it would use in billing calculations, then let the full CDR get written, then pick up processing again, restore the vars from the CDR, and continue calculations. I know, it's not the most elegant seeming approach, but it's the only reliable way AFAIK.
-Michael
From: freeswitch-users-bounces at lists.freeswitch.org [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Avi Marcus
Sent: Friday, July 06, 2012 4:02 AM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] Pushing CDR Information into Zeromq
I'm pretty sure there's a variable to have the CDR in the ESL events, but I can't find it.
-Avi
On Fri, Jul 6, 2012 at 12:42 PM, Neo Cheema <neo.cheema at gmail.com<mailto:neo.cheema at gmail.com>> wrote:
Avi,
Yea. That would work as well. I just thought it would be a
'nice-to-have' feature. Guess I'll go ahead with your model.
Regards
On Fri, Jul 6, 2012 at 2:07 PM, Avi Marcus <avi at avimarcus.net<mailto:avi at avimarcus.net>> wrote:
> I process CDRs on the same machine and then replicate the DB elsewhere.
> Or you could have a daemon processing the CDRs on the main machine and doing
> whatever with them.
> The benefit is that then you'll have file persistence of the CDRs until they
> actually get processed...
>
> -Avi
>
>
> On Fri, Jul 6, 2012 at 11:10 AM, Neo Cheema <neo.cheema at gmail.com<mailto:neo.cheema at gmail.com>> wrote:
>>
>> Avi,
>>
>> What I really want is to provide near-real time updates of CDRs on a
>> webpage, the webserver not necessarily being on the same machine as
>> Freeswitch. I would hate to continuously scan DB on freeswitch machine
>> for latest CDR info.
>>
>> In a related issue, I read that the only reliable info on "call
>> length", billsec etc should be read from CDRs.
>>
>> I mean, I can't do a getvariable on session in say a Lua script, to
>> read call length, billsec session variables. Infact I tried it and got
>> null responses, even after session hangup. Is there a way to get
>> "correct" values of these variables in the Lua script itself? It would
>> make my life simpler, because I can then just push the cdr info +
>> custom values into any queue or webserver, without waiting for the
>> Freeswitch to do it for me.
>>
>> Any Ideas?
>>
>>
>> On Fri, Jul 6, 2012 at 1:18 PM, Avi Marcus <avi at avimarcus.net<mailto:avi at avimarcus.net>> wrote:
>> > xml_cdr by default writes to disk, no web server required. You want to
>> > skip
>> > the disk, I presume..?
>> >
>> > -Avi
>> >
>> >
>> > On Fri, Jul 6, 2012 at 10:14 AM, Neo Cheema <neo.cheema at gmail.com<mailto:neo.cheema at gmail.com>>
>> > wrote:
>> >>
>> >> João,
>> >>
>> >> "Since the socket implemented on mod_zmq is a simple PUB/SUB, yes,
>> >> messages would be discarded if they are not received by the other
>> >> end."
>> >>
>> >> I thought it didn't matter if the 'worker' was up before the
>> >> 'producer'/freeswitch started pushing in the messages. 0mq handles
>> >> that part, if atleast one worker is connected.
>> >>
>> >> My main reason for looking towards 0mq was to bypass a webserver,
>> >> which would be required for xml_cdr.
>> >>
>> >> On Fri, Jul 6, 2012 at 8:33 AM, jay binks <jaybinks at gmail.com<mailto:jaybinks at gmail.com>> wrote:
>> >> > while we are talking about funky CDR stuff.
>> >> >
>> >> > Ive been planning to look at riak ( http://wiki.basho.com/ ) for bulk
>> >> > CDR
>> >> > storage
>> >> > ( storing data other than billing data ) but just not finding the
>> >> > time.
>> >> >
>> >> > anyone done something similar ?
>> >> > The idea is to store as much data in a distributed manner, so as to
>> >> > aid
>> >> > debugging.
>> >> > ( not so much for billing )
>> >> >
>> >> > Jay
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > _________________________________________________________________________
>> >> > Professional FreeSWITCH Consulting Services:
>> >> > consulting at freeswitch.org<mailto:consulting at freeswitch.org>
>> >> > http://www.freeswitchsolutions.com
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > Official FreeSWITCH Sites
>> >> > http://www.freeswitch.org
>> >> > http://wiki.freeswitch.org
>> >> > http://www.cluecon.com
>> >> >
>> >> > Join Us At ClueCon - Aug 7-9, 2012
>> >> >
>> >> > FreeSWITCH-users mailing list
>> >> > FreeSWITCH-users at lists.freeswitch.org<mailto: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
>> >> >
>> >>
>> >>
>> >> _________________________________________________________________________
>> >> Professional FreeSWITCH Consulting Services:
>> >> consulting at freeswitch.org<mailto:consulting at freeswitch.org>
>> >> http://www.freeswitchsolutions.com
>> >>
>> >>
>> >>
>> >>
>> >> Official FreeSWITCH Sites
>> >> http://www.freeswitch.org
>> >> http://wiki.freeswitch.org
>> >> http://www.cluecon.com
>> >>
>> >> Join Us At ClueCon - Aug 7-9, 2012
>> >>
>> >> FreeSWITCH-users mailing list
>> >> FreeSWITCH-users at lists.freeswitch.org<mailto: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
>> >
>> >
>> >
>> >
>> > _________________________________________________________________________
>> > Professional FreeSWITCH Consulting Services:
>> > consulting at freeswitch.org<mailto:consulting at freeswitch.org>
>> > http://www.freeswitchsolutions.com
>> >
>> >
>> >
>> >
>> > Official FreeSWITCH Sites
>> > http://www.freeswitch.org
>> > http://wiki.freeswitch.org
>> > http://www.cluecon.com
>> >
>> > Join Us At ClueCon - Aug 7-9, 2012
>> >
>> > FreeSWITCH-users mailing list
>> > FreeSWITCH-users at lists.freeswitch.org<mailto: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
>> >
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org<mailto:consulting at freeswitch.org>
>> http://www.freeswitchsolutions.com
>>
>>
>>
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> Join Us At ClueCon - Aug 7-9, 2012
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org<mailto: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
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org<mailto:consulting at freeswitch.org>
> http://www.freeswitchsolutions.com
>
>
>
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> Join Us At ClueCon - Aug 7-9, 2012
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org<mailto: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
>
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org<mailto:consulting at freeswitch.org>
http://www.freeswitchsolutions.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org<mailto: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/20120707/d4c62470/attachment-0001.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list