What is heartbeat and what are the uses cases? Sorry i didn't find much information on wiki.
Thanks. On Sat, Oct 10, 2009 at 12:01 AM, Diego Viola <diego.vi...@gmail.com> wrote: > Here's my heartbeat script now. > > #!/usr/bin/env ruby > > require 'rubygems' > require 'fsr' > require "fsr/listener/inbound" > > def custom_channel_heartbeat_handler(event) > puts "Got a SESSION_HEARTBEAT at #{Time.now.strftime('%H:%M:%S')}" > end > FSL::Inbound.add_event_hook(:SESSION_HEARTBEAT) {|event| > custom_channel_heartbeat_handler(event) } > FSR.start_ies!(FSL::Inbound, :host => "localhost", :port => 8021) > > Thanks again. > > Diego > > > On Fri, Oct 9, 2009 at 9:30 PM, Diego Viola <diego.vi...@gmail.com> wrote: > >> Here is on two seconds ;) >> >> Got a SESSION_HEARTBEAT at 17:17:13 >> Got a SESSION_HEARTBEAT at 17:17:15 >> Got a SESSION_HEARTBEAT at 17:17:17 >> Got a SESSION_HEARTBEAT at 17:17:19 >> Got a SESSION_HEARTBEAT at 17:17:21 >> Got a SESSION_HEARTBEAT at 17:17:23 >> Got a SESSION_HEARTBEAT at 17:17:25 >> Got a SESSION_HEARTBEAT at 17:17:27 >> Got a SESSION_HEARTBEAT at 17:17:29 >> Got a SESSION_HEARTBEAT at 17:17:31 >> Got a SESSION_HEARTBEAT at 17:17:33 >> Got a SESSION_HEARTBEAT at 17:17:35 >> Got a SESSION_HEARTBEAT at 17:17:37 >> Got a SESSION_HEARTBEAT at 17:17:39 >> Got a SESSION_HEARTBEAT at 17:17:41 >> Got a SESSION_HEARTBEAT at 17:17:43 >> Got a SESSION_HEARTBEAT at 17:17:45 >> Got a SESSION_HEARTBEAT at 17:17:47 >> Got a SESSION_HEARTBEAT at 17:17:49 >> Got a SESSION_HEARTBEAT at 17:17:51 >> Got a SESSION_HEARTBEAT at 17:17:53 >> Got a SESSION_HEARTBEAT at 17:17:55 >> Got a SESSION_HEARTBEAT at 17:17:57 >> Got a SESSION_HEARTBEAT at 17:17:59 >> Got a SESSION_HEARTBEAT at 17:18:01 >> Got a SESSION_HEARTBEAT at 17:18:03 >> Got a SESSION_HEARTBEAT at 17:18:05 >> Got a SESSION_HEARTBEAT at 17:18:07 >> Got a SESSION_HEARTBEAT at 17:18:09 >> Got a SESSION_HEARTBEAT at 17:18:11 >> Got a SESSION_HEARTBEAT at 17:18:13 >> Got a SESSION_HEARTBEAT at 17:18:15 >> Got a SESSION_HEARTBEAT at 17:18:17 >> >> >> >> On Fri, Oct 9, 2009 at 9:27 PM, Diego Viola <diego.vi...@gmail.com>wrote: >> >>> Thanks Anthony, this solved it. You rock :) >>> >>> My program now outputs: >>> >>> Got a SESSION_HEARTBEAT at 17:14:59 >>> Got a SESSION_HEARTBEAT at 17:15:00 >>> Got a SESSION_HEARTBEAT at 17:15:02 >>> Got a SESSION_HEARTBEAT at 17:15:03 >>> Got a SESSION_HEARTBEAT at 17:15:04 >>> Got a SESSION_HEARTBEAT at 17:15:05 >>> Got a SESSION_HEARTBEAT at 17:15:06 >>> Got a SESSION_HEARTBEAT at 17:15:07 >>> Got a SESSION_HEARTBEAT at 17:15:08 >>> Got a SESSION_HEARTBEAT at 17:15:09 >>> Got a SESSION_HEARTBEAT at 17:15:10 >>> Got a SESSION_HEARTBEAT at 17:15:11 >>> Got a SESSION_HEARTBEAT at 17:15:12 >>> Got a SESSION_HEARTBEAT at 17:15:13 >>> Got a SESSION_HEARTBEAT at 17:15:14 >>> Got a SESSION_HEARTBEAT at 17:15:15 >>> Got a SESSION_HEARTBEAT at 17:15:16 >>> Got a SESSION_HEARTBEAT at 17:15:17 >>> Got a SESSION_HEARTBEAT at 17:15:18 >>> Got a SESSION_HEARTBEAT at 17:15:19 >>> Got a SESSION_HEARTBEAT at 17:15:20 >>> Got a SESSION_HEARTBEAT at 17:15:21 >>> Got a SESSION_HEARTBEAT at 17:15:22 >>> Got a SESSION_HEARTBEAT at 17:15:23 >>> Got a SESSION_HEARTBEAT at 17:15:24 >>> Got a SESSION_HEARTBEAT at 17:15:25 >>> Got a SESSION_HEARTBEAT at 17:15:26 >>> Got a SESSION_HEARTBEAT at 17:15:27 >>> Got a SESSION_HEARTBEAT at 17:15:28 >>> Got a SESSION_HEARTBEAT at 17:15:29 >>> Got a SESSION_HEARTBEAT at 17:15:30 >>> >>> >>> >>> >>> >>> On Fri, Oct 9, 2009 at 4:02 PM, Anthony Minessale < >>> anthony.miness...@gmail.com> wrote: >>> >>>> Update to trunk and try it with fs_cli it for sure will let you do every >>>> 1 second >>>> >>>> in fs_cli type >>>> >>>> /events plain all >>>> >>>> if you make that call you will see one every 1 second >>>> >>>> >>>> >>>> On Fri, Oct 9, 2009 at 12:45 AM, Diego Viola <diego.vi...@gmail.com>wrote: >>>> >>>>> Nope, I was just wondering why it didn't work at 1 second exactly... >>>>> >>>>> >>>>> On Fri, Oct 9, 2009 at 3:36 AM, William Suffill < >>>>> william.suff...@gmail.com> wrote: >>>>> >>>>>> Why do you need it every second? If you want real time channel counts >>>>>> you would be able to track each create/destroy even instead of >>>>>> relying on the heartbeat summary. >>>>>> >>>>>> -- W >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>>> >>>> >>>> >>>> -- >>>> Anthony Minessale II >>>> >>>> FreeSWITCH http://www.freeswitch.org/ >>>> ClueCon http://www.cluecon.com/ >>>> Twitter: http://twitter.com/FreeSWITCH_wire >>>> >>>> AIM: anthm >>>> MSN:anthony_miness...@hotmail.com <msn%3aanthony_miness...@hotmail.com> >>>> GTALK/JABBER/PAYPAL:anthony.miness...@gmail.com<paypal%3aanthony.miness...@gmail.com> >>>> IRC: irc.freenode.net #freeswitch >>>> >>>> FreeSWITCH Developer Conference >>>> sip:8...@conference.freeswitch.org <sip%3a...@conference.freeswitch.org> >>>> iax:gu...@conference.freeswitch.org/888 >>>> googletalk:conf+...@conference.freeswitch.org<googletalk%3aconf%2b...@conference.freeswitch.org> >>>> pstn:213-799-1400 >>>> >>>> _______________________________________________ >>>> 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 >>>> >>>> >>> >> > > _______________________________________________ > 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 > >
_______________________________________________ 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