I have done this in a perl script:<div><br></div><div><div>#!/usr/bin/perl</div><div>use ESL;</div><div>our $host = "10.1.30.236";</div><div>our $port = 8021;</div><div>our $password = "ClueCon";</div><div>
<br></div><div>my $fs = new ESL::ESLconnection($host, $port, $password);</div><div># Listen to All events</div><div>if($fs->connected()){</div><div>$fs->events("plain","all");</div><div>}</div><div>
my $result = $fs->api("callcenter_config queue list members acd@default");</div><div>print $result;</div><div><br></div><div>while($fs->connected()){</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>print "while\n";</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>my $reply = $fs->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->getHeader("CC-Action");</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>if($event_name eq 'member-queue-start'){</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>my $session_uuid = $reply->getHeader("CC-Member-Session-UUID");</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>my $session_cnum = $reply->getHeader("CC-Member-CID-Number");</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"><<a href="mailto:eagle.antonio@gmail.com" target="_blank">eagle.antonio@gmail.com</a>></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 "gimme all the events" or you can narrow
it down a bit ...<br>
And handle the events on your code<br>
<br>
" Taken from a old script of mine "<br>
<br>
con = ESLconnection("192.168.0XXXXXX","8021","ClueCon")<br>
<br>
if con.connected:<br>
<br>
// Gimme all the events OR you can narrow this ...<br>
con.events("plain", "all");<br>
<br>
while con.connected():<br>
e = con.recvEventTimed(1000)<br>
<br>
if e and e.getHeader("Event-Name") == 'CUSTOM' and
e.getHeader("Event-Subclass") == 'callcenter::info':<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><action application="socket" data="<a href="http://127.0.0.1:8022" target="_blank">127.0.0.1:8022</a>
async full"/></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>