<div dir="ltr"><div><div>I think it's all a matter of personal taste. I think the logic for "add to DNC" is extremely trivial and would be more complicated with an AGI. You have your prompt playback/read, if they hit "1", head to the queue, if they hit "2", it's a single dialplan line to put the info into the database and then one more like to Playback a nice "Goodbye" message. You also add one additional line before calling out in that case - one query for the national DNC and one for the "internal" DNC, or you can get really fancy and setup your table with an extra column that denotes "national" or "internal". While you're add it, throw in that extra column for "next call scheduling"...<br>
<br></div>All that being said, you would probably be better off pre-processing before sending the phone numbers to the PBX so you've already scrubbed the call list to only people not on a DNC list and within the scheduled call-back time. That way you save the checks for each call outbound and only have the code for adding people to the DNC and scheduling the next call, though it still could be done either way (though in the case of not pre-processing, you're getting closer to making Asterisk into a dialer system and then you can get into fancy legal issues about using an "autodialer" when you accidentally call someone who doesn't want to be called and they complain (dependant on jurisdiction).<br>
<br></div>-Josh<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 23, 2014 at 2:36 PM, Steve Edwards <span dir="ltr"><<a href="mailto:asterisk.org@sedwards.com" target="_blank">asterisk.org@sedwards.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Wed, 23 Apr 2014, Steve Edwards wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>
</blockquote></blockquote></blockquote>
<br></div><div class="">
On Wed, 23 Apr 2014, Doug Lytle wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
With FuncODBC this is no longer an issue. All of the query logic is handled outside of the dial plan.<br>
</blockquote>
<br></div>
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.<br>
<br>
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.<br>
<br>
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.<br>
<br>
As the application matures, there may be additional enhancements that would lean towards wishing he had started down the AGI road.<br>
<br>
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.<br>
<br>
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.<br>
<br>
How about letting the 'donor' schedule the number of months until the next call?<div class="im HOEnZb"><br>
<br>
-- <br>
Thanks in advance,<br>
------------------------------<u></u>------------------------------<u></u>-------------<br>
Steve Edwards <a href="mailto:sedwards@sedwards.com" target="_blank">sedwards@sedwards.com</a> Voice: <a href="tel:%2B1-760-468-3867" value="+17604683867" target="_blank">+1-760-468-3867</a> PST<br>
Newline Fax: <a href="tel:%2B1-760-731-3000" value="+17607313000" target="_blank">+1-760-731-3000</a><br>
<br></div><div class="HOEnZb"><div class="h5">
-- <br>
______________________________<u></u>______________________________<u></u>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/<u></u>mailman/listinfo/asterisk-<u></u>users</a><br>
</div></div></blockquote></div><br></div>