[asterisk-users] AMI perl daemon

Alex Balashov abalashov at evaristesys.com
Mon May 16 15:14:19 CDT 2011


On 05/16/2011 04:08 PM, vip killa wrote:

> Umm thank you...apparently AMI::Asterisk sucks because that code did
>  everything i needed in one try. thanks again!

Awesome!  Happy to help.

A more sophisticated and high-performance version of this--required for 
scaling out to multiple Asterisk servers or higher dialing pace--would 
involve a daemon that maintains multiple AMI connections, uses 
non-blocking sockets and synchronous I/O multiplexing (i.e. IO::Select) 
to mux I/O from those connections as well as some sort of IPC control 
socket/interface which can be hit with originate requests, instead of 
using a database table for that purpose.

An HTTP API would be a good way to do that from the dial plan.  The 
package HTTP::Server::Simple::CGI (available from CPAN) is a good way to 
add a minimalistic web server thread.  Then you can issue CURL calls 
from the dial plan to it, and it can go pick an Asterisk AMI connection 
over which to issue the Originate, and possibly even return a success or 
failure via HTTP if the connection is held open.

-- 
Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/



More information about the asterisk-users mailing list