Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Accepting Dialed DID's with at least 10 digits
Author Message
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Wed Oct 26, 2011 7:31 am    Post subject: Accepting Dialed DID's with at least 10 digits Reply with quote

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/networkpatterns.html :

6. Your problem:
We want to only accept calls that the dialed DID has [u]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
Back to top
View user's profile
Laurie
Brekeke Master Guru


Joined: 07 Jan 2008
Posts: 245

PostPosted: Wed Oct 26, 2011 10:30 am    Post subject: Reply with quote

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

It means "NOT more than 10 digits".
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Wed Oct 26, 2011 3:02 pm    Post subject: Reply with quote

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.
Back to top
View user's profile
Laurie
Brekeke Master Guru


Joined: 07 Jan 2008
Posts: 245

PostPosted: Wed Oct 26, 2011 5:49 pm    Post subject: Reply with quote

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
Back to top
View user's profile
noiptel
Brekeke Talented


Joined: 22 Feb 2010
Posts: 68
Location: USA

PostPosted: Thu Oct 27, 2011 8:20 am    Post subject: Reply with quote

Thank you!!!
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1