How should be the REGEX to block or filter this numers

Catalog of dial plans
Post Reply
qubo
Posts: 127
Joined: Tue Apr 12, 2011 6:11 am

How should be the REGEX to block or filter this numers

Post by qubo » Sat Sep 24, 2011 9:56 pm

HI. I actually can send incoming calls from US to voicemail this is the RegEx used

when /1\d{10}/ then sys.Dial( "inquss@local&1777249xxxx@in.callcentric.com[dt=1][fu=#{@cid}]" )

so when the incoming call is +1xxxxxxxxx from USA it register in asterisk and then after 1 sec it forward to voicemail and works fine

the problem is that my google voice seems to show the incoming call as +1 (xxx) xxx-xxxx so I want to put a rule that detect this incoming number format and send to voicemail too.

I use the number in USA with only whitelist number that i want to be reached. since there are a lot telemarketer dialing me a lot even when I register the line to not allow them.

thanks so much
qubo

User avatar
Aaron
Site Admin
Posts: 4563
Joined: Thu Jul 12, 2007 12:13 am

Re: How should be the REGEX to block or filter this numers

Post by Aaron » Sun Sep 25, 2011 10:58 am

Code: Select all

when /\+1 \(\d{3}\) \d{3}-\d{4}/ then sys.Dial( "inquss@local&1777249xxxx@in.callcentric.com[dt=1][fu=#{@cid}]" )

qubo
Posts: 127
Joined: Tue Apr 12, 2011 6:11 am

Re: How should be the REGEX to block or filter this numers

Post by qubo » Sun Sep 25, 2011 4:38 pm

thanks a lot Aaron this is much appreciated
thanks
qubo

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest