[Asterisk-Users] Re: Nested MySQL Commands

Tony Mountifield tony at softins.clara.co.uk
Wed Jan 11 15:32:45 MST 2006


In article <645FEC31A18FE54A8721500CDD55A7B602B425B7 at mail.oneeighty.com>,
Douglas Garstang <dgarstang at oneeighty.com> wrote:
> Peter,
> 
> Too slow! We're going to potentially be doing several MySQL lookups for routing even the
> most basic of calls, and if every one of those queries has to make a call out to an AGI
> script, it would become a performance problem.

AGI is only slow if you're calling it repeatedly and implementing it in
a scripting language that needs a big interpreter.

I have had great success writing AGIs in C and interfacing to MySQL
from within them. They end up nice and small and fast. A single AGI
invocation does all the database transactions necessary to decide
on the disposition of the call, and then jumps to the appropriate
extension and priority in the dialplan.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list