From ed2ef13eac01e1c555d417b4cf1217d89d51b679 Mon Sep 17 00:00:00 2001 From: Brian West Date: Fri, 5 Mar 2010 23:57:08 +0000 Subject: [PATCH] dispatch examples update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16923 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/esl/perl/dispatch.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/esl/perl/dispatch.pl b/libs/esl/perl/dispatch.pl index 96dbaec75d..477596c977 100644 --- a/libs/esl/perl/dispatch.pl +++ b/libs/esl/perl/dispatch.pl @@ -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;