[Asterisk-Users] Re: Which AGI Development Software is fastest on Asterisk?

Tzafrir Cohen tzafrir at cohens.org.il
Fri Aug 19 01:15:34 MST 2005


On Fri, Aug 19, 2005 at 01:18:14AM +0100, Matt King wrote:
> Hello,
> 
> >I'm looking to develop some custom AGI that will be MySQL intensive.  It
> >appears Asterisk supports many different development environments.  Which
> >would be best suited for Asterisk and MySQL?
> 
>    It's generally fastest to use FastAGI (over TCP/IP), rather than 
> regular AGI as this means the OS isn't starting a new process for each 
> call (just like it's faster to use PHP or Servlets rather than 
> old-school CGI for serving web pages).  

FastAGI is like FastCGI. PHP can run as CGI/AGI and FastCGI/FastAGI. But
it is commonly run (with Apache) as a module an internal PHP
"interpeter" that run in the apache process(es).

The equivalent for that on Asterisk is res_LANGNAME . E.g: res_php and
res_perl. They run a complete LANGNAME interpeter inside Asterisk.

One downside for that: there is some code in the works (written. checked
in?) to reduce priority of a spawned process. But "interpreted" LANGNAME
code will probably run with full asterisk scheduling priority and full
permissions to hang the system in case of a 100% CPU loop.

One nice thing about AGI/CGI: simplicity. No need for a restart/reload. 
You can easily run them outside of asterisk/apache. Perl's CGI module 
makes this even simpler.

-- 
Tzafrir Cohen         | tzafrir at jbr.cohens.org.il | VIM is
http://tzafrir.org.il |                           | a Mutt's  
tzafrir at cohens.org.il |                           |  best
ICQ# 16849755         |                           | friend



More information about the asterisk-users mailing list