[asterisk-users] Open Source Asterisk Polling Solution

Steve Edwards asterisk.org at sedwards.com
Wed Apr 23 09:55:43 CDT 2014


On 4/23/2014 12:20 AM, Nick Cameo wrote:

> I have a strong Java, PHP and SQL background. Will probably need to make 
> a call using AGI or such?

On Wed, 23 Apr 2014, James Sharp wrote:

> You can go AGI, but there are direct ODBC handles available in the 
> dialplan if you build Asterisk properly with the ODBC resources enabled. 
> That'd my personal preference from a performance standpoint.

On Wed, 23 Apr 2014, Josh Metzger wrote:

> I agree that ODBC is the way to go here. It's trivially easy to setup, 
> and equally simple to push database updates via the dialplan. I've used 
> ODBC connectivity with Asterisk in a large and VERY busy call center, 
> and performance was never remotely an issue (call recording is a 
> different story, but that's something else entirely...). There was 
> mention of checking against a DNC list, and ODBC would be good for this 
> as well - just put that into a table and match against it before making 
> your outbound call.

And in this corner...

I always do database access it an AGI. IMNSHO, any significant chunk of 
logic or functionality belongs in an AGI. Keep your dialplan lean and 
mean.

I tried database access in the dialplan using the mysql() application 
years ago, just to confirm I was right and I was :)

What an ugly, messy, fragile dialplan.

You already know database access in 'real' languages, why would you want 
to code in a limited and difficult to debug environment?

I'm an 'old school' C programmer, so performance is always close to my 
heart, but not when it makes my job harder.

Writing database access in the dialplan avoids creating a process for the 
AGI, but unless you're processing hundreds or thousands of calls per 
second, process creation is not going to be a factor.

I write my AGIs in C. It is my 'sharpest tool in the toolbox.' If C is not 
in your 'wheelhouse,' use PHP or <cough>Java</cough>. You (and the next 
guy who gets to enhance and maintain this application) will be glad you 
did.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list