Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,227 @@
1
+ACC_RADIUS Module
2
+
3
+Juha Heinanen
4
+
5
+   <jh@tutpro.com>
6
+
7
+Daniel-Constantin Mierla
8
+
9
+   asipto.com
10
+   <miconda@gmail.com>
11
+
12
+Edited by
13
+
14
+Daniel-Constantin Mierla
15
+
16
+   asipto.com
17
+   <miconda@gmail.com>
18
+
19
+   Copyright © 2002, 2003 FhG FOKUS
20
+     __________________________________________________________________
21
+
22
+   Table of Contents
23
+
24
+   1. Admin Guide
25
+
26
+        1. Overview
27
+        2. Dependencies
28
+
29
+              2.1. Kamailio Modules
30
+              2.2. External Libraries or Applications
31
+
32
+        3. Parameters
33
+
34
+              3.1. radius_config (string)
35
+              3.2. radius_flag (integer)
36
+              3.3. radius_missed_flag (integer)
37
+              3.4. service_type (integer)
38
+              3.5. radius_extra (string)
39
+              3.6. rad_time_mode(integer)
40
+
41
+        4. Functions
42
+
43
+              4.1. acc_rad_request(comment)
44
+
45
+   List of Examples
46
+
47
+   1.1. radius_config example
48
+   1.2. radius_flag example
49
+   1.3. radius_missed_flag example
50
+   1.4. service_type example
51
+   1.5. radius_extra example
52
+   1.6. rad_time_mode example
53
+   1.7. acc_rad_request usage
54
+
55
+Chapter 1. Admin Guide
56
+
57
+   Table of Contents
58
+
59
+   1. Overview
60
+   2. Dependencies
61
+
62
+        2.1. Kamailio Modules
63
+        2.2. External Libraries or Applications
64
+
65
+   3. Parameters
66
+
67
+        3.1. radius_config (string)
68
+        3.2. radius_flag (integer)
69
+        3.3. radius_missed_flag (integer)
70
+        3.4. service_type (integer)
71
+        3.5. radius_extra (string)
72
+        3.6. rad_time_mode(integer)
73
+
74
+   4. Functions
75
+
76
+        4.1. acc_rad_request(comment)
77
+
78
+1. Overview
79
+
80
+   ACC_RADIUS module is used to account transaction information to RADIUS
81
+   server. It binds to ACC module API and uses the same accounting
82
+   mechanisms as for other backends.
83
+
84
+   Therefore you need this module just to send accounting data to a RADIUS
85
+   server - for more documentation regarding accounting, see the ACC
86
+   readme.
87
+
88
+2. Dependencies
89
+
90
+   2.1. Kamailio Modules
91
+   2.2. External Libraries or Applications
92
+
93
+2.1. Kamailio Modules
94
+
95
+   The module depends on the following modules (in the other words the
96
+   listed modules must be loaded before this module):
97
+     * acc - accounting module
98
+
99
+2.2. External Libraries or Applications
100
+
101
+   The following libraries or applications must be installed before
102
+   running Kamailio with this module loaded:
103
+     * radiusclient-ng 0.5.0 or higher, freeradius-client
104
+       https://github.com/FreeRADIUS/freeradius-client/ or radcli
105
+       http://radcli.github.io/radcli/.
106
+     * freeradius-client library can be used after setting FREERADIUS
107
+       variable in source code with 'export FREERADIUS=1' before compile.
108
+     * radcli library can be used after setting RADCLI variable in source
109
+       code with 'export RADCLI=1' before compile.
110
+
111
+3. Parameters
112
+
113
+   3.1. radius_config (string)
114
+   3.2. radius_flag (integer)
115
+   3.3. radius_missed_flag (integer)
116
+   3.4. service_type (integer)
117
+   3.5. radius_extra (string)
118
+   3.6. rad_time_mode(integer)
119
+
120
+3.1. radius_config (string)
121
+
122
+   This parameter is radius specific. Path to radius client configuration
123
+   file, set the referred config file correctly and specify there address
124
+   of server, shared secret (should equal that in
125
+   /usr/local/etc/raddb/clients for freeRadius servers) and dictionary,
126
+   see etc for an example of config file and dictionary.
127
+
128
+   If the parameter is set to empty string, the RADIUS accounting support
129
+   will be disabled (even if compiled).
130
+
131
+   Default value is “NULL”.
132
+
133
+   Example 1.1. radius_config example
134
+...
135
+modparam("acc_radius", "radius_config", "/etc/radiusclient/radiusclient.conf")
136
+...
137
+
138
+3.2. radius_flag (integer)
139
+
140
+   Request flag which needs to be set to account a transaction -- RADIUS
141
+   specific.
142
+
143
+   Default value is not-set (no flag).
144
+
145
+   Example 1.2. radius_flag example
146
+...
147
+modparam("acc_radius", "radius_flag", 2)
148
+...
149
+
150
+3.3. radius_missed_flag (integer)
151
+
152
+   Request flag which needs to be set to account missed calls -- RADIUS
153
+   specific.
154
+
155
+   Default value is not-set (no flag).
156
+
157
+   Example 1.3. radius_missed_flag example
158
+...
159
+modparam("acc_radius", "radius_missed_flag", 3)
160
+...
161
+
162
+3.4. service_type (integer)
163
+
164
+   Radius service type used for accounting.
165
+
166
+   Default value is 15 (SIP).
167
+
168
+   Example 1.4. service_type example
169
+...
170
+modparam("acc_radius", "service_type", 16)
171
+...
172
+
173
+3.5. radius_extra (string)
174
+
175
+   Extra values to be logged via RADIUS - RADIUS specific.
176
+
177
+   Default value is NULL.
178
+
179
+   Example 1.5. radius_extra example
180
+...
181
+modparam("acc_radius", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
182
+...
183
+
184
+3.6. rad_time_mode(integer)
185
+
186
+   Radius Event-Timestamp for accounting.
187
+
188
+   Values can be:
189
+     * 0 - (default), format is only unix timestamp for Event-Timestamp
190
+       (For example: 1445590624)
191
+     * 1 - format is unix timestamp with microseconds in Addition, it
192
+       needs to change Event-Timestamp attribute type in dictionary to
193
+       string both radius server and client (For example:
194
+       1445590624.377372)
195
+
196
+   Default value is 0 (Unix timestamp).
197
+
198
+   Example 1.6. rad_time_mode example
199
+...
200
+modparam("acc_radius", "rad_time_mode", 1)
201
+...
202
+
203
+4. Functions
204
+
205
+   4.1. acc_rad_request(comment)
206
+
207
+4.1.  acc_rad_request(comment)
208
+
209
+   Like acc_log_request of acc module, acc_rad_request reports on a SIP
210
+   request event. It reports to radius server as configured in
211
+   “radius_config”.
212
+
213
+   Meaning of the parameters is as follows:
214
+     * comment - Comment to be appended. The first token can be a SIP
215
+       response code that it is wanted to be interpreted as event type
216
+       (e.g., using 200 means the transaction is considered successfully
217
+       responded).
218
+
219
+   This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
220
+
221
+   Example 1.7. acc_rad_request usage
222
+...
223
+acc_rad_request("Some comment");
224
+...
225
+# write record as when the transaction was responded with a 200 code
226
+acc_rad_request("200 From Config");
227
+...