But you could implement your own pattern matching logic in your dialplan
and block anything you like, including a range of numbers. You could for
example strip the callerid number down to just the area code, check that
agains a blocked list. Or you could get creative with regular
expressions. Take this rather nasty segment from my own dialplan....
; Check against blacklist
same => n,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num)})}?onblacklist)
; Not on blacklist, check Caller ID number for anonymous conditions...
; If all zeros (with or without international dialing + sign) then caller
is anonymous.
same => n,GotoIf($[${REGEX("^[+]?0+$" ${CALLERID(num)})} = 1]?unknown)
; If Caller ID is not a number at least 4 digits long (with or without +
sign)
; then caller is assumed to be anonymous. Alphabetic Caller ID "numbers"
; will therefore be considered anonymous. Common numbers for anonymous
callers
; are: "asterisk, unknown, anonymous, private, unavailable" which may be
upper, lower
; or mixed case. The regular expression catches everything non-numeric.
; If you want to permit a specific non-numeric Caller ID "number" add it
to whitelist.
same => n,GotoIf($[${REGEX("^[+]?[0-9]{4\,}$" ${CALLERID(num)})} !=
1]?unknown)
; Caller ID looks good.
Regards,
David
On Mon, Mar 16, 2015 at 7:55 AM, Michael Keuter <li...@mksolutions.info>
wrote:
>
> Am 16.03.2015 um 12:21 schrieb nedi <n...@gmx.ch>:
>
> > Hi
> > has someone try to use wildcard or put a range in Astlinux blacklist..
> or only a part of Number as sample 041 588
> > I would like to block full range of Numbers which include as sample 041
> 588, 052 588, 061 588…
> >
> > best regards
>
>
> Hi Nedi,
>
> to my knowledge inbound pattern matching for CallerID only works with the
> so-called "ex-girlfriend logic" :-).
>
> exten => 100/_1234XXXXX,1,Answer()
> same => n,NoOp(Do what you want)
> same => n,Hangup()
>
> Where _1234XXXXX is your blacklist pattern.
>
> For outbound blocking you can include another context into you outbound
> context, e.g.:
>
> [outbound_blocked_numbers]
> exten => _00ZXXX.,1,Goto(blocked,${EXTEN},1)
>
> I haven't found an easy way using a database. I you find one, please
> report back.
>
> Michael
>
> http://www.mksolutions.info
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Astlinux-users mailing list
> Astlinux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/astlinux-users
>
> Donations to support AstLinux are graciously accepted via PayPal to
> pay...@krisk.org.
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users
Donations to support AstLinux are graciously accepted via PayPal to
pay...@krisk.org.