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: https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_REGEX Matt -- 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 -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users