Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
Dial plan to block all IP's with the exception of a few ITSP
Author Message
colin2710
Brekeke Talented


Joined: 20 Nov 2007
Posts: 58
Location: Teddington UK

PostPosted: Fri Apr 18, 2008 3:21 pm    Post subject: Dial plan to block all IP's with the exception of a few ITSP Reply with quote

1. Brekeke Product Name and version: SIP Server for Brekeke PBX, Version 2.1.6.6

2. Java version: 1.5.0_14

3. OS type and the version: Windows 2000

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

5. Network pattern: http://www.brekeke-sip.com/bbs/network/pattern9.html

6. Your problem:

Can anyone help me to put a dial plan together:

I wish to block all IP's with the exception of a few inbound ITSP IP addresses. I have all the IP addresses and some are a complete "C" class i.e. - 111.111.111.0 to 111.111.111.255 - can anyone help with how to allow several different ranges and block everywhere else?

Regards - Colin
Back to top
View user's profile
janP
Brekeke Master Guru


Joined: 25 Nov 2007
Posts: 336

PostPosted: Mon Apr 21, 2008 10:02 am    Post subject: Reply with quote

Hi

$addr variable in the Matching Patterns indicates the remote IP address.
So you can write a DialPlan rule as the following for example.

Matching Patterns
$request = ^INVITE
$addr = !^111.111.111.

[DeployPattern:]
$action = 400
-------------------

With the above DialPlan rule, if the remote IP address is NOT in the range 111.111.111.0-111.111.111.255, the SIP server returns error response "400" to the client.

It means the SIP Server will accept a packet which came from the IP address range 111.111.111.0-111.111.111.255.
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