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/

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to