Brekeke SIP Server Wiki

RADIUS Authentication

From advanced edition Brekeke SIP Server v3.1.x, when “$radius.auth” is defined in dial plan rules, Brekeke SIP Server will get User Agent authentication information in the Authorization header from REGITER and INVITE requests and include them in an Authentication Access-Request RADIUS packet to a RADIUS server.

RADIUS server response packet will contain return-code, credit amount, credit time, and currency. These return values can be obtained by variables below.

Syntax:
$radius.auth
Returns:

true | false

Variables:
&auth.h323-return-code
&auth.h323-credit-time
&auth.h323-credit-amount
&auth.h323-currency
Example 

Ex1: Send RADIUS Authentication Access-Request

---------------------------------
[Matching Patterns]
$request = ^INVITE 
$radius.auth = (.+) 

[Deploy Patterns]
$continue = true
---------------------------------

Ex2: Get RADIUS balance information and set related SIP header

---------------------------------
[Matching Patterns]
$request = ^INVITE 
&auth.h323-credit-amount = (.+) 
&auth.h323-currency = (.+) 

[Deploy Patterns]
_Balance = %1%2
$continue = true
---------------------------------

Ex3: Get RADIUS talking time informaiton and set talking timeout
Brekeke SIP Server will disconnect call when timeout happens

---------------------------------
[Matching Patterns]
$request = ^INVITE 
&auth.h323-credit-time = (.+) 

[Deploy Patterns]
&net.sip.timeout.talking = %1
&net.sip.timeout.expand.talking = false
$continue = true
---------------------------------

Ex4: check if RADIUS authentication request is accepted 

---------------------------------
[Matching Patterns]
$request = ^INVITE 
&auth.result = true 
---------------------------------
Yes No
Suggest Edit