You’re probably the only person to ever use that Dispatch module I wrote for ESL, I didn’t even document it much. :P -- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com T: +1.918.420.9001 | F: +1.918.420.9002 | M: +1.918.424.WEST iNUM: +883 5100 1420 9001 ISN: 410*543 Skype:briankwest PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED) On Mar 16, 2014, at 6:42 AM, Гришин В.С. <Vladislav.Grishin@vts24.ru> wrote:
answer
$daemon->set_callback("custom", \&custom,'spandsp::txfaxnegociateresult');
16.03.2014 15:17, "Гришин В.С." пишет:
I have FreeSWITCH Version 1.2.22~32bit ( 32bit) on Centos 5.9
In directory /usr/src/freeswitch-1.2.22/libs/esl/perl is script dispatch.pl
I changed it to see CUSTOM events and spandsp::rxfaxpageresult subclass events, but heither CUSTOM events hor spandsp::rxfaxpageresult subclass not captured.
#!/usr/bin/perl
use ESL::Dispatch; use Data::Dumper; my $daemon = init ESL::Dispatch({});
$| = 1;
sub worker { my $self = shift; print "I'm a worker\n"; }
sub heartbeat { my $self = shift; my $event = shift; print Dumper $event; }
sub channel_hangup { my $self = shift; my $event = shift; print Dumper $event; print "DO SQL GOODIES HERE!\n"; }
sub custom { my $self = shift; my $event = shift; print Dumper $event; 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", \&channel_hangup); $daemon->set_callback("custom", \&custom); $daemon->set_callback('spandsp::rxfaxpageresult', \&custom);
$daemon->run;
I need catch the evnet only subclass spandsp:: (https://wiki.freeswitch.org/wiki/Mod_spandsp#Events) into CUSTOM event.
Vladislav Grishin
Vladislav Grishin
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org