avp_radius Module

Juha Heinanen

Edited by

Daniel-Constantin Mierla

Revision History
Revision $Revision: 3898 $$Date: 2008-03-08 00:03:56 +0100 (Sat, 08 Mar 2008) $

Table of Contents

1. Admin Guide
1.1. Overview
1.2. Dependencies
1.2.1. Kamailio Modules
1.2.2. External Libraries or Applications
1.3. Exported Parameters
1.3.1. radius_config (string)
1.3.2. caller_service_type (integer)
1.3.3. callee_service_type (integer)
1.4. Exported Functions
1.4.1. avp_load_radius(user)

List of Examples

1.1. SIP-AVP” RADIUS AVP exmaples
1.2. radius_config parameter usage
1.3. caller_service_type parameter usage
1.4. callee_service_type parameter usage
1.5. avp_load_radius() usage

Chapter 1. Admin Guide

1.1. Overview

avp_radius module allows loading of user's attributes into AVPs from Radius. User's name and domain can be based on From URI, Request URI, or authenticated credentials.

The module assumes that Radius returns the AVPs as values of reply attribute SIP-AVP. Its value must be a string of form:




Example 1.1. “SIP-AVP” RADIUS AVP exmaples

    -> STRING NAME AVP (email) with STRING VALUE (joe@yahoo.com)
    -> ID AVP (14) with STRING VALUE (joe@yahoo.com)
    -> STRING NAME AVP (age) with INTEGER VALUE (28)
    -> ID AVP (14) with INTEGER VALUE (28)

For AVP with STRING NAME, the module prefixes each attribute name as returned from Radius by string “caller_” or “callee_” depending if caller's or callee's attributes are loaded.

1.2. Dependencies

1.2.1. Kamailio Modules

The module depends on the following modules (in the other words the listed modules must be loaded before this module):

  • none

1.2.2. External Libraries or Applications

The following libraries or applications must be installed before compilling Kamailio with this module loaded:

1.3. Exported Parameters

1.3.1. radius_config (string)

This is the location of the configuration file of radius client libraries.

Default value is “/usr/local/etc/radiusclient-ng/radiusclient.conf”.

Example 1.2. radius_config parameter usage

modparam("avp_radius", "radius_config", "/etc/radiusclient.conf")

1.3.2. caller_service_type (integer)

This is the value of the Service-Type radius attribute to be used, when caller's attributes are loaded.

Default value is dictionary value of “SIP-Caller-AVPs” Service-Type.

Example 1.3. caller_service_type parameter usage

modparam("avp_radius", "caller_service_type", 18)

1.3.3. callee_service_type (integer)

This is the value of the Service-Type radius attribute to be used, when callee's attributes are loaded.

Default value is dictionary value of “SIP-Callee-AVPs” Service-Type.

Example 1.4. callee_service_type parameter usage

modparam("avp_radius", "callee_service_type", 19)

1.4. Exported Functions

1.4.1. avp_load_radius(user)

The functions loads user's attributes from radius and stores them into AVPs. Parameter “user” is used to indicate, whose attributes are loaded. Possible values are:

  • caller - attributes belong to the user of the From URI are loaded

  • callee - attributes belong to the user of the Request URI are loaded

  • digest - attributes belong to the authenticated user are loaded

AVP name returned from Radius is prefixed by string “caller_”, if avp_load_radius parameter is “caller” or “digest”, and by “callee_”, if parameter is “callee”.

This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.

Example 1.5. avp_load_radius() usage