Hi AJ, Am 06.06.2016 um 10:14 schrieb A J Stiles:> But why not call an AGI script, have this check the caller ID against a MySQL > database and return a status -- blocked or not -- in a variable? Then you can > manage individual number blocking in a much cleaner, more extensible fashion. > > Feel free to ignore me if it sounds like I'm suggesting you walk all the way > to the tool shed to fetch a chisel, when you know the screwdriver in your > drawer is already up to the job :)you're right, it would be the better solution! But I'm simply too lazy to implement that. :D Regards Markus
On Monday 06 Jun 2016, Markus wrote:> Hi AJ, > Am 06.06.2016 um 10:14 schrieb A J Stiles: > > But why not call an AGI script, have this check the caller ID against a > > MySQL database and return a status -- blocked or not -- in a variable? > > Then you can manage individual number blocking in a much cleaner, more > > extensible fashion. > ..... stuff deleted ..... > you're right, it would be the better solution! But I'm simply too lazy > to implement that. :DAre you lazy enough to edit a text file and reload your dialplan, *every single time* someone calls you, that you don't want to have to speak to ever again? Not sure about you, but that sounds way too much like hard work for me! :) -- AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk .
On 6/6/16 10:55 AM, A J Stiles wrote:> On Monday 06 Jun 2016, Markus wrote: >> Hi AJ, >> Am 06.06.2016 um 10:14 schrieb A J Stiles: >>> But why not call an AGI script, have this check the caller ID against a >>> MySQL database and return a status -- blocked or not -- in a variable? >>> Then you can manage individual number blocking in a much cleaner, more >>> extensible fashion. >> ..... stuff deleted ..... >> you're right, it would be the better solution! But I'm simply too lazy >> to implement that. :D > Are you lazy enough to edit a text file and reload your dialplan, *every single > time* someone calls you, that you don't want to have to speak to ever again? > > Not sure about you, but that sounds way too much like hard work for me! :) >And the BLACKLIST function is not a better option for this? So much simpler than an AGI or even including a file in the dialplan. Every time you modify the dialplan you run the risk of a typo that will prevent something from loading. -- Telecomunicaciones Abiertas de M?xico S.A. de C.V. Carlos Ch?vez +52 (55)9116-91161
<html><head><title>Re: [asterisk-users] Including doesn't have any effect</title> </head> <body> <span style=" font-family:'Courier New'; font-size: 9pt;">On Monday, June 6, 2016, 4:55:12 PM, AJS wrote:<br> <br> <span style=" color: #800000;"><b>> Are you lazy enough to edit a text file and reload your dialplan, *every single<br>> time* someone calls you, that you don't want to have to speak to ever again?<br><br>> Not sure about you, but that sounds way too much like hard work for me! :)<br><br> </b><span style=" color: #000000;">Indeed, too much for me too...<br> <br> exten => s,n,GotoIf(${DB_EXISTS(blacklist/${CDR(src)})}?block) ; Check whether caller blacklisted<br> [snip additional logging]<br> exten => s,n,Dial(SIP/phones,30)<br> exten => s,n,Voicemail(xxxxx@work,su)<br> exten => s,n,Hangup()<br> exten => s,n(block),GoSub(Handler-MarketingCall,s,1) ; deal with blacklisted callers<br> [snip]<br> <br> This is linked to couple of simple routines that allow me to add the current (##666) or last caller (*32) to the blacklist or manually input any other number (*30).<br> <br> <span style=" font-family:'arial'; font-size: 8pt; color: #c0c0c0;"><i>-- <br> Best regards,<br> Julian </i></span></span></span></span><a style=" font-family:'arial';" href="mailto:jb_soft@trink.co.uk">mailto:jb_soft@trink.co.uk</a></body></html>