Subject: | Issue using Action => 'Queue' |
Date: | Tue, 28 Mar 2017 23:17:08 -0500 |
To: | bug-Asterisk-AMI [...] rt.cpan.org |
From: | Cullen Lorsung <cullenlorsung [...] openipsolutions.com> |
Regardless of how I go about it, it doesn't appear this works. The
following is output in asterisk debug:
[2017-03-28 22:59:08] DEBUG[31492]: manager.c:6317 process_message: Running
action 'Logoff'
[2017-03-28 22:59:08] DEBUG[31492]: tcptls.c:350 tcptls_stream_write: TCP
socket error writing: Broken pipe
[2017-03-28 22:59:08] DEBUG[31492]: tcptls.c:350 tcptls_stream_write: TCP
socket error writing: Broken pipe
[2017-03-28 22:59:08] DEBUG[31492]: utils.c:1457 ast_careful_fwrite:
fwrite() failed due to reading end being closed: EPIPE
[2017-03-28 22:59:08] DEBUG[31492]: tcptls.c:350 tcptls_stream_write: TCP
socket error writing: Broken pipe
[2017-03-28 22:59:08] DEBUG[31492]: tcptls.c:350 tcptls_stream_write: TCP
socket error writing: Broken pipe
[2017-03-28 22:59:08] DEBUG[31492]: utils.c:1457 ast_careful_fwrite:
fwrite() failed due to reading end being closed: EPIPE
Obviously the AMI connection is closed prior to the data being written, but
I'm not able to have it stay open for this to finish. No issues with other
actions I've tested, seems this one is special. Below is an example:
use Asterisk::AMI;
use warnings;
use strict;
$| = 1;
my $astman = Asterisk::AMI->new(
PeerAddr => '127.0.0.1',
PeerPort => '5038',
Username => 'user',
Secret => 'secret'
);
die "Unable to connect to asterisk" unless ($astman);
my $queuesAct = $astman->send_action( {
Action => 'Queues',
},2);
my $queuesRes = $astman->get_response($queuesAct,2);
print $queuesRes;
​Thanks
Cullen​
*_________________*
[image: OPENIP Custom Communications Banner Small]
<http://www.openipsolutions.com/>
1597278797495a8405d457912f1eb9a5
Cullen Lorsung
Open IP Solutions
651 323 5066
<https://www.irccloud.com/invite?channel=%23freepbx&hostname=irc.freenode.net&port=6697&ssl=1>