$addr to specify range of ip addresses

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
mbylica
Posts: 41
Joined: Mon May 16, 2011 1:05 pm
Location: Poland

$addr to specify range of ip addresses

Post by mbylica »

1. Brekeke Product Name and version:
BSS, 2.4.8.6, 3.1.7.8

2. Java version:
1.6.0_25, 1.6.0_45

3. OS type and the version:
linux centos 5.5

4. UA (phone), gateway or other hardware/software involved:
doesn't matter

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

6. Your problem:
I cannot use $addr function to specify range of ip addresses.
Here is a snippet from BSS Admin guide for v3 and v2:
"$addr = ^172\.16\.0\.[1-5]$
If the source IP address is in the range 172.16.0.1-172.16.0.5"

What i am trying to do is to provide dialplan rule with following statement:
$addr = ^172\.16\.0\.[193-206]$
$addr = ^92\.222\.76\.[193-206]$

but as a result i am heaving nothing (no data).
This problem is valid on v.3 and v.2 of BSS.

Do you have similiar problems?

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

Post by Laurie »

Remember the syntax is based on Regular expression.

$addr = ^172\.16\.0\.[1-5]$
matches
172.16.0.1
172.16.0.2
:
172.16.0.5
because [1-5] means 1 or 2 or 3 or 4 or 5.


For $addr = ^172\.16\.0\.[193-206]$
[193-206] will mean 1 or 9 or 3 or 2 or 0 or 6.


If you want to catch 172.16.0.193-172.16.0.206, try the definition below.
$addr = ^172\.16\.0\.19[3-9]$|^172\.16\.0\.20[0-6]$
mbylica
Posts: 41
Joined: Mon May 16, 2011 1:05 pm
Location: Poland

Post by mbylica »

Thanks a lot it works
Post Reply