Accepting Dialed DID's with at least 10 digits

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
noiptel
Posts: 68
Joined: Mon Feb 22, 2010 9:24 pm
Location: USA

Accepting Dialed DID's with at least 10 digits

Post by noiptel »

1. Brekeke Product Name and version:

2. Java version:

3. OS type and the version:Advance

4. UA (phone), gateway or other hardware/software involved:

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :

6. Your problem:
We want to only accept calls that the dialed DID has at least 10 digits. Another words, dialed DID's with 10 or more digits are welcomed

Is this correct?

$geturi(to)=sip:(.{<10})@(.+)

$action=503

Thanks
Laurie
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

To = ! sip:[0-9]{10,}@

It means "NOT more than 10 digits".
noiptel
Posts: 68
Joined: Mon Feb 22, 2010 9:24 pm
Location: USA

Post by noiptel »

Thank you.

How about if the (To) DID starts with XXXXX52 and we want to limit to 11 or more digits after the 52?

That is:

xxxxx52xxxxxxxxxxx

-The first 5 numbers is the Tech Prefix.
-52 is the Country code
-The 11 digts after the 52 is the phone number dialed

We want to reject calls that do not have an 11 digit DID.

Thanking you in advance.
Laurie
Posts: 245
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

It will be
sip:[0-9]{5,5}52[0-9]{11,}

It is time to start learning about Regular expression :)
http://en.wikipedia.org/wiki/Regular_expression
noiptel
Posts: 68
Joined: Mon Feb 22, 2010 9:24 pm
Location: USA

Post by noiptel »

Thank you!!!
Post Reply