[asterisk-users] asterisk, phpagi and singleton

Alex Balashov abalashov at evaristesys.com
Mon Oct 6 00:19:20 CDT 2008


I think the problem is that every [Dead]AGI call is still a distinct 
invocation of the script, even if the interpreter stays loaded as an ELF 
module or whatnot.

A good solution to this problem would be to use a FastAGI service, 
wherein a daemon runs persistently with a reusable DB handle.  Calls to 
AGI can connect to that using a service mode of operation rather than 
invoking a local script.

Giedrius Augys wrote:

> Hello,
> 
>    I've this situation: 300+ simultaneous calls and dialplan like this:
> exten => _X.,1,Answer()
> exten => _X.,2,DEADAGI(check_status.php)
> exten => _X.,3,Dial(SIP/other/${NUMBER})
> exten => _X.,4,Hangup
> 
> exten => h,1,DEADAGI(cdr.php)
> 
> When project is running , I had  a lot of defunct php scripts (I've 
> exceed mysql connection limits and so on, deadagi help a bit). The 
> scripts check_status.php and cdr.php connects to database to 
> retrieve/store data. So one call - 2 connections to database. So I want 
> to do like this: 100 simultaneous calls , make 200 queries per one mysql 
> connection. WEB developers uses singleton to avoid this issue. Maybe 
> somebody has experience with singleton and phpagi.
> thanks...
> 
> -- 
> Pagarbiai  / Best Regards,
> Giedrius Augys
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> AstriCon 2008 - September 22 - 25 Phoenix, Arizona
> Register Now: http://www.astricon.net
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599



More information about the asterisk-users mailing list