<p dir="ltr">$esl->connected() or die("Cannot connect to FreeSWITCH");</p>
<p dir="ltr">That's a more correct way to do that :)</p>
<div class="gmail_quote">On Mar 14, 2015 2:07 AM, "SamyGo" <<a href="mailto:govoiper@gmail.com">govoiper@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'm feeling stupid for asking this question related to ESL. It has worked for me always but I've a new installation where I've compiled perl ESL library and when I try to make test scripts run they don't do anything at all.</div><div><br></div><div>The perl code accepts the ESL library, executes the ESLConnection() function but afterwards any command I send is not seen on the ESL socket !</div><div><br></div><div>Here is one of the test scripts from freeswitch source:</div><div><font face="monospace, monospace"><br></font></div><div><div><font face="monospace, monospace">#!/usr/bin/perl</font></div><div><font face="monospace, monospace">use lib '/usr/src/freeswitch/libs/esl/perl';</font></div><div><font face="monospace, monospace">require ESL;</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">my $command = shift;</font></div><div><font face="monospace, monospace">my $args = join(" ", @ARGV);</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">my $con = new ESL::ESLconnection("localhost", "8021", "ClueCon");</font></div><div><font face="monospace, monospace">if (! $con) { die "Unable to establish connection to $host:$port\n"; }<br></font></div><div><font face="monospace, monospace">$con->events("plain","all");</font></div><div><font face="monospace, monospace">while ( $con->connected() ) {</font></div><div><font face="monospace, monospace"> my $e = $con->recvEventTimed(0);</font></div><div><font face="monospace, monospace"> print $e->serialize;</font></div><div><font face="monospace, monospace">}</font></div></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><br></font></div>It just doesn't go in the while() loop. No $con established but no error as well !<br><br>I tried "telnet" to the 8021 port and only then I see packets on port 8021.<br><br>I know that there is something fishy with the perl ESL compilation but that didn't gave any error either and created the required ESL.so w/o complaining !<br><br>Can anyone help me on figuring out what I've missed ?<div><br></div><div>Best Regards,</div><div>Sammy</div><div><br><div><br></div></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div>