Recveventtimed might return null if an event does not arrive in those ms time. Make sure to use recvevent only if you don't want that. Sent from my iPhone On Apr 18, 2013, at 4:14 AM, Anton Vojlenko <stargray@bigmir.net> wrote:
Hello, I am using skypopen module and i need catch API answers from skype client. I wrote simple perl script:
require ESL; my $con = new ESL::ESLconnection("localhost", "8021", "ClueCon"); while (1){ $con->sendRecv("log 7"); $e = $con->bgapi("skypopen sk1 PING"); #$uuid = $e->getHeader("Job-UUID"); #print $e->serialize("plain"); $n = 2; while($n){ $event = $con->recvEventTimed(100); if ($event and $event->getHeader("Log-File") eq "skypopen_protocol.c") { push(@dmesg, $event->getBody());
} $n--; } print "@dmesg\n"; sleep(3); @dmesg = (); }
But sometimes I get empty array, because script catch differect events. How to catch events from ESL socket by UUID? _________________________________________________________________________ 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