Chapter 1. Admin Guide

1.1. Overview

This module provides a Radius implementation for the AAA API from the core.

It also provides two functions to be used from the script for generating custom Radius acct and auth requests.
Detection and handling of SIP-AVPs from Radius replies is automatically and transparently done by the module.

Any module that wishes to use it has to do the following:

include aaa.h

make a bind call with a proper radius specific url

1.2. Dependencies

1.2.1. OpenSIPS Modules

None.

1.2.2. External Libraries or Applications

One of the following libraries must be installed before running
OpenSIPS with this module loaded:

1.4. Exported Functions

1.4.1.
radius_send_auth(input_set_name,output_set_name)

This function can be used from the script to make custom
radius authentication request. The function takes two parameters.

The first parameter represents the name of the set that contains
the list of attributes and pvars that will form the authentication
request (see the “sets” module parameter).

The second parameter represents the name of the set that contains
the list of attributes and pvars that will be extracted form the
authentication reply (see the “sets” module
parameter).

The sets must be defined using the “sets” exported
parameter.

The function return TRUE (retcode 1) if authentication was
successful, FALSE (retcode -1) if an error (any kind of error)
occured during authentication processes or FALSE (retcode -2) if
authentication was rejected or denied by RADIUS server.

This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE, ERROR_ROUTE and LOCAL_ROUTE.

1.4.2.
radius_send_acct(input_set_name)

This function can be used from the script to make custom
radius authentication request. The function takes only one parameter
that represents the name of the set that contains the list of attributes
and pvars that will form the accounting request.

Only one set is needed as a parameter because no AVPs can be extracted
from the accounting replies.

The set must be defined using the "sets" exported parameter.

This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, ONREPLY_ROUTE, BRANCH_ROUTE, ERROR_ROUTE and LOCAL_ROUTE.