Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Heartbeat question


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
diego.viola at gmail.com
Guest





PostPosted: Thu Oct 08, 2009 10:08 pm    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

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?

Thanks,

Diego
Back to top
diego.viola at gmail.com
Guest





PostPosted: Thu Oct 08, 2009 10:10 pm    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

I want it to fire every 1 second...

On Fri, Oct 9, 2009 at 2:56 AM, Diego Viola <diego.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
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?

Thanks,

Diego

Back to top
william.suffill at gma...
Guest





PostPosted: Thu Oct 08, 2009 10:45 pm    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

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
Back to top
msc at freeswitch.org
Guest





PostPosted: Fri Oct 09, 2009 12:22 am    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

On Thu, Oct 8, 2009 at 7:56 PM, Diego Viola <diego.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
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. Wink
-MC
 

Quote:
Thanks,

Diego


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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

Back to top
diego.viola at gmail.com
Guest





PostPosted: Fri Oct 09, 2009 12:48 am    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

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@192.168.0.2 (1000@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@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@freeswitch.org (msc@freeswitch.org)> wrote:
Quote:


On Thu, Oct 8, 2009 at 7:56 PM, Diego Viola <diego.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
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. Wink
-MC
 

Quote:
Thanks,

Diego


_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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 (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

Back to top
diego.viola at gmail.com
Guest





PostPosted: Fri Oct 09, 2009 12:54 am    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

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.suffill@gmail.com (william.suffill@gmail.com)> wrote:
Quote:
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 (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
Back to top
anthony.minessale at g...
Guest





PostPosted: Fri Oct 09, 2009 11:15 am    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

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.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
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.suffill@gmail.com (william.suffill@gmail.com)> wrote:
Quote:
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 (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 (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_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
diego.viola at gmail.com
Guest





PostPosted: Fri Oct 09, 2009 4:39 pm    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

Thanks Anthony, this solved it. You rock Smile

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.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
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.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
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.suffill@gmail.com (william.suffill@gmail.com)> wrote:
Quote:
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 (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 (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_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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

Back to top
diego.viola at gmail.com
Guest





PostPosted: Fri Oct 09, 2009 4:41 pm    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

Here is on two seconds Wink

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.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
Thanks Anthony, this solved it. You rock Smile

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.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
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.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
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.suffill@gmail.com (william.suffill@gmail.com)> wrote:
Quote:
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 (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 (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_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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





Back to top
diego.viola at gmail.com
Guest





PostPosted: Fri Oct 09, 2009 5:10 pm    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

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.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
Here is on two seconds Wink

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.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
Thanks Anthony, this solved it. You rock Smile

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.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
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.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
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.suffill@gmail.com (william.suffill@gmail.com)> wrote:
Quote:
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 (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 (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_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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









Back to top
saeedahmad1981 at gmai...
Guest





PostPosted: Thu Oct 22, 2009 12:56 pm    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

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.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
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.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
Here is on two seconds Wink

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.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
Thanks Anthony, this solved it. You rock Smile

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.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
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.viola@gmail.com (diego.viola@gmail.com)> wrote:
Quote:
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.suffill@gmail.com (william.suffill@gmail.com)> wrote:
Quote:
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 (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 (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_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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 (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

Back to top
msc at freeswitch.org
Guest





PostPosted: Thu Oct 22, 2009 1:26 pm    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

On Thu, Oct 22, 2009 at 10:47 AM, Saeed Ahmad <saeedahmad1981@gmail.com (saeedahmad1981@gmail.com)> wrote:
Quote:
What is heartbeat and what are the uses cases?

Sorry i didn't find much information on wiki.

Thanks.

A session heartbeat is just an event that is sent to your script and gives you updated information about the call in progress. It is *VERY* different from the system heartbeat, which is sent out to all event socket subscribers, not just a particular session.

-MC
Back to top
saeedahmad1981 at gmai...
Guest





PostPosted: Fri Oct 23, 2009 5:20 am    Post subject: [Freeswitch-users] Heartbeat question Reply with quote

Yeah the word *hearbeat* was confusing me, now its ok.

So one use case would be to count live calls with much detailed information.

is it resource-intensive operation? can i do it on wholesale traffic (500+ calls).

...any other interesting use cases? 

Thanks.

On Thu, Oct 22, 2009 at 8:18 PM, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote:
Quote:


On Thu, Oct 22, 2009 at 10:47 AM, Saeed Ahmad <saeedahmad1981@gmail.com (saeedahmad1981@gmail.com)> wrote:
Quote:
What is heartbeat and what are the uses cases?

Sorry i didn't find much information on wiki.

Thanks.


A session heartbeat is just an event that is sent to your script and gives you updated information about the call in progress. It is *VERY* different from the system heartbeat, which is sent out to all event socket subscribers, not just a particular session.

-MC




_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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

Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services