Brekeke SIP Server Wiki

$addrRange

Check whether the address is in the range

 

Syntax:
$addrRange( IP1, IP2 )
$addrRange( IP1, IP2, IPcheck  )

 

Parameters:

IP1 – the beginning of the address range.
IP2 – the ending of the address range.
IPcheck – the IP address which should be checked. If the IPcheck is omitted, the source IP address of SIP packet is used.

 

Returns:

true – if the address IPcheck is in the range
false – otherwise

 

Version Since:

3.2

 

Where the function can be used:
  • Preliminary rules
  • Regular rules

 

Example:
$addrRange("192.168.1.1","192.168.3.255") = true

Check if the SIP packet’s sender IP address is in the range 192.168.1.1 – 192.168.3.255.
It is same as the following definition.

$addrRange("192.168.1.1","192.168.3.255",$addr) = true

 

See Also:

$addr
$addrPort
$addrPrefix

Yes No
Suggest Edit