[Freeswitch-users] Heartbeat question

Diego Viola diego.viola at gmail.com
Thu Oct 8 22:39:46 PDT 2009


Yes, I have called to my extension and saw this:

2009-10-09 01:25:44.820677 [INFO] switch_core_session.c:1041 sofia/internal/
1000 at 192.168.0.2 setting session heartbeat to 1 second(s).

But I still see the heartbeat events being fired after 20 seconds...

I have made this script that tells me the seconds when a heartbeat is being
fired...

#!/usr/bin/env ruby

require 'rubygems'
require 'fsr'
require "fsr/listener/inbound"

def custom_channel_heartbeat_handler(event)
  puts Time.now.strftime('%S')
end
FSL::Inbound.add_event_hook(:HEARTBEAT) {|event|
custom_channel_heartbeat_handler(event) }
FSR.start_ies!(FSL::Inbound, :host => "localhost", :port => 8021)


This is the output:

[diego at myhost ~]$ ruby test.rb
No log4r found, falling back to standard ruby library Logger
I, [2009-10-09T01:25:51.797012 #3292]  INFO -- : *** FreeSWITCHer Inbound
EventSocket Listener connected to localhost:8021 ***
I, [2009-10-09T01:25:51.797291 #3292]  INFO -- : ***
http://code.rubyists.com/projects/fs
59
19
39
59
19
39
59


On Fri, Oct 9, 2009 at 5:13 AM, Michael Collins <msc at freeswitch.org> wrote:

>
> On Thu, Oct 8, 2009 at 7:56 PM, Diego Viola <diego.viola at gmail.com> wrote:
>
>> Hi everyone,
>>
>> I have a question about FreeSWITCH heartbeat, I have this on my dialplan:
>>
>> <extension name="test">
>> <condition field="destination_number" expression="^8084$">
>> <action application="answer"/>
>> <action application="enable_heartbeat" data="1"/>
>> </condition>
>> </extension>
>>
>> But when I do "event plain all" I see the heartbeats are being fired every
>> 20 seconds... what I'm doing wrong?
>>
>>
> On the console do you see the call to switch_core_session_enable_heartbeat?
>
> switch_core_session.c:1041:
> switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "%s
> setting session heartbeat to %u second(s).\n",
>
> Confirm that it is actually calling that.
>
> BTW, it would sure be nice if this app were documented on the wiki, hint
> hint. ;)
> -MC
>
>
>> Thanks,
>>
>> Diego
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
> _______________________________________________
> 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/20091009/e46f0c08/attachment-0002.html 


More information about the FreeSWITCH-users mailing list