help on mod_callcenter
Hi, 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. I have written this line in the dialplan: <action application="socket" data="127.0.0.1:8022 async full"/> is it going to do something? Please throw some light on it. -- Ashish Gautam
Callcenter Events http://wiki.freeswitch.org/wiki/Mod_callcenter#Events ESL Inbound http://wiki.freeswitch.org/wiki/Mod_event_socket#Inbound The trick Make a program in *whatever* ( extra points for doing it in asm) Connect to FS send send "gimme all the events" or you can narrow it down a bit ... And handle the events on your code " Taken from a old script of mine " con = ESLconnection("192.168.0XXXXXX","8021","ClueCon") if con.connected: // Gimme all the events OR you can narrow this ... con.events("plain", "all"); while con.connected(): e = con.recvEventTimed(1000) if e and e.getHeader("Event-Name") == 'CUSTOM' and e.getHeader("Event-Subclass") == 'callcenter::info': On 6/21/13 9:56 AM, Ashish gautam wrote:
Hi,
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.
I have written this line in the dialplan:
<action application="socket" data="127.0.0.1:8022 <http://127.0.0.1:8022> async full"/>
is it going to do something?
Please throw some light on it.
-- Ashish Gautam
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I have done this in a perl script: #!/usr/bin/perl use ESL; our $host = "10.1.30.236"; our $port = 8021; our $password = "ClueCon"; my $fs = new ESL::ESLconnection($host, $port, $password); # Listen to All events if($fs->connected()){ $fs->events("plain","all"); } my $result = $fs->api("callcenter_config queue list members acd@default"); print $result; while($fs->connected()){ print "while\n"; my $reply = $fs->recvEventTimed(1000); if($reply){ my $event_name = $reply->getHeader("CC-Action"); if($event_name eq 'member-queue-start'){ my $session_uuid = $reply->getHeader("CC-Member-Session-UUID"); my $session_cnum = $reply->getHeader("CC-Member-CID-Number"); } } } 1; The script ends showing nothing. Where is the problem? On Fri, Jun 21, 2013 at 2:42 PM, Antonio Teixeira <eagle.antonio@gmail.com>wrote:
Callcenter Events http://wiki.freeswitch.org/wiki/Mod_callcenter#Events
ESL Inbound http://wiki.freeswitch.org/wiki/Mod_event_socket#Inbound
The trick Make a program in *whatever* ( extra points for doing it in asm) Connect to FS send send "gimme all the events" or you can narrow it down a bit ... And handle the events on your code
" Taken from a old script of mine "
con = ESLconnection("192.168.0XXXXXX","8021","ClueCon")
if con.connected:
// Gimme all the events OR you can narrow this ... con.events("plain", "all");
while con.connected(): e = con.recvEventTimed(1000)
if e and e.getHeader("Event-Name") == 'CUSTOM' and e.getHeader("Event-Subclass") == 'callcenter::info':
On 6/21/13 9:56 AM, Ashish gautam wrote:
Hi,
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.
I have written this line in the dialplan:
<action application="socket" data="127.0.0.1:8022 async full"/>
is it going to do something?
Please throw some light on it.
-- Ashish Gautam
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ashish Gautam Nucleus Microsystems (Pvt.) Ltd. Ph. 011 47574758
Hello Not a Perl fan so i will assume everything is OK from a sytanx point of view. Now dont do my $result = $fs->api("callcenter_config queue list members acd@default"); print $result; The trick here is that the program will only monitor events it will not send .. so #!/usr/bin/perl use ESL; our $host = "10.1.30.236"; our $port = 8021; our $password = "ClueCon"; my $fs = new ESL::ESLconnection($host, $port, $password); # Listen to All events if($fs->connected()){ $fs->events("plain","all"); } while($fs->connected()){ print "while\n"; my $reply = $fs->recvEventTimed(1000); if($reply){ //just print the event here e.serialize() } } Now with a soft phone call the call center you should start receiving events then you just need to narrow it down If this doesn't work try the following: You are capturing ALL FS events this means you will get stuff like HEARTBEAT and so on if you *dont* RECEIVE anything there is a problem with your script. First get the basic right , make the program connecr and listen for all events. Then tackle the callcenter part .. Todo : Get the program syntax right You are registering to get all the events from freeswitch You are making a loop while($fs->connected()){ you program cant exit "normally" unless you lost the connection from FS You MUST receive something from FS , this is _mandatory_ All the ESL commands are here http://wiki.freeswitch.org/wiki/Event_Socket_Library http://wiki.freeswitch.org/wiki/Event_Socket_Library#Simple_Perl_Example Just keep trying esl requires more work than normal "libraries" but its worth it also read the ESL manual. Antonio On 6/21/13 10:58 AM, Ashish gautam wrote:
I have done this in a perl script:
#!/usr/bin/perl use ESL; our $host = "10.1.30.236"; our $port = 8021; our $password = "ClueCon";
my $fs = new ESL::ESLconnection($host, $port, $password); # Listen to All events if($fs->connected()){ $fs->events("plain","all"); }
while($fs->connected()){ print "while\n"; my $reply = $fs->recvEventTimed(1000); if($reply){ my $event_name = $reply->getHeader("CC-Action"); if($event_name eq 'member-queue-start'){ my $session_uuid = $reply->getHeader("CC-Member-Session-UUID"); my $session_cnum = $reply->getHeader("CC-Member-CID-Number"); } } } 1;
The script ends showing nothing. Where is the problem? On Fri, Jun 21, 2013 at 2:42 PM, Antonio Teixeira <eagle.antonio@gmail.com <mailto:eagle.antonio@gmail.com>> wrote:
Callcenter Events http://wiki.freeswitch.org/wiki/Mod_callcenter#Events
ESL Inbound http://wiki.freeswitch.org/wiki/Mod_event_socket#Inbound
The trick Make a program in *whatever* ( extra points for doing it in asm) Connect to FS send send "gimme all the events" or you can narrow it down a bit ... And handle the events on your code
" Taken from a old script of mine "
con = ESLconnection("192.168.0XXXXXX","8021","ClueCon")
if con.connected:
// Gimme all the events OR you can narrow this ... con.events("plain", "all");
while con.connected(): e = con.recvEventTimed(1000)
if e and e.getHeader("Event-Name") == 'CUSTOM' and e.getHeader("Event-Subclass") == 'callcenter::info':
On 6/21/13 9:56 AM, Ashish gautam wrote:
Hi,
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.
I have written this line in the dialplan:
<action application="socket" data="127.0.0.1:8022 <http://127.0.0.1:8022> async full"/>
is it going to do something?
Please throw some light on it.
-- Ashish Gautam
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ashish Gautam
Nucleus Microsystems (Pvt.) Ltd.
Ph. 011 47574758
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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. Can this happen? On Fri, Jun 21, 2013 at 3:49 PM, Antonio Teixeira <eagle.antonio@gmail.com>wrote:
Hello Not a Perl fan so i will assume everything is OK from a sytanx point of view.
Now dont do my $result = $fs->api("callcenter_config queue list members acd@default "); print $result;
The trick here is that the program will only monitor events it will not send .. so
#!/usr/bin/perl use ESL; our $host = "10.1.30.236"; our $port = 8021; our $password = "ClueCon";
my $fs = new ESL::ESLconnection($host, $port, $password);
# Listen to All events if($fs->connected()){ $fs->events("plain","all"); }
while($fs->connected()){
print "while\n"; my $reply = $fs->recvEventTimed(1000);
if($reply){
//just print the event here e.serialize() } }
Now with a soft phone call the call center you should start receiving events then you just need to narrow it down If this doesn't work try the following:
You are capturing ALL FS events this means you will get stuff like HEARTBEAT and so on if you *dont* RECEIVE anything there is a problem with your script.
First get the basic right , make the program connecr and listen for all events. Then tackle the callcenter part ..
Todo :
Get the program syntax right
You are registering to get all the events from freeswitch
You are making a loop while($fs->connected()){ you program cant exit "normally" unless you lost the connection from FS
You MUST receive something from FS , this is *mandatory*
All the ESL commands are here http://wiki.freeswitch.org/wiki/Event_Socket_Library http://wiki.freeswitch.org/wiki/Event_Socket_Library#Simple_Perl_Example
Just keep trying esl requires more work than normal "libraries" but its worth it also read the ESL manual.
Antonio
On 6/21/13 10:58 AM, Ashish gautam wrote:
I have done this in a perl script:
#!/usr/bin/perl use ESL; our $host = "10.1.30.236"; our $port = 8021; our $password = "ClueCon";
my $fs = new ESL::ESLconnection($host, $port, $password); # Listen to All events if($fs->connected()){ $fs->events("plain","all"); }
while($fs->connected()){ print "while\n"; my $reply = $fs->recvEventTimed(1000); if($reply){ my $event_name = $reply->getHeader("CC-Action"); if($event_name eq 'member-queue-start'){ my $session_uuid = $reply->getHeader("CC-Member-Session-UUID"); my $session_cnum = $reply->getHeader("CC-Member-CID-Number"); } } } 1;
The script ends showing nothing. Where is the problem? On Fri, Jun 21, 2013 at 2:42 PM, Antonio Teixeira <eagle.antonio@gmail.com
wrote:
Callcenter Events http://wiki.freeswitch.org/wiki/Mod_callcenter#Events
ESL Inbound http://wiki.freeswitch.org/wiki/Mod_event_socket#Inbound
The trick Make a program in *whatever* ( extra points for doing it in asm) Connect to FS send send "gimme all the events" or you can narrow it down a bit ... And handle the events on your code
" Taken from a old script of mine "
con = ESLconnection("192.168.0XXXXXX","8021","ClueCon")
if con.connected:
// Gimme all the events OR you can narrow this ... con.events("plain", "all");
while con.connected(): e = con.recvEventTimed(1000)
if e and e.getHeader("Event-Name") == 'CUSTOM' and e.getHeader("Event-Subclass") == 'callcenter::info':
On 6/21/13 9:56 AM, Ashish gautam wrote:
Hi,
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.
I have written this line in the dialplan:
<action application="socket" data="127.0.0.1:8022 async full"/>
is it going to do something?
Please throw some light on it.
-- Ashish Gautam
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ashish Gautam
Nucleus Microsystems (Pvt.) Ltd.
Ph. 011 47574758
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ashish Gautam Nucleus Microsystems (Pvt.) Ltd. Ph. 011 47574758
You should already have call center events been printed into the console. simply join the call center module as a agent or member. and a new event pops .. On 6/21/13 1:32 PM, Ashish gautam wrote:
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.
Can this happen?
On Fri, Jun 21, 2013 at 3:49 PM, Antonio Teixeira <eagle.antonio@gmail.com <mailto:eagle.antonio@gmail.com>> wrote:
Hello Not a Perl fan so i will assume everything is OK from a sytanx point of view.
Now dont do my $result = $fs->api("callcenter_config queue list members acd@default"); print $result;
The trick here is that the program will only monitor events it will not send .. so
#!/usr/bin/perl use ESL; our $host = "10.1.30.236"; our $port = 8021; our $password = "ClueCon";
my $fs = new ESL::ESLconnection($host, $port, $password);
# Listen to All events if($fs->connected()){ $fs->events("plain","all"); }
while($fs->connected()){
print "while\n"; my $reply = $fs->recvEventTimed(1000);
if($reply){
//just print the event here e.serialize() } }
Now with a soft phone call the call center you should start receiving events then you just need to narrow it down If this doesn't work try the following:
You are capturing ALL FS events this means you will get stuff like HEARTBEAT and so on if you *dont* RECEIVE anything there is a problem with your script.
First get the basic right , make the program connecr and listen for all events. Then tackle the callcenter part ..
Todo :
Get the program syntax right
You are registering to get all the events from freeswitch
You are making a loop while($fs->connected()){ you program cant exit "normally" unless you lost the connection from FS
You MUST receive something from FS , this is _mandatory_
All the ESL commands are here http://wiki.freeswitch.org/wiki/Event_Socket_Library http://wiki.freeswitch.org/wiki/Event_Socket_Library#Simple_Perl_Example
Just keep trying esl requires more work than normal "libraries" but its worth it also read the ESL manual.
Antonio
On 6/21/13 10:58 AM, Ashish gautam wrote:
I have done this in a perl script:
#!/usr/bin/perl use ESL; our $host = "10.1.30.236"; our $port = 8021; our $password = "ClueCon";
my $fs = new ESL::ESLconnection($host, $port, $password); # Listen to All events if($fs->connected()){ $fs->events("plain","all"); }
while($fs->connected()){ print "while\n"; my $reply = $fs->recvEventTimed(1000); if($reply){ my $event_name = $reply->getHeader("CC-Action"); if($event_name eq 'member-queue-start'){ my $session_uuid = $reply->getHeader("CC-Member-Session-UUID"); my $session_cnum = $reply->getHeader("CC-Member-CID-Number"); } } } 1;
The script ends showing nothing. Where is the problem? On Fri, Jun 21, 2013 at 2:42 PM, Antonio Teixeira <eagle.antonio@gmail.com <mailto:eagle.antonio@gmail.com>> wrote:
Callcenter Events http://wiki.freeswitch.org/wiki/Mod_callcenter#Events
ESL Inbound http://wiki.freeswitch.org/wiki/Mod_event_socket#Inbound
The trick Make a program in *whatever* ( extra points for doing it in asm) Connect to FS send send "gimme all the events" or you can narrow it down a bit ... And handle the events on your code
" Taken from a old script of mine "
con = ESLconnection("192.168.0XXXXXX","8021","ClueCon")
if con.connected:
// Gimme all the events OR you can narrow this ... con.events("plain", "all");
while con.connected(): e = con.recvEventTimed(1000)
if e and e.getHeader("Event-Name") == 'CUSTOM' and e.getHeader("Event-Subclass") == 'callcenter::info':
On 6/21/13 9:56 AM, Ashish gautam wrote:
Hi,
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.
I have written this line in the dialplan:
<action application="socket" data="127.0.0.1:8022 <http://127.0.0.1:8022> async full"/>
is it going to do something?
Please throw some light on it.
-- Ashish Gautam
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ashish Gautam
Nucleus Microsystems (Pvt.) Ltd.
Ph. 011 47574758
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ashish Gautam
Nucleus Microsystems (Pvt.) Ltd.
Ph. 011 47574758
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I have this in my dialplan: <include> <extension name="cool_fifo"> <condition field="destination_number" expression="^(47673503)$"> <action application="answer"/> <action application="socket" data="127.0.0.1:9090 async full"/> <action application="record_session" data="$${base_dir}/recordings/${uuid}.wav"/
<action application="callcenter" data="acd@default"/> <action application="hangup" data="NORMAL_CLEARING"/> </condition> </extension> </include> Only the CHANNEL_HANGUP event is thrown to the script which listens on port 9090. No other event is thrown. On Fri, Jun 21, 2013 at 6:10 PM, Antonio Teixeira <eagle.antonio@gmail.com>wrote:
You should already have call center events been printed into the console.
simply join the call center module as a agent or member. and a new event pops ..
On 6/21/13 1:32 PM, Ashish gautam wrote:
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.
Can this happen?
On Fri, Jun 21, 2013 at 3:49 PM, Antonio Teixeira <eagle.antonio@gmail.com
wrote:
Hello Not a Perl fan so i will assume everything is OK from a sytanx point of view.
Now dont do my $result = $fs->api("callcenter_config queue list members acd@default "); print $result;
The trick here is that the program will only monitor events it will not send .. so
#!/usr/bin/perl use ESL; our $host = "10.1.30.236"; our $port = 8021; our $password = "ClueCon";
my $fs = new ESL::ESLconnection($host, $port, $password);
# Listen to All events if($fs->connected()){ $fs->events("plain","all"); }
while($fs->connected()){
print "while\n"; my $reply = $fs->recvEventTimed(1000);
if($reply){
//just print the event here e.serialize() } }
Now with a soft phone call the call center you should start receiving events then you just need to narrow it down If this doesn't work try the following:
You are capturing ALL FS events this means you will get stuff like HEARTBEAT and so on if you *dont* RECEIVE anything there is a problem with your script.
First get the basic right , make the program connecr and listen for all events. Then tackle the callcenter part ..
Todo :
Get the program syntax right
You are registering to get all the events from freeswitch
You are making a loop while($fs->connected()){ you program cant exit "normally" unless you lost the connection from FS
You MUST receive something from FS , this is *mandatory*
All the ESL commands are here http://wiki.freeswitch.org/wiki/Event_Socket_Library http://wiki.freeswitch.org/wiki/Event_Socket_Library#Simple_Perl_Example
Just keep trying esl requires more work than normal "libraries" but its worth it also read the ESL manual.
Antonio
On 6/21/13 10:58 AM, Ashish gautam wrote:
I have done this in a perl script:
#!/usr/bin/perl use ESL; our $host = "10.1.30.236"; our $port = 8021; our $password = "ClueCon";
my $fs = new ESL::ESLconnection($host, $port, $password); # Listen to All events if($fs->connected()){ $fs->events("plain","all"); }
while($fs->connected()){ print "while\n"; my $reply = $fs->recvEventTimed(1000); if($reply){ my $event_name = $reply->getHeader("CC-Action"); if($event_name eq 'member-queue-start'){ my $session_uuid = $reply->getHeader("CC-Member-Session-UUID"); my $session_cnum = $reply->getHeader("CC-Member-CID-Number"); } } } 1;
The script ends showing nothing. Where is the problem? On Fri, Jun 21, 2013 at 2:42 PM, Antonio Teixeira < eagle.antonio@gmail.com> wrote:
Callcenter Events http://wiki.freeswitch.org/wiki/Mod_callcenter#Events
ESL Inbound http://wiki.freeswitch.org/wiki/Mod_event_socket#Inbound
The trick Make a program in *whatever* ( extra points for doing it in asm) Connect to FS send send "gimme all the events" or you can narrow it down a bit ... And handle the events on your code
" Taken from a old script of mine "
con = ESLconnection("192.168.0XXXXXX","8021","ClueCon")
if con.connected:
// Gimme all the events OR you can narrow this ... con.events("plain", "all");
while con.connected(): e = con.recvEventTimed(1000)
if e and e.getHeader("Event-Name") == 'CUSTOM' and e.getHeader("Event-Subclass") == 'callcenter::info':
On 6/21/13 9:56 AM, Ashish gautam wrote:
Hi,
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.
I have written this line in the dialplan:
<action application="socket" data="127.0.0.1:8022 async full"/>
is it going to do something?
Please throw some light on it.
-- Ashish Gautam
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ashish Gautam
Nucleus Microsystems (Pvt.) Ltd.
Ph. 011 47574758
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ashish Gautam
Nucleus Microsystems (Pvt.) Ltd.
Ph. 011 47574758
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ashish Gautam Nucleus Microsystems (Pvt.) Ltd. Ph. 011 47574758
Also When the script listening on port 9090 is executing, the call is not transferred to any of the agents. On Mon, Jun 24, 2013 at 12:27 PM, Ashish gautam <ashish@nms.co.in> wrote:
I have this in my dialplan:
<include> <extension name="cool_fifo"> <condition field="destination_number" expression="^(47673503)$"> <action application="answer"/> <action application="socket" data="127.0.0.1:9090 async full"/> <action application="record_session" data="$${base_dir}/recordings/${uuid}.wav"/
<action application="callcenter" data="acd@default"/> <action application="hangup" data="NORMAL_CLEARING"/> </condition> </extension> </include>
Only the CHANNEL_HANGUP event is thrown to the script which listens on port 9090. No other event is thrown.
On Fri, Jun 21, 2013 at 6:10 PM, Antonio Teixeira <eagle.antonio@gmail.com
wrote:
You should already have call center events been printed into the console.
simply join the call center module as a agent or member. and a new event pops ..
On 6/21/13 1:32 PM, Ashish gautam wrote:
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.
Can this happen?
On Fri, Jun 21, 2013 at 3:49 PM, Antonio Teixeira < eagle.antonio@gmail.com> wrote:
Hello Not a Perl fan so i will assume everything is OK from a sytanx point of view.
Now dont do my $result = $fs->api("callcenter_config queue list members acd@default "); print $result;
The trick here is that the program will only monitor events it will not send .. so
#!/usr/bin/perl use ESL; our $host = "10.1.30.236"; our $port = 8021; our $password = "ClueCon";
my $fs = new ESL::ESLconnection($host, $port, $password);
# Listen to All events if($fs->connected()){ $fs->events("plain","all"); }
while($fs->connected()){
print "while\n"; my $reply = $fs->recvEventTimed(1000);
if($reply){
//just print the event here e.serialize() } }
Now with a soft phone call the call center you should start receiving events then you just need to narrow it down If this doesn't work try the following:
You are capturing ALL FS events this means you will get stuff like HEARTBEAT and so on if you *dont* RECEIVE anything there is a problem with your script.
First get the basic right , make the program connecr and listen for all events. Then tackle the callcenter part ..
Todo :
Get the program syntax right
You are registering to get all the events from freeswitch
You are making a loop while($fs->connected()){ you program cant exit "normally" unless you lost the connection from FS
You MUST receive something from FS , this is *mandatory*
All the ESL commands are here http://wiki.freeswitch.org/wiki/Event_Socket_Library http://wiki.freeswitch.org/wiki/Event_Socket_Library#Simple_Perl_Example
Just keep trying esl requires more work than normal "libraries" but its worth it also read the ESL manual.
Antonio
On 6/21/13 10:58 AM, Ashish gautam wrote:
I have done this in a perl script:
#!/usr/bin/perl use ESL; our $host = "10.1.30.236"; our $port = 8021; our $password = "ClueCon";
my $fs = new ESL::ESLconnection($host, $port, $password); # Listen to All events if($fs->connected()){ $fs->events("plain","all"); }
while($fs->connected()){ print "while\n"; my $reply = $fs->recvEventTimed(1000); if($reply){ my $event_name = $reply->getHeader("CC-Action"); if($event_name eq 'member-queue-start'){ my $session_uuid = $reply->getHeader("CC-Member-Session-UUID"); my $session_cnum = $reply->getHeader("CC-Member-CID-Number"); } } } 1;
The script ends showing nothing. Where is the problem? On Fri, Jun 21, 2013 at 2:42 PM, Antonio Teixeira < eagle.antonio@gmail.com> wrote:
Callcenter Events http://wiki.freeswitch.org/wiki/Mod_callcenter#Events
ESL Inbound http://wiki.freeswitch.org/wiki/Mod_event_socket#Inbound
The trick Make a program in *whatever* ( extra points for doing it in asm) Connect to FS send send "gimme all the events" or you can narrow it down a bit ... And handle the events on your code
" Taken from a old script of mine "
con = ESLconnection("192.168.0XXXXXX","8021","ClueCon")
if con.connected:
// Gimme all the events OR you can narrow this ... con.events("plain", "all");
while con.connected(): e = con.recvEventTimed(1000)
if e and e.getHeader("Event-Name") == 'CUSTOM' and e.getHeader("Event-Subclass") == 'callcenter::info':
On 6/21/13 9:56 AM, Ashish gautam wrote:
Hi,
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.
I have written this line in the dialplan:
<action application="socket" data="127.0.0.1:8022 async full"/>
is it going to do something?
Please throw some light on it.
-- Ashish Gautam
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ashish Gautam
Nucleus Microsystems (Pvt.) Ltd.
Ph. 011 47574758
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ashish Gautam
Nucleus Microsystems (Pvt.) Ltd.
Ph. 011 47574758
_________________________________________________________________________ Professional FreeSWITCH Consulting Services:consulting@freeswitch.orghttp://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Serverhttp://www.cudatel.com
Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Ashish Gautam
Nucleus Microsystems (Pvt.) Ltd.
Ph. 011 47574758
-- Ashish Gautam Nucleus Microsystems (Pvt.) Ltd. Ph. 011 47574758
participants (2)
-
Antonio Teixeira
-
Ashish gautam