I have done this in a perl script:<div><br></div><div><div>#!/usr/bin/perl</div><div>use ESL;</div><div>our $host = &quot;10.1.30.236&quot;;</div><div>our $port = 8021;</div><div>our $password = &quot;ClueCon&quot;;</div><div>
<br></div><div>my $fs = new ESL::ESLconnection($host, $port, $password);</div><div># Listen to All events</div><div>if($fs-&gt;connected()){</div><div>$fs-&gt;events(&quot;plain&quot;,&quot;all&quot;);</div><div>}</div><div>
my $result = $fs-&gt;api(&quot;callcenter_config queue list members acd@default&quot;);</div><div>print $result;</div><div><br></div><div>while($fs-&gt;connected()){</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>print &quot;while\n&quot;;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>my $reply = $fs-&gt;recvEventTimed(1000);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if($reply){</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>my $event_name = $reply-&gt;getHeader(&quot;CC-Action&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>if($event_name eq &#39;member-queue-start&#39;){</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>my $session_uuid = $reply-&gt;getHeader(&quot;CC-Member-Session-UUID&quot;);</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>my $session_cnum = $reply-&gt;getHeader(&quot;CC-Member-CID-Number&quot;);</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>}<span class="Apple-tab-span" style="white-space:pre">                        </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div>}</div><div>1;</div><div><br></div>The script ends showing nothing. Where is the problem?<br><div class="gmail_quote">On Fri, Jun 21, 2013 at 2:42 PM, Antonio Teixeira <span dir="ltr">&lt;<a href="mailto:eagle.antonio@gmail.com" target="_blank">eagle.antonio@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Callcenter Events<br>
      <a href="http://wiki.freeswitch.org/wiki/Mod_callcenter#Events" target="_blank">http://wiki.freeswitch.org/wiki/Mod_callcenter#Events</a><br>
      <br>
      ESL Inbound<br>
      <a href="http://wiki.freeswitch.org/wiki/Mod_event_socket#Inbound" target="_blank">http://wiki.freeswitch.org/wiki/Mod_event_socket#Inbound</a><br>
      <br>
      The trick<br>
      Make a program in *whatever* ( extra points for doing it in asm)<br>
      Connect to FS send send &quot;gimme all the events&quot; or you can narrow
      it down a bit ...<br>
      And handle the events on your code<br>
      <br>
      &quot; Taken from a old script of mine &quot;<br>
      <br>
      con = ESLconnection(&quot;192.168.0XXXXXX&quot;,&quot;8021&quot;,&quot;ClueCon&quot;)<br>
      <br>
      if con.connected:<br>
      <br>
          // Gimme all the events OR you can narrow this ...<br>
          con.events(&quot;plain&quot;, &quot;all&quot;);<br>
      <br>
          while con.connected():<br>
              e = con.recvEventTimed(1000)<br>
      <br>
              if e and e.getHeader(&quot;Event-Name&quot;) == &#39;CUSTOM&#39; and
      e.getHeader(&quot;Event-Subclass&quot;) == &#39;callcenter::info&#39;:<div><div class="h5"><br>
      <br>
      <br>
      <br>
      On 6/21/13 9:56 AM, Ashish gautam wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">Hi,
      <div><br>
      </div>
      <div>I am working with mod_callcenter. I want FS to send event
        data to an external script on two events when they happen. first
        when a caller is just answered and is in waiting state. Second,
        when he is connected to any agent.</div>
      <div><br>
      </div>
      <div>I have written this line in the dialplan:</div>
      <div><br>
      </div>
      <div>&lt;action application=&quot;socket&quot; data=&quot;<a href="http://127.0.0.1:8022" target="_blank">127.0.0.1:8022</a>
        async full&quot;/&gt;</div>
      <div>
        <br>
      </div>
      <div>is it going to do something? </div>
      <div><br>
      </div>
      <div>Please throw some light on it.</div>
      <div>
        <div><br>
        </div>
        -- <br>
        <span style="color:rgb(0,0,102);font-family:georgia,serif">Ashish
          Gautam</span><br>
        <font color="#000066" face="georgia, serif"><br>
          <br>
        </font></div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a>

Official FreeSWITCH Sites
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
</pre>
    </blockquote>
    <br>
  </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>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.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://wiki.freeswitch.org" target="_blank">http://wiki.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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="color:rgb(0,0,102);font-family:georgia,serif">Ashish Gautam</span><br><font face="georgia, serif" color="#000066"><br>Nucleus Microsystems (Pvt.) Ltd.<br>
<br>Ph. 011 47574758</font>
</div>