Brekeke SIP Server Wiki

RADIUS Preauthentication

When “$radius.preauth” is defined in DialPlan, Brekeke SIP Server will send a RADIUS Pre-Authentication Access-Request to a RADIUS server.
If RADIUS server supports Preauthentication, RADIUS server’s response packet will contain a return-code, credit amount, credit time, and currency. These return values can be obtained by variables below.

Syntax:
$radius.preauth
$radius.preauth( Username, Caller-ID, Called-ID, Password )
Returns:

true – if the preauthentication succeeded.
false – If the preauthentication failed

 

Variables:

These variables are set in $radius.preauth.

&preauth.result - the same value as the return value.
&preauth.h323-return-code - H323-return-code value (if exists)
&preauth.h323-credit-time - H323-credit-time value (if exists)
&preauth.h323-credit-amount - H323-credit-amount value (if exists)
&preauth.h323-currency - H323-currency value (if exists)

 

Example

Ex1: Send RADIUS Pre-Authentication Access-Request

———————————
[Matching Patterns]
$request = ^INVITE
$radius.preauth(“1000”, “1000”, “1001”, “password1000”) = (.+)

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

 

Ex2: Get RADIUS balance information and set related SIP header

---------------------------------
[Matching Patterns]
$request = ^INVITE
&preauth.h323-credit-amount = (.+)
&preauth.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
&preauth.h323-credit-time = (.+) 

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

 

Ex4: check if RADIUS pre-authentication request is accepted

---------------------------------
[Matching Patterns]
$request = ^INVITE
&preauth.result = true
---------------------------------

 

See Also:

$radius.preauth
RADIUS PreAuthentication Request: Attributes

Yes No
Suggest Edit