add the event as an arg to the callback.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16926 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Brian West 2010-03-06 00:32:04 +00:00
parent a7bf86df9f
commit 545b561379
2 changed files with 4 additions and 3 deletions

View File

@ -63,7 +63,7 @@ sub render_event($;$$) {
$callback = lc($self->{event_hash}->{'event-name'});
print "DEBUG: executing $callback callback\n";
}
&{$self->{_callback}->{lc($self->{event_hash}->{'event-name'})}}($self);
&{$self->{_callback}->{lc($self->{event_hash}->{'event-name'})}}($self, $self->{event_hash});
};
}

View File

@ -13,13 +13,14 @@ sub worker {
sub heartbeat {
my $self = shift;
my $event = $self->{event_hash};
my $event = shift;
print Dumper $event;
}
sub channel_hangup {
my $self = shift;
my $event = $self->{event_hash};
my $event = shift;
print Dumper $event;
print "DO SQL GOODIES HERE!\n";
}