Brekeke SIP Server Wiki

$localhost

Check whether the address is localhost
If no parameter is specified, it checks if the source IP address of the SIP packet is localhost or not.

Note: The addresses set in network interface settings in [Configuration] page will also be
treated as “localhost”.

Syntax:
$localhost
$localhost( SIP-URI )
$localhost( FQDN )
Returns:

true – if it is one of local interface address of the SIP server.
false – otherwise

 

Version Since:

1.0

 

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

 

Examples:
$localhost = true

If the source of the SIP packet is localhost

$localhost(From) = false

If the SIP URI in the From header is not localhost

$localhost(“hostname”) = true

If the IP address of “hostname” indicates one of local interface address of the SIP server.

 

See Also:

$addr
$globalAddr

Yes No
Suggest Edit