Re: [asterisk-users] Including doesn't have any effect

2016-06-06 Thread Julian Beach
Title: Re: [asterisk-users] Including doesn't have any effect Hello Frank, Monday, June 6, 2016, 9:46:47 PM, you wrote: > As far as I know, Asterisk's database/blacklist function only supports > exact match of caller ID. > If you want to block a specific area code or a block of nu

Re: [asterisk-users] Including doesn't have any effect

2016-06-06 Thread Frank Vanoni
On Mon, 2016-06-06 at 08:08 -0700, Steve Edwards wrote: > The purpose of a subroutine (code that is entered by a gosub and exited by > a return) is to allow the creation of easily reusable code. [snip] Steve Thank you very, very much for your answer. I really appreciated your interesting

Re: [asterisk-users] Including doesn't have any effect

2016-06-06 Thread Frank Vanoni
On Mon, 2016-06-06 at 17:47 +0100, Julian Beach wrote: > exten => s,n,GotoIf(${DB_EXISTS(blacklist/${CDR(src)})}?block) ; Check > whether caller blacklisted As far as I know, Asterisk's database/blacklist function only supports exact match of caller ID. If you want to block a specific area code

Re: [asterisk-users] Including doesn't have any effect

2016-06-06 Thread Julian Beach
Title: Re: [asterisk-users] Including doesn't have any effect On Monday, June 6, 2016, 4:55:12 PM, AJS wrote: > 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

Re: [asterisk-users] Including doesn't have any effect

2016-06-06 Thread Carlos Chavez
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

Re: [asterisk-users] Including doesn't have any effect

2016-06-06 Thread A J Stiles
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

Re: [asterisk-users] Including doesn't have any effect

2016-06-06 Thread Steve Edwards
On Mon, 6 Jun 2016, Frank Vanoni wrote: On Sat, 2016-06-04 at 15:19 -0700, Steve Edwards wrote: Using a 'goto' to exit from a gosub is a bad idea. Why? The purpose of a subroutine (code that is entered by a gosub and exited by a return) is to allow the creation of easily reusable code.

Re: [asterisk-users] Including doesn't have any effect

2016-06-06 Thread Frank Vanoni
On Sat, 2016-06-04 at 15:19 -0700, Steve Edwards wrote: > Using a 'goto' to exit from a gosub is a bad idea. Why? > A better idea would be > to set a channel variable and check it's value after the return, in the > calling context. The idea is to update the blacklist.conf whenever I want to

Re: [asterisk-users] Including doesn't have any effect

2016-06-06 Thread Markus
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

Re: [asterisk-users] Including doesn't have any effect

2016-06-06 Thread A J Stiles
On Saturday 04 Jun 2016, Markus wrote: > Hi list, > > n00b question, but I can't figure it out: > > [callthrough] > exten => _+X.,1,NoOp(nothing here) > #include "blockedall.conf" > exten => _+X.,n(hangup),Hangup > exten => _+X.,n(nohangup),GotoIf($["${CALLERID(num)}" = > "anonymous"]?nocli:cli)

Re: [asterisk-users] Including doesn't have any effect

2016-06-04 Thread Steve Edwards
On Sat, 4 Jun 2016, Frank Vanoni wrote: Another possible approach to blacklist two (or more) specific callers (098765432 and 012345678 as example) exten => _+x.,1,Gosub(blacklist,s,1) exten => _+x.,n, exten => black,1,playback(tt-monkeys) In blacklist.conf exten =>

Re: [asterisk-users] Including doesn't have any effect

2016-06-04 Thread Frank Vanoni
Another possible approach to blacklist two (or more) specific callers (098765432 and 012345678 as example) In extension.conf #include "blaklist.conf" exten => _+x.,1,Gosub(blacklist,s,1) exten => _+x.,n, exten => black,1,playback(tt-monkeys) In blacklist.conf exten =>

Re: [asterisk-users] Including doesn't have any effect

2016-06-04 Thread Markus
Am 04.06.2016 um 21:58 schrieb Steve Edwards: 1) If the caller ID matches '+493456789' (the first one), you goto the 'hangup' label. If it does not match, you goto the 'nohangup' label -- skipping the subsequent tests. Doh! Removed :nohangup from every line but the last one and now it works

Re: [asterisk-users] Including doesn't have any effect

2016-06-04 Thread Steve Edwards
On Sat, 4 Jun 2016, Markus wrote: n00b question, but I can't figure it out: [callthrough] exten => _+X.,1,NoOp(nothing here) #include "blockedall.conf" exten => _+X.,n(hangup),Hangup exten => _+X.,n(nohangup),GotoIf($["${CALLERID(num)}" = "anonymous"]?nocli:cli) ... more stuff that is