Brekeke SIP Server Wiki

4. Authentication

It is possible to enable authentication only for the specified requests using Dial Plan. Even when authentication is enabled in the System’s setting (at the [Configuration] page), it is possible to disable the authentication only for a specified request. The handling variable $auth will be used for this purpose. If its value is true, the authentication will be enabled. If it is false, authentication will be disabled.

 

If authentication is enabled, Brekeke SIP Server will send the message “407 Proxy Authentication Required (or 401 Unauthorized)” to the request sender and make the sender resend a request with authentication information.

If the request does not include the valid authentication information, Brekeke SIP Server will not authorize the request.

 

Ex 1. Requiring Authentication if the callee’s domain name is “host.domain”
Matching Patterns Deploy Patterns
$request = ^INVITE
$geturi( To ) = @host.domain
$auth = true

 

Ex 2. Not Requiring Authentication if the callee’s name prefix is “800”
Matching Patterns Deploy Patterns
$request = ^INVITE
To = sip:800.+@
$auth = false

 

Ex 3. Requiring Authentication if the caller isn’t registered
Matching Patterns Deploy Patterns
$request = ^INVITE
$registered( From ) = false
$auth = true

 

Ex 4. Requiring Authentication if the call is from an IP address with the prefix “192.168.10”
Matching Patterns Deploy Patterns
$request = ^INVITE
$addr = 192\.168\.\10
$auth = true

 

Ex 5. Not Requiring Authentication from 10:00AM to 5:59PM
Matching Patterns Deploy Patterns
$request = ^INVITE
$time =^1[0-7]:
$auth = false

 

 

Yes No
Suggest Edit