Also When the script listening on port 9090 is executing, the call is not transferred to any of the agents.<br><br><div class="gmail_quote">On Mon, Jun 24, 2013 at 12:27 PM, Ashish gautam <span dir="ltr"><<a href="mailto:ashish@nms.co.in" target="_blank">ashish@nms.co.in</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have this in my dialplan:<div><br></div><div><div><include></div><div><extension name="cool_fifo"></div>
<div><condition field="destination_number" expression="^(47673503)$"></div>
<div><action application="answer"/></div><div><action application="socket" data="<a href="http://127.0.0.1:9090" target="_blank">127.0.0.1:9090</a> async full"/></div><div><action application="record_session" data="$${base_dir}/recordings/${uuid}.wav"/</div>
<div>></div><div><action application="callcenter" data="acd@default"/></div><div><action application="hangup" data="NORMAL_CLEARING"/></div><div></condition></div>
<div></extension></div><div></include></div><div><br></div><div>Only the CHANNEL_HANGUP event is thrown to the script which listens on port 9090. No other event is thrown.</div><div><div class="h5"><br><div class="gmail_quote">
On Fri, Jun 21, 2013 at 6:10 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>You should already have call center
events been printed into the console.<br>
<br>
simply join the call center module as a agent or member.<br>
and a new event pops ..<div><div><br>
<br>
<br>
<br>
On 6/21/13 1:32 PM, Ashish gautam wrote:<br>
</div></div></div><div><div>
<blockquote type="cite">I have an external script which simply listens on port
9090 on the same server and throws anything received on the
console, I want this script to listen to the event generated by
mod_callcenter.
<div><br>
</div>
<div>Can this happen?</div>
<div><br>
<div class="gmail_quote">On Fri, Jun 21, 2013 at 3:49 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>Hello Not a Perl fan so i will assume everything is
OK from a sytanx point of view.<br>
<br>
Now dont do <br>
<div>
<div> my $result = $fs->api("callcenter_config
queue list members acd@default");</div>
</div>
<div>print $result;<br>
<br>
The trick here is that the program will only monitor
events it will not send .. so<br>
<div><br>
</div>
<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);<br>
<br>
</div>
<div># Listen to All events</div>
<div>if($fs->connected()){</div>
<div> $fs->events("plain","all");</div>
</div>
<div>}<br>
<div> <br>
<div>while($fs->connected()){<br>
<br>
</div>
<div><span style="white-space:pre-wrap"> </span>print
"while\n";</div>
<div><span style="white-space:pre-wrap"> </span>my
$reply = $fs->recvEventTimed(1000);<br>
<br>
</div>
<div><span style="white-space:pre-wrap"> </span>if($reply){<br>
<br>
</div>
</div>
//just print the event here <br>
e.serialize()<br>
<div><span style="white-space:pre-wrap"></span>}</div>
<div>}<br>
<br>
<br>
Now with a soft phone call the call center you
should start receiving events then you just need
to narrow it down<br>
If this doesn't work try the following:<br>
<br>
You are capturing ALL FS events this means you
will get stuff like HEARTBEAT and so on if you <b>dont</b>
RECEIVE anything there is a problem with your
script.<br>
<br>
First get the basic right , make the program
connecr and listen for all events.<br>
Then tackle the callcenter part ..<br>
<br>
Todo :<br>
<br>
Get the program syntax right<br>
<br>
You are registering to get all the events from
freeswitch<br>
<br>
You are making a loop
while($fs->connected()){ you program cant
exit "normally" unless you lost the connection
from FS<br>
<br>
You MUST receive something from FS , this is <u>mandatory</u><br>
<br>
All the ESL commands are here<br>
<a href="http://wiki.freeswitch.org/wiki/Event_Socket_Library" target="_blank">http://wiki.freeswitch.org/wiki/Event_Socket_Library</a><br>
<a href="http://wiki.freeswitch.org/wiki/Event_Socket_Library#Simple_Perl_Example" target="_blank">http://wiki.freeswitch.org/wiki/Event_Socket_Library#Simple_Perl_Example</a><br>
<br>
<br>
</div>
Just keep trying esl requires more work than
normal "libraries" but its worth it also read the
ESL manual.<span><font color="#888888"><br>
<br>
Antonio<br>
</font></span></div>
</div>
<br>
</div>
<div> <br>
On 6/21/13 10:58 AM, Ashish gautam wrote:<br>
</div>
</div>
<blockquote type="cite">
<div>I have done this in a perl script:
<div><br>
</div>
</div>
<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>
<br>
<div><br>
</div>
</div>
<div>
<div>
<div>while($fs->connected()){</div>
<div><span style="white-space:pre-wrap"> </span>print
"while\n";</div>
<div><span style="white-space:pre-wrap"> </span>my
$reply = $fs->recvEventTimed(1000);</div>
<div><span style="white-space:pre-wrap"> </span>if($reply){</div>
<div><span style="white-space:pre-wrap"> </span>my
$event_name = $reply->getHeader("CC-Action");</div>
<div><span style="white-space:pre-wrap"> </span>if($event_name
eq 'member-queue-start'){</div>
<div><span style="white-space:pre-wrap"> </span>my
$session_uuid =
$reply->getHeader("CC-Member-Session-UUID");</div>
<div><span style="white-space:pre-wrap"> </span>my
$session_cnum =
$reply->getHeader("CC-Member-CID-Number");</div>
<div><span style="white-space:pre-wrap"> </span>}<span style="white-space:pre-wrap"> </span></div>
<div><span style="white-space:pre-wrap"> </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><br>
<br>
<br>
<br>
On 6/21/13 9:56 AM, Ashish gautam
wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div>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" target="_blank">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" 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>
</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 color="#000066" face="georgia, serif"><br>
Nucleus Microsystems (Pvt.) Ltd.<br>
<br>
Ph. 011 47574758</font> </div>
</div>
</div>
<div>
<div> <br>
<fieldset></fieldset>
<br>
<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>
</div>
</div>
</blockquote>
<br>
</div>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">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" 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>
</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 color="#000066" face="georgia, serif"><br>
Nucleus Microsystems (Pvt.) Ltd.<br>
<br>
Ph. 011 47574758</font>
</div>
<br>
<fieldset></fieldset>
<br>
<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></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">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" 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></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></div></div>
</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>