-
Notifications
You must be signed in to change notification settings - Fork 909
/
README
379 lines (275 loc) · 10.4 KB
/
README
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
The IMS QoS Module
Dragos Vingarzan
FhG Fokus
<Dragos.Vingarzan@fokus.fraunhofer.de>
Jason Penton
Smile Communications
<jason.penton@smilecoms.com>
Richard Good
Smile Communications
<richard.good@smilecoms.com>
Carsten Bock
ng-voice GmbH
<carsten@ng-voice.com>
Copyright © 2007 FhG FOKUS
Copyright © 2012 Smile Communications
Copyright © 2015 ng-voice GmbH
__________________________________________________________________
Table of Contents
1. Admin Guide
1. Overview
2. Dependencies
2.1. Kamailio Modules
2.2. External Libraries or Applications
3. Parameters
3.1. rx_dest_realm (string)
3.2. rx_forced_peer (string)
3.3. rx_auth_expiry (integer)
3.4. cdp_event_latency (integer)
3.5. cdp_event_threshold (integer)
3.6. cdp_event_latency_log (integer)
3.7. authorize_video_flow (integer)
3.8. cdp_event_list_size_threshold (integer)
3.9. audio_default_bandwidth (integer)
3.10. video_default_bandwidth (integer)
4. Functions
4.1. Rx_AAR_Register(route_block, domain)
4.2. Rx_AAR(route_block, direction, subscription_id,
subscription_id_type)
5. Statistics
5.1. AAR Timeouts (aar_timeouts)
5.2. Average AAR Response Time (aar_avg_response_time)
List of Examples
1.1. rx_dest_realm parameter usage
1.2. rx_forced_peer parameter usage
1.3. rx_auth_expiry parameter usage
1.4. cdp_event_latency parameter usage
1.5. cdp_event_threshold parameter usage
1.6. cdp_event_latency_log parameter usage
1.7. authorize_video_flow parameter usage
1.8. cdp_event_list_size_threshold parameter usage
1.9. audio_default_bandwidth parameter usage
1.10. video_default_bandwidth parameter usage
1.11. Rx_AAR_Register
1.12. Rx_AAR
Chapter 1. Admin Guide
Table of Contents
1. Overview
2. Dependencies
2.1. Kamailio Modules
2.2. External Libraries or Applications
3. Parameters
3.1. rx_dest_realm (string)
3.2. rx_forced_peer (string)
3.3. rx_auth_expiry (integer)
3.4. cdp_event_latency (integer)
3.5. cdp_event_threshold (integer)
3.6. cdp_event_latency_log (integer)
3.7. authorize_video_flow (integer)
3.8. cdp_event_list_size_threshold (integer)
3.9. audio_default_bandwidth (integer)
3.10. video_default_bandwidth (integer)
4. Functions
4.1. Rx_AAR_Register(route_block, domain)
4.2. Rx_AAR(route_block, direction, subscription_id,
subscription_id_type)
5. Statistics
5.1. AAR Timeouts (aar_timeouts)
5.2. Average AAR Response Time (aar_avg_response_time)
1. Overview
This module contains all method related to the IMS policy and charging
control functions performed by an Application Function (e.g. P-CSCF)
over the Rx interface. This module is dependent on the CDP (C Diameter
Peer) modules for communicating with PCRF as specified in 3GPP
specification TS 29.214.
2. Dependencies
2.1. Kamailio Modules
2.2. External Libraries or Applications
2.1. Kamailio Modules
The Following mouldes must be loaded before this module:
* Dialog2
* Usrloc PCSCF
* TM - Transaction Manager
* CDP - C Diameter Peer
* CDP_AVP - CDP AVP Applications
2.2. External Libraries or Applications
This modules requires the internal IMS library.
3. Parameters
3.1. rx_dest_realm (string)
3.2. rx_forced_peer (string)
3.3. rx_auth_expiry (integer)
3.4. cdp_event_latency (integer)
3.5. cdp_event_threshold (integer)
3.6. cdp_event_latency_log (integer)
3.7. authorize_video_flow (integer)
3.8. cdp_event_list_size_threshold (integer)
3.9. audio_default_bandwidth (integer)
3.10. video_default_bandwidth (integer)
3.1. rx_dest_realm (string)
This is the name of the Diameter realm of the Diameter server
(typically a PCRF).
Default value is 'ims.smilecoms.com'.
Example 1.1. rx_dest_realm parameter usage
...
modparam("ims_qos", "rx_dest_realm", "ims.smilecoms.com")
...
3.2. rx_forced_peer (string)
FQDN of the Diameter server (typically a PCRF) to communicate with. If
not set then realm routing is used. If you use this, the routing
defined in your diameter xml configuration file (CDP) will be ignored
and as a result you will lose the benefits of load balancing and
failover.
Default value is ''.
Example 1.2. rx_forced_peer parameter usage
...
modparam("ims_qos", "rx_forced_peer", "pcrf.ims.smilecoms.com")
...
3.3. rx_auth_expiry (integer)
This is the expiry length in seconds of the initiated Diameter
sessions.
Default value is 7200.
Example 1.3. rx_auth_expiry parameter usage
...
modparam("ims_qos", "rx_auth_expiry", 14400)
...
3.4. cdp_event_latency (integer)
This is a flag to determine whether or slow CDP responses should be
reported in the log file. 1 is enabled and 0 is disabled.
Default value is 1.
Example 1.4. cdp_event_latency parameter usage
...
modparam("ims_qos", "cdp_event_latency", 1)
...
3.5. cdp_event_threshold (integer)
This time in milliseconds is the limit we should report a CDP response
as slow. i.e. if a CDP response exceeds this limit it will be reported
in the log file. This is only relevant is cdp_event_latency is enabled
(set to 0).
Default value is 500.
Example 1.5. cdp_event_threshold parameter usage
...
modparam("ims_qos", "cdp_event_threshold", 500)
...
3.6. cdp_event_latency_log (integer)
This time log level at which we should report slow CDP responses. 0 is
ERROR, 1 is WARN, 2 is INFO and 3 is DEBUG. This is only relevant is
cdp_event_latency is enabled (set to 0)
Default value is 0.
Example 1.6. cdp_event_latency_log parameter usage
...
modparam("ims_qos", "cdp_event_latency_log", 1)
...
3.7. authorize_video_flow (integer)
This is a flag that specifies whether or not to authorize video flows.
1 means video flows will be authorized over Rx and 0 means video flows
will not be authorized over Rx
Default value is 1.
Example 1.7. authorize_video_flow parameter usage
...
modparam("ims_qos", "authorize_video_flow", 0)
...
3.8. cdp_event_list_size_threshold (integer)
This is a threshold on the size of the cdp event list. Once the queue
exceeds this length a warning is logged. 0 disables this feature
Default value is 0.
Example 1.8. cdp_event_list_size_threshold parameter usage
...
modparam("ims_qos", "cdp_event_list_size_threshold", 10)
...
3.9. audio_default_bandwidth (integer)
This parameters defines the default bandwidth for Audio, if no
"b=AS"-Parameter is found in the SDP.
Default value is 64 (64 kBit)
Example 1.9. audio_default_bandwidth parameter usage
...
modparam("ims_qos", "audio_default_bandwidth", 32)
...
3.10. video_default_bandwidth (integer)
This parameters defines the default bandwidth for Video, if no
"b=AS"-Parameter is found in the SDP.
Default value is 128 (128 kBit)
Example 1.10. video_default_bandwidth parameter usage
...
modparam("ims_qos", "video_default_bandwidth", 256)
...
4. Functions
4.1. Rx_AAR_Register(route_block, domain)
4.2. Rx_AAR(route_block, direction, subscription_id,
subscription_id_type)
4.1. Rx_AAR_Register(route_block, domain)
Perform a AAR on Diameter RX interface to subscribe to signalling
status. This purpose of this is tell a Diameter server (typically a
PCRF) to inform the requesting Diameter client on changes to the status
of signalling bearer for the same framed IP address. For more details
see 3GGP TS 29.214.
Meaning of the parameters is as follows:
* Route block to resume after async UAR Diameter reply.
* domain that usrloc_pcscf uses to store user information.
Return codes:
* -1 - error: There was an error, so we must either ignore it (no
subscription) or send 403 (depends on behaviour you want)
0 - Success: AAR-Request sent, reply is processed asynchronously.
1 - Success: No need to send AAR-Request, as a subscription still
exists (continue as normal)
This function can be used from REQUEST_ROUTE.
p.s. this is executed asynchronously. See example on how to retrieve
return value
Example 1.11. Rx_AAR_Register
...
if(Rx_AAR_Register("REG_AAR_REPLY","location")==0){
exit;
}
...
route[REG_AAR_REPLY]
{
switch ($avp(s:aar_return_code)) {
case 1:
xlog("L_DBG", "Diameter: AAR success on subscription to signalling\n
");
break;
default:
xlog("L_ERR", "Diameter: AAR failed on subscription to signalling\n"
);
t_reply("403", "Can't register to QoS for signalling");
exit;
}
...
4.2. Rx_AAR(route_block, direction, subscription_id, subscription_id_type)
Perform a AAR on Diameter RX interface to request resource
authorisation from a Diameter server (typically a PCRF). For more
details see 3GGP TS 29.214.
Meaning of the parameters is as follows:
* Route block to resume after async UAR Diameter reply.
* direction of this message - orig, term, etc.
* subscription_id to hard code subscription ID for AAR. Used for some
broken PCRFs. Leave blank to use default
* subscription_id_type to hard code subscription ID type for AAR.
Only applicable if subscription_id is set. Set to -1 to use
default. This is as per RFC 4006: END_USER_E164 0, END_USER_IMSI 1,
END_USER_SIP_URI 2, END_USER_NAI 3, END_USER_PRIVATE 4
This function can be used from REQUEST_ROUTE or ONREPLY_ROUTE.
p.s. this is executed asynchronously. See example on how to retrieve
return value
Example 1.12. Rx_AAR
...
if(Rx_AAR("ORIG_SESSION_AAR_REPLY","orig","",-1)==0){
exit;
}
...
route[ORIGN_SESSION_AAR_REPLY]
{
if ($avp(s:aar_return_code) != 1) {
xlog("L_ERR", "IMS: AAR failed Orig\n");
dlg_terminate("all", "Sorry no QoS available");
} else {
xlog("L_DBG", "Diameter: Orig AAR success on media authorization\n");
}
}
...
5. Statistics
5.1. AAR Timeouts (aar_timeouts)
5.2. Average AAR Response Time (aar_avg_response_time)
5.1. AAR Timeouts (aar_timeouts)
The number of timeouts on sending a AAR. i.e. no response to AAR.
5.2. Average AAR Response Time (aar_avg_response_time)
The average response time in milliseconds for AAR-AAA transaction.