<html>
<head>
<meta content="text/html; charset=KOI8-R" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I have FreeSWITCH Version 1.2.22~32bit ( 32bit) on Centos 5.9<br>
<br>
In directory /usr/src/freeswitch-1.2.22/libs/esl/perlš isš scriptš
dispatch.pl<br>
<br>
I changed it to see CUSTOM events and spandsp::rxfaxpageresult
subclass events, but heither CUSTOM events hor
spandsp::rxfaxpageresult subclassš not captured.<br>
<br>
<br>
<small><font face="Courier New, Courier, monospace">#!/usr/bin/perl<br>
<br>
use ESL::Dispatch;<br>
use Data::Dumper;<br>
my $daemon = init ESL::Dispatch({});<br>
<br>
$| = 1;<br>
<br>
sub worker {<br>
š my $self = shift;<br>
š print "I'm a worker\n";<br>
}<br>
<br>
sub heartbeat {<br>
š my $self = shift;<br>
š my $event = shift;<br>
š print Dumper $event;<br>
}<br>
<br>
sub channel_hangup {<br>
š my $self = shift;<br>
š my $event = shift;<br>
š print Dumper $event;<br>
š print "DO SQL GOODIES HERE!\n";<br>
}<br>
<br>
sub custom {<br>
š my $self = shift;<br>
š my $event = shift;<br>
š print Dumper $event;<br>
š print "DO SQL GOODIES HERE!\n";<br>
}<br>
<br>
$0 = "ESL::Dispatch rocks!";<br>
<br>
$daemon->set_worker(\&worker, 2000);<br>
$daemon->set_callback("heartbeat", \&heartbeat);<br>
$daemon->set_callback("channel_hangup",
\&channel_hangup);<br>
$daemon->set_callback("custom", \&custom);<br>
$daemon->set_callback('spandsp::rxfaxpageresult',
\&custom);<br>
<br>
$daemon->run;<br>
<br>
I need catch the evnet only subclass </font></small><small><font
face="Courier New, Courier, monospace"><small><font
face="Courier New, Courier, monospace">spandsp</font></small>::
(<a class="moz-txt-link-freetext" href="https://wiki.freeswitch.org/wiki/Mod_spandsp#Events">https://wiki.freeswitch.org/wiki/Mod_spandsp#Events</a>) into </font></small><small><font
face="Courier New, Courier, monospace"><small><font
face="Courier New, Courier, monospace">CUSTOM event.<br>
<br>
</font></small></font></small>Vladislav Grishin<br>
<br>
</body>
</html>