Forums Read-only archive

Accepting Dialed DID's with at least 10 digits

5 posts · Brekeke SIP Server Forum

noiptel Original post
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
To = ! sip:[0-9]{10,}@

It means "NOT more than 10 digits".
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
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
Thank you!!!