[asterisk-users] my "blacklist" is not working

Joseph syscon780 at gmail.com
Tue Apr 9 21:14:05 CDT 2013


On 04/09/13 19:27, Joseph wrote:
>In my blacklist I have: database show
>...
>/blacklist/Manitoba     : advertising
>...
>
>[incoming]
>
>; First, lets take care of telemarketers
>
>exten => 4,1,GotoIf(${BLACKLIST()}?blacklisted,s,1)
>exten => 4,n,Set(goaway=${CALLERID(number):0:2})
>exten => 4,n,GotoIf($["${goaway}" = "V4" ]?blacklisted,s,1)
>exten => 4,n,GotoIf($["${goaway}" = "V3" ]?blacklisted,s,1)
>...
>
>I just received a call from the same telemarketer with caller ID: Manitoba
>How did he get through? Why blacklist is not working. The second part is working OK I tested it: (anything starting with V4 ro V3 is forwarded to: "blacklisted,s,1"
>
>exten => 4,n,Set(goaway=${CALLERID(number):0:2})
>exten => 4,n,GotoIf($["${goaway}" = "V4" ]?blacklisted,s,1)
>exten => 4,n,GotoIf($["${goaway}" = "V3" ]?blacklisted,s,1)
>
>But the first line suppose to compare the caller "ID" to the one in database and jump to "blacklisted,s,1" context.

The reason it wasn't working as I had in database: "Manitoba" and the caller id this time was: "Manitoba " 
there was a space after the last letter, that is why it wasn't working.  

Is there a way to counter/eliminate or do wildcard for "space"?

-- 
Joseph



More information about the asterisk-users mailing list