Skip to content

AVP_RADIUS module

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:

  • value = SIP_AVP_NAME SIP_AVP_VALUE
  • SIP_AVP_NAME = STRING_NAME | ’#‘ID_NUMBER
  • SIP_AVP_VALUE = ’:‘STRING_VALUE | ’#‘NUMBER_VALUE
'SIP-AVP' RADIUS AVP exmaples
....
"email:joe@yahoo.com"
-> STRING NAME AVP (email) with STRING VALUE (joe@yahoo.com)
"#14:joe@yahoo.com"
-> ID AVP (14) with STRING VALUE (joe@yahoo.com)
"age#28"
-> STRING NAME AVP (age) with INTEGER VALUE (28)
"#14#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.

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

  • none

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

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

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

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

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.

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

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.

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

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.

avp_load_radius() usage
...
avp_load_radius("callee");
...

Top contributors by DevScore(1), authored commits(2) and lines added/removed(3)

#NameDevScoreCommitsLines++Lines—
1.Bogdan-Andrei Iancu (@bogdan-iancu)2216288169
2.Daniel-Constantin Mierla (@miconda)16143942
3.Stefan Darius (@dariusstefan)6318527
4.Jan Janak (@janakj)513820
5.Andrei Pelinescu-Onciul4233
6.Juha Heinanen (@juha-h)4222
7.Razvan Crainea (@razvancrainea)3122
8.Konstantin Bokarius3125
9.Peter Nixon3122
10.Dan Pascu (@danpascu)3111

All remaining contributors: Edson Gellert Schubert.

(1) DevScore = author_commits + author_lines_added / (project_lines_added / project_commits) + author_lines_deleted / (project_lines_deleted / project_commits)

(2) including any documentation-related commits, excluding merge commits

(3) ignoring whitespace edits, renamed files and auto-generated files

#NameCommit Activity
1.Stefan Darius (@dariusstefan)Jun 2026 - Jul 2026
2.Razvan Crainea (@razvancrainea)Jun 2026 - Jun 2026
3.Bogdan-Andrei Iancu (@bogdan-iancu)Jun 2005 - Aug 2008
4.Daniel-Constantin Mierla (@miconda)Aug 2005 - Mar 2008
5.Konstantin BokariusMar 2008 - Mar 2008
6.Edson Gellert SchubertFeb 2008 - Feb 2008
7.Juha Heinanen (@juha-h)Sep 2007 - Dec 2007
8.Peter NixonJan 2007 - Jan 2007
9.Dan Pascu (@danpascu)Feb 2006 - Feb 2006
10.Andrei Pelinescu-OnciulDec 2004 - Dec 2004

All remaining contributors: Jan Janak (@janakj).

(1) including any documentation-related commits, excluding merge commits

Last edited by: Razvan Crainea (@razvancrainea), Bogdan-Andrei Iancu (@bogdan-iancu), Daniel-Constantin Mierla (@miconda), Konstantin Bokarius, Edson Gellert Schubert.

All documentation files (i.e. .md extension) are licensed under the Creative Common License 4.0