|
@@ -12,13 +12,13 @@
|
|
<!-- misc_radius Module User's Guide -->
|
|
<!-- misc_radius Module User's Guide -->
|
|
|
|
|
|
<chapter>
|
|
<chapter>
|
|
-
|
|
|
|
|
|
+
|
|
<title>&adminguide;</title>
|
|
<title>&adminguide;</title>
|
|
-
|
|
|
|
|
|
+
|
|
<section>
|
|
<section>
|
|
<title>Overview</title>
|
|
<title>Overview</title>
|
|
<para>
|
|
<para>
|
|
- The <emphasis>misc_radius</emphasis> module implements various
|
|
|
|
|
|
+ The <emphasis>misc_radius</emphasis> module implements various
|
|
RADIUS related functions.
|
|
RADIUS related functions.
|
|
Functions exist for loading caller's or callee's
|
|
Functions exist for loading caller's or callee's
|
|
attributes into AVPs, checking if user belongs to a group, and
|
|
attributes into AVPs, checking if user belongs to a group, and
|
|
@@ -59,7 +59,7 @@
|
|
<para>
|
|
<para>
|
|
Unlike in old avp_radius module, functions
|
|
Unlike in old avp_radius module, functions
|
|
radius_load_calle[re]_avps() do not prefix string names of AVPs
|
|
radius_load_calle[re]_avps() do not prefix string names of AVPs
|
|
- by string
|
|
|
|
|
|
+ by string
|
|
<quote>caller_</quote> or <quote>callee_</quote> depending if
|
|
<quote>caller_</quote> or <quote>callee_</quote> depending if
|
|
caller's or callee's attributes were loaded. If you need these
|
|
caller's or callee's attributes were loaded. If you need these
|
|
prefixes, make your RADIUS server to prepend them into attribute
|
|
prefixes, make your RADIUS server to prepend them into attribute
|
|
@@ -77,7 +77,7 @@
|
|
<section>
|
|
<section>
|
|
<title>&kamailio; Modules</title>
|
|
<title>&kamailio; Modules</title>
|
|
<para>
|
|
<para>
|
|
- The module depends on the following modules (in the other words
|
|
|
|
|
|
+ The module depends on the following modules (in the other words
|
|
the listed modules must be loaded before this module):
|
|
the listed modules must be loaded before this module):
|
|
<itemizedlist>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<listitem>
|
|
@@ -123,14 +123,14 @@
|
|
|
|
|
|
<section>
|
|
<section>
|
|
<title>Parameters</title>
|
|
<title>Parameters</title>
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.p.config">
|
|
<title><varname>radius_config</varname> (string)</title>
|
|
<title><varname>radius_config</varname> (string)</title>
|
|
<para>
|
|
<para>
|
|
- This is the location of the configuration file of radius client
|
|
|
|
|
|
+ This is the location of the configuration file of radius client
|
|
libraries.
|
|
libraries.
|
|
</para>
|
|
</para>
|
|
<para>
|
|
<para>
|
|
- Default value is
|
|
|
|
|
|
+ Default value is
|
|
<quote>/usr/local/etc/radiusclient-ng/radiusclient.conf</quote>.
|
|
<quote>/usr/local/etc/radiusclient-ng/radiusclient.conf</quote>.
|
|
</para>
|
|
</para>
|
|
<example>
|
|
<example>
|
|
@@ -138,10 +138,11 @@
|
|
<programlisting format="linespecific">
|
|
<programlisting format="linespecific">
|
|
...
|
|
...
|
|
modparam("misc_radius", "radius_config", "/etc/radiusclient.conf")
|
|
modparam("misc_radius", "radius_config", "/etc/radiusclient.conf")
|
|
|
|
+...
|
|
</programlisting>
|
|
</programlisting>
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.p.caller_srv_type">
|
|
<title><varname>caller_service_type</varname> (integer)</title>
|
|
<title><varname>caller_service_type</varname> (integer)</title>
|
|
<para>
|
|
<para>
|
|
This is the value of the Service-Type radius attribute to be
|
|
This is the value of the Service-Type radius attribute to be
|
|
@@ -156,10 +157,11 @@ modparam("misc_radius", "radius_config", "/etc/radiusclient.conf")
|
|
<programlisting format="linespecific">
|
|
<programlisting format="linespecific">
|
|
...
|
|
...
|
|
modparam("misc_radius", "caller_service_type", 18)
|
|
modparam("misc_radius", "caller_service_type", 18)
|
|
|
|
+...
|
|
</programlisting>
|
|
</programlisting>
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.p.callee_srv_type">
|
|
<title><varname>callee_service_type</varname> (integer)</title>
|
|
<title><varname>callee_service_type</varname> (integer)</title>
|
|
<para>
|
|
<para>
|
|
This is the value of the Service-Type radius attribute to be
|
|
This is the value of the Service-Type radius attribute to be
|
|
@@ -174,10 +176,11 @@ modparam("misc_radius", "caller_service_type", 18)
|
|
<programlisting format="linespecific">
|
|
<programlisting format="linespecific">
|
|
...
|
|
...
|
|
modparam("misc_radius", "callee_service_type", 19)
|
|
modparam("misc_radius", "callee_service_type", 19)
|
|
|
|
+...
|
|
</programlisting>
|
|
</programlisting>
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.p.group_srv_type">
|
|
<title><varname>group_service_type</varname> (integer)</title>
|
|
<title><varname>group_service_type</varname> (integer)</title>
|
|
<para>
|
|
<para>
|
|
This is the value of Service-Type RADIUS attribute to be
|
|
This is the value of Service-Type RADIUS attribute to be
|
|
@@ -192,10 +195,11 @@ modparam("misc_radius", "callee_service_type", 19)
|
|
<programlisting format="linespecific">
|
|
<programlisting format="linespecific">
|
|
...
|
|
...
|
|
modparam("misc_radius", "group_service_type", 20)
|
|
modparam("misc_radius", "group_service_type", 20)
|
|
|
|
+...
|
|
</programlisting>
|
|
</programlisting>
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.p.uri_srv_type">
|
|
<title><varname>uri_service_type</varname> (integer)</title>
|
|
<title><varname>uri_service_type</varname> (integer)</title>
|
|
<para>
|
|
<para>
|
|
This is the value of Service-Type RADIUS attribute to be
|
|
This is the value of Service-Type RADIUS attribute to be
|
|
@@ -211,15 +215,16 @@ modparam("misc_radius", "group_service_type", 20)
|
|
<programlisting format="linespecific">
|
|
<programlisting format="linespecific">
|
|
...
|
|
...
|
|
modparam("misc_radius", "uri_service_type", 21)
|
|
modparam("misc_radius", "uri_service_type", 21)
|
|
|
|
+...
|
|
</programlisting>
|
|
</programlisting>
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.p.caller_extra">
|
|
<title><varname>caller_extra</varname> (string)</title>
|
|
<title><varname>caller_extra</varname> (string)</title>
|
|
<para>
|
|
<para>
|
|
Semi-colon separated list of extra RADIUS
|
|
Semi-colon separated list of extra RADIUS
|
|
attribute name=pseudo variable pairs. When
|
|
attribute name=pseudo variable pairs. When
|
|
- radius_load_caller_avps() is called, the listed extra
|
|
|
|
|
|
+ radius_load_caller_avps() is called, the listed extra
|
|
attributes are included RADIUS request with
|
|
attributes are included RADIUS request with
|
|
current values of corresponding pseudo variables.
|
|
current values of corresponding pseudo variables.
|
|
</para>
|
|
</para>
|
|
@@ -232,15 +237,16 @@ modparam("misc_radius", "uri_service_type", 21)
|
|
<programlisting format="linespecific">
|
|
<programlisting format="linespecific">
|
|
...
|
|
...
|
|
modparam("misc_radius", "caller_extra", "Calling-Station-Id=$fu")
|
|
modparam("misc_radius", "caller_extra", "Calling-Station-Id=$fu")
|
|
|
|
+...
|
|
</programlisting>
|
|
</programlisting>
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.p.callee_extra">
|
|
<title><varname>callee_extra</varname> (string)</title>
|
|
<title><varname>callee_extra</varname> (string)</title>
|
|
<para>
|
|
<para>
|
|
Semi-colon separated list of extra RADIUS
|
|
Semi-colon separated list of extra RADIUS
|
|
attribute name=pseudo variable pairs. When
|
|
attribute name=pseudo variable pairs. When
|
|
- radius_load_callee_avps() is called, the listed extra
|
|
|
|
|
|
+ radius_load_callee_avps() is called, the listed extra
|
|
attributes are included RADIUS request with
|
|
attributes are included RADIUS request with
|
|
current values of corresponding pseudo variables.
|
|
current values of corresponding pseudo variables.
|
|
</para>
|
|
</para>
|
|
@@ -253,15 +259,16 @@ modparam("misc_radius", "caller_extra", "Calling-Station-Id=$fu")
|
|
<programlisting format="linespecific">
|
|
<programlisting format="linespecific">
|
|
...
|
|
...
|
|
modparam("misc_radius", "callee_extra", "SIP-URI-User=$rU;SIP-URI-Host=$rd")
|
|
modparam("misc_radius", "callee_extra", "SIP-URI-User=$rU;SIP-URI-Host=$rd")
|
|
|
|
+...
|
|
</programlisting>
|
|
</programlisting>
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.p.group_extra">
|
|
<title><varname>group_extra</varname> (string)</title>
|
|
<title><varname>group_extra</varname> (string)</title>
|
|
<para>
|
|
<para>
|
|
Semi-colon separated list of extra RADIUS
|
|
Semi-colon separated list of extra RADIUS
|
|
attribute name=pseudo variable pairs. When
|
|
attribute name=pseudo variable pairs. When
|
|
- radius_is_user_in() is called, the listed extra
|
|
|
|
|
|
+ radius_is_user_in() is called, the listed extra
|
|
attributes are included RADIUS request with
|
|
attributes are included RADIUS request with
|
|
current values of corresponding pseudo variables.
|
|
current values of corresponding pseudo variables.
|
|
</para>
|
|
</para>
|
|
@@ -274,16 +281,17 @@ modparam("misc_radius", "callee_extra", "SIP-URI-User=$rU;SIP-URI-Host=$rd")
|
|
<programlisting format="linespecific">
|
|
<programlisting format="linespecific">
|
|
...
|
|
...
|
|
modparam("misc_radius", "group_extra", "My-Special=$avp(i:100)")
|
|
modparam("misc_radius", "group_extra", "My-Special=$avp(i:100)")
|
|
|
|
+...
|
|
</programlisting>
|
|
</programlisting>
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.p.uri_extra">
|
|
<title><varname>uri_extra</varname> (string)</title>
|
|
<title><varname>uri_extra</varname> (string)</title>
|
|
<para>
|
|
<para>
|
|
Semi-colon separated list of extra RADIUS
|
|
Semi-colon separated list of extra RADIUS
|
|
attribute name=pseudo variable pairs. When
|
|
attribute name=pseudo variable pairs. When
|
|
radius_does_uri[_user]_exist() function is called, the
|
|
radius_does_uri[_user]_exist() function is called, the
|
|
- listed extra
|
|
|
|
|
|
+ listed extra
|
|
attributes are included in RADIUS request with
|
|
attributes are included in RADIUS request with
|
|
current values of corresponding pseudo variables.
|
|
current values of corresponding pseudo variables.
|
|
</para>
|
|
</para>
|
|
@@ -296,11 +304,12 @@ modparam("misc_radius", "group_extra", "My-Special=$avp(i:100)")
|
|
<programlisting format="linespecific">
|
|
<programlisting format="linespecific">
|
|
...
|
|
...
|
|
modparam("misc_radius", "uri_extra", "Called-Station-Id=$tu")
|
|
modparam("misc_radius", "uri_extra", "Called-Station-Id=$tu")
|
|
|
|
+...
|
|
</programlisting>
|
|
</programlisting>
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.p.use_sip_uri_host">
|
|
<title><varname>use_sip_uri_host</varname> (integer)</title>
|
|
<title><varname>use_sip_uri_host</varname> (integer)</title>
|
|
<para>
|
|
<para>
|
|
If zero, radius_does_uri_exist() function sends to
|
|
If zero, radius_does_uri_exist() function sends to
|
|
@@ -317,10 +326,11 @@ modparam("misc_radius", "uri_extra", "Called-Station-Id=$tu")
|
|
<programlisting format="linespecific">
|
|
<programlisting format="linespecific">
|
|
...
|
|
...
|
|
modparam("misc_radius", "use_sip_uri_host", 1)
|
|
modparam("misc_radius", "use_sip_uri_host", 1)
|
|
|
|
+...
|
|
</programlisting>
|
|
</programlisting>
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.p.common_response">
|
|
<title><varname>common_response</varname> (integer)</title>
|
|
<title><varname>common_response</varname> (integer)</title>
|
|
<para>
|
|
<para>
|
|
Set it to 1 if you need common radius response attributes to
|
|
Set it to 1 if you need common radius response attributes to
|
|
@@ -371,7 +381,7 @@ $avp(SIP-AVP) has string value "email:[email protected] session-tim
|
|
<section>
|
|
<section>
|
|
<title>Functions</title>
|
|
<title>Functions</title>
|
|
|
|
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.f.load_caller_avps">
|
|
<title><function
|
|
<title><function
|
|
moreinfo="none">radius_load_caller_avps(caller)</function></title>
|
|
moreinfo="none">radius_load_caller_avps(caller)</function></title>
|
|
<para>
|
|
<para>
|
|
@@ -395,7 +405,7 @@ radius_load_caller_avps("$au@$ar"); # take caller from Authorization
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.f.load_callee_avps">
|
|
<title><function
|
|
<title><function
|
|
moreinfo="none">radius_load_callee_avps(callee)</function></title>
|
|
moreinfo="none">radius_load_callee_avps(callee)</function></title>
|
|
<para>
|
|
<para>
|
|
@@ -417,7 +427,7 @@ radius_load_callee_avps("$rU@$rd"); # take callee from Request-URI
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.f.is_user_in">
|
|
<title><function
|
|
<title><function
|
|
moreinfo="none">radius_is_user_in(user, group)</function></title>
|
|
moreinfo="none">radius_is_user_in(user, group)</function></title>
|
|
<para>
|
|
<para>
|
|
@@ -443,13 +453,13 @@ radius_is_user_in("$au@$ar", "group_x");# take user from credentials
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.f.does_uri_exist">
|
|
<title><function
|
|
<title><function
|
|
- moreinfo="none">radius_does_uri_exist([uri])</function></title>
|
|
|
|
|
|
+ moreinfo="none">radius_does_uri_exist([uri])</function></title>
|
|
<para>
|
|
<para>
|
|
Checks from RADIUS if userpart@hostpart of Request-URI
|
|
Checks from RADIUS if userpart@hostpart of Request-URI
|
|
or of an URI stored in optional pseudo variable argument
|
|
or of an URI stored in optional pseudo variable argument
|
|
- belongs to a local
|
|
|
|
|
|
+ belongs to a local
|
|
user. In case of positive result, loads AVPs from
|
|
user. In case of positive result, loads AVPs from
|
|
SIP-AVP reply items, if any.
|
|
SIP-AVP reply items, if any.
|
|
</para>
|
|
</para>
|
|
@@ -469,7 +479,7 @@ if (radius_does_uri_exist("$avp(i:99)")) ... # check URI in $avp(i:99)
|
|
</example>
|
|
</example>
|
|
</section>
|
|
</section>
|
|
|
|
|
|
- <section>
|
|
|
|
|
|
+ <section id="mrad.f.does_uri_user_exist">
|
|
<title><function
|
|
<title><function
|
|
moreinfo="none">radius_does_uri_user_exist([user])</function></title>
|
|
moreinfo="none">radius_does_uri_user_exist([user])</function></title>
|
|
<para>
|
|
<para>
|