Modified: freeswitch/trunk/contrib/diegoviola/ruby/misc/presence.rb (17006 => 17007)
--- freeswitch/trunk/contrib/diegoviola/ruby/misc/presence.rb 2010-03-16 14:42:24 UTC (rev 17006)
+++ freeswitch/trunk/contrib/diegoviola/ruby/misc/presence.rb 2010-03-16 14:54:17 UTC (rev 17007)
@@ -1,15 +1,14 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
require 'rubygems'
require 'fsr'
require "fsr/listener/inbound"
-def presence_handler(event)
+def custom_channel_hangup_handler(event)
FSR::Log.info "From: #{event.content[:from]} - #{event.content[:status]}"
end
-# Event hooks for presence.
-FSL::Inbound.add_event_hook(:PRESENCE_IN) {|event| presence_handler(event) }
-FSL::Inbound.add_event_hook(:PRESENCE_OUT) {|event| presence_handler(event) }
+FSL::Inbound.add_event_hook(:PRESENCE_IN) {|event| custom_channel_hangup_handler(event) }
+FSL::Inbound.add_event_hook(:PRESENCE_OUT) {|event| custom_channel_hangup_handler(event) }
FSR.start_ies!(FSL::Inbound, :host => "localhost", :port => 8021)