freeswitch/libs/esl/perl/events.pl
Anthony Minessale 8777ec780e add some methods
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12359 d0543943-73ff-0310-b7d9-9358b9ac24b2
2009-03-02 20:52:46 +00:00

24 lines
401 B
Perl

require ESL;
my $con = new ESL::ESLconnection("localhost", "8021", "ClueCon");
$con->events("plain", "all");
while($con->connected()) {
#my $e = $con->recvEventTimed(100);
my $e = $con->recvEvent();
if ($e) {
#print $e->serialize();
my $h = $e->firstHeader();
while ($h) {
printf "Header: [%s] = [%s]\n", $h, $e->getHeader($h);
$h = $e->nextHeader();
}
}
}