/
acc_radius_admin.xml
240 lines (229 loc) · 6.15 KB
/
acc_radius_admin.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<?xml version="1.0" encoding='ISO-8859-1'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;
]>
<!-- Acc Module User's Guide -->
<chapter>
<title>&adminguide;</title>
<section>
<title>Overview</title>
<para>
ACC_RADIUS module is used to account transaction information to
<acronym>RADIUS</acronym> server. It binds to ACC module API and uses the
same accounting mechanisms as for other backends.
</para>
<para>
Therefore you need this module just to send accounting data to a
RADIUS server - for more documentation regarding accounting, see the ACC
readme.
</para>
</section>
<section>
<title>Dependencies</title>
<section>
<title>&kamailio; Modules</title>
<para>
The module depends on the following modules (in the other words
the listed modules must be loaded before this module):
<itemizedlist>
<listitem>
<para><emphasis>acc</emphasis> - accounting module</para>
</listitem>
</itemizedlist>
</para>
</section>
<section>
<title>External Libraries or Applications</title>
<para>
The following libraries or applications must be installed
before running &kamailio; with this module loaded:
</para>
<itemizedlist>
<listitem>
<para><emphasis>radiusclient-ng</emphasis> 0.5.0 or freeradius-client
or higher.
See <ulink
url='https://github.com/FreeRADIUS/freeradius-client/'>
https://github.com/FreeRADIUS/freeradius-client/</ulink>.
</para>
</listitem>
<listitem>
<para>
<emphasis>freeradius-client</emphasis> library can be used after
setting FREERADIUS variable in source code with
<emphasis>'export FREERADIUS=1'</emphasis> before compile.
</para>
</listitem>
</itemizedlist>
</section>
</section>
<section id="ACC-param-id">
<title>Parameters</title>
<section>
<title><varname>radius_config</varname> (string)</title>
<para>
<emphasis>This parameter is radius specific.</emphasis> Path to
radius client configuration file, set the referred config file
correctly and specify there address of server, shared secret
(should equal that in /usr/local/etc/raddb/clients for
freeRadius servers) and dictionary, see etc for an example of
config file and dictionary.
</para>
<para>
If the parameter is set to empty string, the RADIUS accounting support
will be disabled (even if compiled).
</para>
<para>
Default value is <quote>NULL</quote>.
</para>
<example>
<title>radius_config example</title>
<programlisting format="linespecific">
...
modparam("acc_radius", "radius_config", "/etc/radiusclient/radiusclient.conf")
...
</programlisting>
</example>
</section>
<section>
<title><varname>radius_flag</varname> (integer)</title>
<para>
Request flag which needs to be set to account a
transaction -- RADIUS specific.
</para>
<para>
Default value is not-set (no flag).
</para>
<example>
<title>radius_flag example</title>
<programlisting format="linespecific">
...
modparam("acc_radius", "radius_flag", 2)
...
</programlisting>
</example>
</section>
<section>
<title><varname>radius_missed_flag</varname> (integer)</title>
<para>
Request flag which needs to be set to account missed
calls -- RADIUS specific.
</para>
<para>
Default value is not-set (no flag).
</para>
<example>
<title>radius_missed_flag example</title>
<programlisting format="linespecific">
...
modparam("acc_radius", "radius_missed_flag", 3)
...
</programlisting>
</example>
</section>
<section>
<title><varname>service_type</varname> (integer)</title>
<para>
Radius service type used for accounting.
</para>
<para>
Default value is 15 (SIP).
</para>
<example>
<title>service_type example</title>
<programlisting format="linespecific">
...
modparam("acc_radius", "service_type", 16)
...
</programlisting>
</example>
</section>
<section>
<title><varname>radius_extra</varname> (string)</title>
<para>
Extra values to be logged via RADIUS - RADIUS specific.
</para>
<para>
Default value is NULL.
</para>
<example>
<title>radius_extra example</title>
<programlisting format="linespecific">
...
modparam("acc_radius", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
...
</programlisting>
</example>
</section>
<section>
<title><varname>rad_time_mode</varname>(integer)</title>
<para>
Radius Event-Timestamp for accounting.
</para>
<para>
Values can be:
</para>
<itemizedlist>
<listitem>
<para><emphasis>0</emphasis> - (default), format is only unix
timestamp for Event-Timestamp (For example: 1445590624)</para>
</listitem>
<listitem>
<para><emphasis>1</emphasis> - format is unix timestamp with microseconds
in Addition, it needs to change Event-Timestamp attribute type in dictionary to string
both radius server and client
(For example: 1445590624.377372) </para>
</listitem>
</itemizedlist>
<para>
Default value is 0 (Unix timestamp).
</para>
<example>
<title>rad_time_mode example</title>
<programlisting format="linespecific">
...
modparam("acc_radius", "rad_time_mode", 1)
...
</programlisting>
</example>
</section>
</section>
<section>
<title>Functions</title>
<section>
<title>
<function moreinfo="none">acc_rad_request(comment)</function>
</title>
<para>
Like <function moreinfo="none">acc_log_request</function> of acc module,
<function moreinfo="none">acc_rad_request</function> reports on
a SIP request event. It reports to radius server as configured in
<quote>radius_config</quote>.
</para>
<para>
Meaning of the parameters is as follows:</para>
<itemizedlist>
<listitem>
<para><emphasis>comment</emphasis> - Comment to be appended.
</para>
</listitem>
</itemizedlist>
<para>
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
</para>
<example>
<title>acc_rad_request usage</title>
<programlisting format="linespecific">
...
acc_rad_request("Some comment");
...
acc_rad_request("200 From Config");
...
</programlisting>
</example>
</section>
</section>
</chapter>