]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
dispatch examples update
authorBrian West <brian@freeswitch.org>
Fri, 5 Mar 2010 23:57:08 +0000 (23:57 +0000)
committerBrian West <brian@freeswitch.org>
Fri, 5 Mar 2010 23:57:08 +0000 (23:57 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16923 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/esl/perl/dispatch.pl

index 96dbaec75d4140cfdc05a7108526a3b1481e90f7..477596c9778ff215104edb7b199c82e7a55beba1 100644 (file)
@@ -17,11 +17,16 @@ sub heartbeat {
   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;