[Freeswitch-svn] [commit] r13079 - freeswitch/trunk/libs/esl/perl

FreeSWITCH SVN brian at freeswitch.org
Fri Apr 17 09:00:09 PDT 2009


Author: brian
Date: Fri Apr 17 11:00:08 2009
New Revision: 13079

Log:
 adding sendevent example for esl perl

Added:
   freeswitch/trunk/libs/esl/perl/sendevent.pl

Added: freeswitch/trunk/libs/esl/perl/sendevent.pl
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/esl/perl/sendevent.pl	Fri Apr 17 11:00:08 2009
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+
+require ESL;
+
+my $con = ESL::ESLconnection->new("localhost", "8021", "ClueCon");
+my $e = ESL::ESLevent->new("MESSAGE_WAITING");
+
+#my $e = $con->sendEvent("MESSAGE_WAITING");
+
+$e->addHeader("MWI-Messages-Waiting", "no");
+$e->addHeader("MWI-Message-Account", 'sip:1002 at dev.bkw.org');
+$e->addHeader("MWI-Voice-Message", "0/0 (0/0)");
+$con->sendEvent($e);
+
+sleep 3;
+my $ee = ESL::ESLevent->new("MESSAGE_WAITING");
+
+$ee->addHeader("MWI-Messages-Waiting", "yes");
+$ee->addHeader("MWI-Message-Account", 'sip:1002 at dev.bkw.org');
+$ee->addHeader("MWI-Voice-Message", "1/1 (1/1)");
+$con->sendEvent($ee);
+



More information about the Freeswitch-svn mailing list