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

Matthew Jordan mjordan at digium.com
Wed Apr 10 08:29:34 CDT 2013

On 04/09/2013 09:14 PM, Joseph wrote:
> On 04/09/13 19:27, Joseph wrote:
>> 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"?

Instead of doing an explicit comparison, you could always use a regular
expression to perform the matching:



Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org

More information about the asterisk-users mailing list