$addrType
Get the address type
Syntax:
$addrType( address ) $addrType( SIP-URI )
Returns:
4 – IPv4
6 – IPv6
Version Since:
3.1
Where the function can be used:
- Preliminary rules
- Regular rules
Example:
$addrtype($getUri(To)) = 6
If the To header’s SIP-URI indicates IPv6 address.
$addrtype($addr) = 4
If the incoming SIP packet’s remote IP address is IPv4 address.