Brekeke SIP Server Wiki

$addrPrefix

Check whether the address matches the prefix (IPv4 Only)

 

Syntax:
$addrPrefix( Prefix )
$addrPrefix( Prefix, IPcheck  )

 

Parameters:

Prefix – the network prefix (e.g:172.16.0.0/12 )
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.4.2.1

 

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

 

Example:
$addrPrefix("10.0.0.0/8") = true

Check if the SIP packet’s sender IP address is in the prefix 10.0.0.0/8.

It is same as the following definition.

$addrPrefix("10.0.0.0/8",$addr) = true

 

See Also:

$addr
$addrPort
$addrRange

Yes No
Suggest Edit