Thanks antony.. That work&#39;s well. I also understood the functionality of send and sendRecv. Thanks..<br><br><br><br><div class="gmail_quote">On Sat, Jan 30, 2010 at 10:18 PM, Anthony Minessale <span dir="ltr">&lt;<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">use $e = $con-&gt;sendRecv(&quot;command&quot;);<br><br>every time<br>for each send you do you must do a recv so this does both.<br>
<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Sat, Jan 30, 2010 at 8:48 AM, lakshmanan ganapathy <span dir="ltr">&lt;<a href="mailto:lakindia89@gmail.com" target="_blank">lakindia89@gmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">Dear all<br><br>I&#39;ve done the following sample script to experiment the nixevent. I found some difference in behavior because of nixevent. Let me explain my question down the script.<br>

<br>require ESL;<br>use IO::Socket::INET;<br>
<br>my $ip = &quot;192.168.1.222&quot;;<br>my $sock = new IO::Socket::INET ( LocalHost =&gt; $ip,  LocalPort =&gt; &#39;8447&#39;,  Proto =&gt; &#39;tcp&#39;,  Listen =&gt; 1,  Reuse =&gt; 1 );<br>die &quot;Could not create socket: $!\n&quot; unless $sock;<br>


for(;;) {<br>    my $new_sock = $sock-&gt;accept();<br>    next if (not defined ($new_sock));<br>    my $pid = fork();<br>    if ($pid) {<br>        close($new_sock);<br>        next;<br>    }<br>    print &quot;CHILD PID: $$\n&quot;;<br>


    my $host = $new_sock-&gt;sockhost();<br>    my $fd = fileno($new_sock);<br><br>    my $con = new ESL::ESLconnection($fd);<br>    my $info = $con-&gt;getInfo();<br><br>    my $uuid = $info-&gt;getHeader(&quot;unique-id&quot;);<br>


<br>    printf &quot;Connected call %s, from %s\n&quot;, $uuid, $info-&gt;getHeader(&quot;caller-caller-id-number&quot;);<br>    my $r=$con-&gt;execute(&quot;answer&quot;);<br>    $con-&gt;events(&quot;plain&quot;,&quot;all&quot;);<br>


##########################<br>    $con-&gt;send(&quot;nixevent DTMF&quot;);     <br>    my $val=$con-&gt;api(&quot;create_uuid&quot;);<br>    $val = $val-&gt;getBody();            # LINE 1<br>    chomp($val);<br>    print &quot;UUID is $val\n&quot;;<br>


    my $e = $con-&gt;recvEvent(); <br>    $val = $e-&gt;getBody();               # LINE 2<br>    chomp($val);<br>    print &quot;UUID is $val\n&quot;;<br>    close($new_sock);<br>}<br><br># If the line ($con-&gt;send(&quot;nixevent DTMF&quot;);) is commented, then the result of create_uuid is obtained in LINE 1.<br>



# else, the result isn&#39;t obtained in the LINE 1 and it has nothing. The result is obtained only when I do a recvEvent, <br>
# followed by a getBody (LINE 2)<br><br>Just want to know why the behavior differs when nixevent is present???<br><br>
<br></div></div><div class="im">_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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>
<br></div></blockquote></div><br><br clear="all"><div><div></div><div class="h5"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>

Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:+19193869900<br>
</div></div><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>
<br></blockquote></div><br>