Filtering – Teletronics Enterprise SIP Server User Manual
Page 12

TELETRONICS INTERNATIONAL, INC.
11
Enterprise SIP Server Tutorial – Dial Plan
s-tut-dp1.51-041228
3. Filtering
3.1. Filtering based on the Caller’s IP Address
The conditional variable $addr has the caller’s IP Address.
3.1.1.
Call from IP Address 192.168.0.1 is rejected
Matching Patterns
Deploy Patterns
$request=^INVITE
$addr=192\.168\.0\.1$
$action=603
¸
Depending on the value $action is set as, the relevant response code will be sent to the
caller. For more information refer to the “5. Error Exit” section in this document.
3.1.2.
Routing a call from an IP Address with the prefix 192.168. to sip:ivr@domain
Matching Patterns
Deploy Patterns
$request=^INVITE
$addr=192\.168\.
to=sip:ivr@domain
3.1.3.
Refusing a call from IP Address 192.168.0.1 - 192.168.0.5
Matching Patterns
Deploy Patterns
$request=^INVITE
$addr=192\.168\.0\.[12345]$
$action=603
3.1.4.
Accepting calls from only the IP Address 192.168.0.1
Matching Patterns
Deploy Patterns
$request=^INVITE
$addr=192\.168\.0\.1$
to=sip:(.+)[ >;]*
to=sip:%1
$request=^INVITE
$addr=.+
$action=603
¸
When adding the condition $outbound=true, specify the routing SIP server by “to=”. Then,
when the destination SIP-URI is outside of the network, Enterprise SIP Server forwards the
packets to the specified SIP server.
3.2. Filtering based on the Caller’s Port Number
The caller’s port number is included in conditional variable $port field.
3.2.1.
To refuse calls from Port Number 5061
Matching Patterns
Deploy Patterns
$request=^INVITE
$port=5061$
$action=603
3.2.2.
To treat calls from Port Number 5060 – 5069 as error 404 (not found)
Matching Patterns
Deploy Patterns