Author |
Message |
mbylica Brekeke Addict
Joined: 16 May 2011 Posts: 41
Location: Poland
|
Posted: Thu Jun 20, 2013 7:43 am Post subject: $addr to specify range of ip addresses |
|
|
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/networkpatterns.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. |
|
Back to top |
|
Laurie Brekeke Master Guru
Joined: 07 Jan 2008 Posts: 245
|
Posted: Thu Jun 20, 2013 4:26 pm Post subject: |
|
|
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]$ |
|
Back to top |
|
mbylica Brekeke Addict
Joined: 16 May 2011 Posts: 41
Location: Poland
|
Posted: Fri Jul 12, 2013 8:03 am Post subject: |
|
|
Thanks a lot it works |
|
Back to top |
|
|