How about:

exten => s,1,GotoIf($[${CALLERIDNUM} : "^(904|321|407|252)[0-9]{7}$"] ? 2:3)
exten => s,2,Goto(somewhere,s,1)
exten => s,3,DoWhateverElse


On Oct 15, 2004, at 7:21 AM, Ben Wern wrote:

That's pretty good..

I have a similar situation, where I need to match all the area codes in a particular state like:

exten => _[904|321|407|252]XXXXXXX,1,Dial..............

But it doesn't work. I can get it to work with something along the lines of:

exten -> _[904|321|407|352]X.,1,Dial

But I was hoping to be more specific.. other than specifying each area code ala _904XXXXXXX,1,Dial..... do you know of any way to do this?

Ben Wern

> Maybe like this:
>
>
> exten => s,5,DBGet(blacklisted=blacklisted/${CALLERIDNUM}) exten =>
> s,6,GotoIf(${blacklisted} = "1"?hell|1)
>
> You just have to put every blacklisted number in the Asterisk database as
> it would be seen from the callerid number.
>
> I this this solution is better than changing your extensions.conf every
> time you change (boy|girl)friend.
>
> Michel


_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to