Revision
16923
Author
brian
Date
2010-03-05 17:57:08 -0600 (Fri, 05 Mar 2010)

Log Message

 dispatch examples update 

Modified Paths

Diff

Modified: freeswitch/trunk/libs/esl/perl/dispatch.pl (16922 => 16923)


--- freeswitch/trunk/libs/esl/perl/dispatch.pl	2010-03-05 23:46:37 UTC (rev 16922)
+++ freeswitch/trunk/libs/esl/perl/dispatch.pl	2010-03-05 23:57:08 UTC (rev 16923)
@@ -17,11 +17,16 @@
   print Dumper $event;
 }
 
+sub channel_hangup {
+  my $self = shift;
+  my $event = $self->{event_hash}; 
+  print "DO SQL GOODIES HERE!\n";
+}
 
+$0 = "ESL::Dispatch rocks!";
 
 $daemon->set_worker(\&worker, 2000);
 $daemon->set_callback("heartbeat", \&heartbeat);
-$daemon->set_callback("channel_hangup", \&heartbeat);
+$daemon->set_callback("channel_hangup", \&channel_hangup);
 
-
 $daemon->run;