[asterisk-users] Open Source Asterisk Polling Solution

Steve Edwards asterisk.org at sedwards.com
Wed Apr 23 13:36:12 CDT 2014


On Wed, 23 Apr 2014, Steve Edwards wrote:

>>> 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.

On Wed, 23 Apr 2014, Doug Lytle wrote:

> With FuncODBC this is no longer an issue.  All of the query logic is 
> handled outside of the dial plan.

I took a look and it looks like a step in the right direction, kind of a 
'prepared statement' approach and it gets all the ugly quoting nonsense 
out of the dialplan. The query statement may be out of the dialplan, but 
the logic of what to do with the returned values remains.

The OP stated that he was going to 'will wire it up to the DNC' (the 
National Do Not Call Registry?) which sounds like a simple 'query the 
database to see if the key exists' kind of thing for which ODBC seems 
reasonable.

This application should be expanded to include multiple databases so his 
callers can press 1 to be queued for an agent or 2 to be added to his 
client's private DNC database. While checking 2 databases is no big deal, 
a simple 'check-dnc' AGI can hide those details and yield a cleaner 
dialplan.

As the application matures, there may be additional enhancements that 
would lean towards wishing he had started down the AGI road.

If the target list includes (but is not limited to) members of a group 
(like a church) you could have a situation where the callee is on the DNC, 
but has opted-in so you have another database to consider.

How about checking the database to see the last time they had 'waste they 
need picked up?' If the 'waste' is charitable donations of clothing or 
furniture, I suspect most people would be good with just a call or 2 per 
year.

How about letting the 'donor' schedule the number of months until the next 
call?

-- 
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