Debian Codegraph @

src/modules/ims_icscf/README

raw
1 IMS ICSCF Module
2
3 Dragos Vingarzan
4
5 FhG Fokus
6 <[email protected]>
7
8 Jason Penton
9
10 Smile Communications
11 <[email protected]>
12
13 Richard Good
14
15 Smile Communications
16 <[email protected]>
17
18 Copyright © 2007 FhG FOKUS
19
20 Copyright © 2012 Smile Communications
21 __________________________________________________________________
22
23 Table of Contents
24
25 1. Admin Guide
26
27 1. Overview
28 2. Dependencies
29
30 2.1. Kamailio Modules
31 2.2. External Libraries or Applications
32
33 3. Parameters
34
35 3.1. route_lir_user_unknown (string)
36 3.2. route_uar_user_unknown (string)
37 3.3. scscf_entry_expiry (integer)
38 3.4. db_url (string)
39 3.5. db_nds_table (string)
40 3.6. db_scscf_table (string)
41 3.7. db_capabilities_table (string)
42 3.8. cxdx_forced_peer (string)
43 3.9. cxdx_dest_realm (string)
44 3.10. use_preferred_scscf_uri (int)
45 3.11. preferred_scscf_uri (string)
46
47 4. Functions
48
49 4.1. I_scscf_select(initial)
50 4.2. I_scscf_drop()
51 4.3. I_perform_user_authorization_request(route_block,
52 capabalities)
53
54 4.4. I_perform_location_information_request(route_block)
55
56 5. Statistics
57
58 5.1. Average UAR Response Time (uar_avg_response_time)
59 5.2. UAR Timeouts (uar_timeouts)
60 5.3. Average LIR Response Time (lir_avg_response_time)
61 5.4. LIR Timeouts (lir_timeouts)
62
63 List of Examples
64
65 1.1. route_lir_user_unknown parameter usage
66 1.2. route_uar_user_unknown parameter usage
67 1.3. scscf_entry_expiry parameter usage
68 1.4. Set db_url parameter
69 1.5. Set db_nds_table parameter
70 1.6. Set db_scscf_table parameter
71 1.7. Set db_capabilities_table parameter
72 1.8. cxdx_forced_peer parameter usage
73 1.9. cxdx_dest_realm parameter usage
74 1.10. use_preferred_scscf_uri parameter usage
75 1.11. preferred_scscf_uri parameter usage
76 1.12. I_scscf_select usage
77 1.13. I_scscf_drop usage
78 1.14. I_perform_user_authorization_request usage
79 1.15. I_perform_location_information_request
80
81 Chapter 1. Admin Guide
82
83 Table of Contents
84
85 1. Overview
86 2. Dependencies
87
88 2.1. Kamailio Modules
89 2.2. External Libraries or Applications
90
91 3. Parameters
92
93 3.1. route_lir_user_unknown (string)
94 3.2. route_uar_user_unknown (string)
95 3.3. scscf_entry_expiry (integer)
96 3.4. db_url (string)
97 3.5. db_nds_table (string)
98 3.6. db_scscf_table (string)
99 3.7. db_capabilities_table (string)
100 3.8. cxdx_forced_peer (string)
101 3.9. cxdx_dest_realm (string)
102 3.10. use_preferred_scscf_uri (int)
103 3.11. preferred_scscf_uri (string)
104
105 4. Functions
106
107 4.1. I_scscf_select(initial)
108 4.2. I_scscf_drop()
109 4.3. I_perform_user_authorization_request(route_block,
110 capabalities)
111
112 4.4. I_perform_location_information_request(route_block)
113
114 5. Statistics
115
116 5.1. Average UAR Response Time (uar_avg_response_time)
117 5.2. UAR Timeouts (uar_timeouts)
118 5.3. Average LIR Response Time (lir_avg_response_time)
119 5.4. LIR Timeouts (lir_timeouts)
120
121 1. Overview
122
123 This module provides all functionality to build an IMS ICSCF.
124
125 2. Dependencies
126
127 2.1. Kamailio Modules
128 2.2. External Libraries or Applications
129
130 2.1. Kamailio Modules
131
132 The Following modules must be loaded before this module:
133 * TM - Transaction Manager
134 * SL - Stateless Reply
135 * CDP - C Diameter Peer
136 * CDP_AVP - CDP AVP Applications
137
138 2.2. External Libraries or Applications
139
140 This module requires the Kamailio internal IMS library.
141
142 3. Parameters
143
144 3.1. route_lir_user_unknown (string)
145 3.2. route_uar_user_unknown (string)
146 3.3. scscf_entry_expiry (integer)
147 3.4. db_url (string)
148 3.5. db_nds_table (string)
149 3.6. db_scscf_table (string)
150 3.7. db_capabilities_table (string)
151 3.8. cxdx_forced_peer (string)
152 3.9. cxdx_dest_realm (string)
153 3.10. use_preferred_scscf_uri (int)
154 3.11. preferred_scscf_uri (string)
155
156 3.1. route_lir_user_unknown (string)
157
158 This is the route which is executed if HSS returns "user unknown" in
159 LIR
160
161 Default value is ''.
162
163 Example 1.1. route_lir_user_unknown parameter usage
164 ...
165 modparam("ims_icscf","route_lir_user_unknown", "lir_term_user_unknown")
166 ...
167
168 3.2. route_uar_user_unknown (string)
169
170 This is the route which is executed if HSS returns "user unknown" in
171 UAR.
172
173 Default value is ''.
174
175 Example 1.2. route_uar_user_unknown parameter usage
176 ...
177 modparam("ims_icscf","route_uar_user_unknown", "uar_term_user_unknown")
178 ...
179
180 3.3. scscf_entry_expiry (integer)
181
182 This is the time in s after which S-CSCF entries in the I-CSCF's SCSCF
183 list will expire.
184
185 Default value is 300.
186
187 Example 1.3. scscf_entry_expiry parameter usage
188 ...
189 modparam("ims_icscf","scscf_entry_expiry", 300)
190 ...
191
192 3.4. db_url (string)
193
194 URL of the database to be used.
195
196 If the db_url string is empty, the default database URL will be used.
197
198 Default value is “mysql://kamailioro:kamailioro@localhost/kamailio”.
199
200 Example 1.4. Set db_url parameter
201 ...
202 modparam("ims_icscf", "db_url", "dbdriver://username:password@dbhost/dbname")
203 ...
204
205 3.5. db_nds_table (string)
206
207 NDS (Network Domain Security) table name in database to be used.
208
209 Default value is “nds_trusted_domains”.
210
211 Example 1.5. Set db_nds_table parameter
212 ...
213 modparam("ims_icscf", "db_nds_table", "nds_trusted_domains")
214 ...
215
216 3.6. db_scscf_table (string)
217
218 S-CSCF table name in database to be used.
219
220 Default value is “s_cscf”.
221
222 Example 1.6. Set db_scscf_table parameter
223 ...
224 modparam("ims_icscf", "db_scscf_table", "s_cscf")
225 ...
226
227 3.7. db_capabilities_table (string)
228
229 S-CSCF capabilities table name in database to be used.
230
231 Default value is “s_cscf_capabilities”.
232
233 Example 1.7. Set db_capabilities_table parameter
234 ...
235 modparam("ims_icscf", "db_capabilities_table", "s_cscf_capabilities")
236 ...
237
238 3.8. cxdx_forced_peer (string)
239
240 FQDN of Diameter Peer (HSS) to use for communication (UAR, LIR). If you
241 use this, the routing defined in your diameter xml configuration file
242 (CDP) will be ignored and as a result you will lose the benefits of
243 load balancing and failover.
244
245 Default value is "".
246
247 Example 1.8. cxdx_forced_peer parameter usage
248 ...
249 modparam("ims_icscf", "cxdx_forced_peer", "hss.ims.smilecoms.com")
250 ...
251
252 3.9. cxdx_dest_realm (string)
253
254 Destination realm to be used in Diameter messages to HSS
255
256 Default value is "ims.smilecoms.com".
257
258 Example 1.9. cxdx_dest_realm parameter usage
259 ...
260 modparam("ims_icscf", "cxdx_dest_realm", "ims.smilecoms.com")
261 ...
262
263 3.10. use_preferred_scscf_uri (int)
264
265 Whether or not this ICSCF has a preferred S-CSCF to use when the HSS
266 returns a list of SCSCFs. 0 means this I-CSCF has no preferred SCSCF. 1
267 means it has a preferred S-CSCF.
268
269 Default value is 0.
270
271 Example 1.10. use_preferred_scscf_uri parameter usage
272 ...
273 modparam("ims_icscf", "use_preferred_scscf_uri", 1)
274 ...
275
276 3.11. preferred_scscf_uri (string)
277
278 If use_preferred_scscf_uri is set then this is the URI of the preferred
279 SCSCF.
280
281 Default value is "".
282
283 Example 1.11. preferred_scscf_uri parameter usage
284 ...
285 modparam("ims_icscf", "preferred_scscf_uri", "sip:scscf.ims.smilecoms.com:6060")
286 ...
287
288 4. Functions
289
290 4.1. I_scscf_select(initial)
291 4.2. I_scscf_drop()
292 4.3. I_perform_user_authorization_request(route_block, capabalities)
293 4.4. I_perform_location_information_request(route_block)
294
295 4.1. I_scscf_select(initial)
296
297 This function is used to retrieve the next unused SCSCF from the list
298 for this request (based on callid).
299
300 A positive return code (1) means an SCSCF was found and is armed for
301 routing.
302
303 Meaning of the parameters is as follows:
304 * initial - Signal whether or not this is an original or subsequent.
305
306 This function can be used from REQUEST_ROUTE | FAILURE_ROUTE.
307
308 Example 1.12. I_scscf_select usage
309 ...
310 if (I_scscf_select("0")) {
311 #there is an S-CSCF list - no need to do a UAR
312 t_on_reply("register_reply");
313 t_on_failure("register_failure");
314 t_relay();
315 }
316 ...
317
318 4.2. I_scscf_drop()
319
320 Drop the list of SCSCFs for this request (based on callid).
321
322 This function can be used from REQUEST_ROUTE | FAILURE_ROUTE |
323 REPLY_ROUTE
324
325 Example 1.13. I_scscf_drop usage
326 ...
327 I_scscf_drop();
328 ...
329
330 .
331
332 4.3. I_perform_user_authorization_request(route_block, capabalities)
333
334 Perform a UAR on Diameter CXDX interface. This function will build a
335 list of SCSCFs to be used and populate the SCSCF list for the request.
336 On a successful return of this message you can get the next available
337 SCSCF by using the I_scscf_select function in 4.1.
338 * Route block to resume after async UAR Diameter reply.
339 * capabilities - whether to request capabilities or not "1" - with
340 capabilities, "0" - no capabilities.
341
342 This function can be used from REQUEST_ROUTE.
343
344 p.s. this is executed asynchronously. See example on how to retrieve
345 return value
346
347 Example 1.14. I_perform_user_authorization_request usage
348 ...
349 I_perform_user_authorization_request("REG_UAR_REPLY","0"); #0=REG/DEREG; 1=REG+C
350 apabilities
351 exit;
352 ...
353 route[REG_UAR_REPLY]
354 {
355 #this is async so to know status we have to check the reply avp
356 switch ($avp(s:uaa_return_code)){
357 case 1: #success
358 if (I_scscf_select("0")){
359 t_on_failure("register_failure");
360 t_on_reply("register_reply");
361 #now relay to appropriate SCSCF
362 if (!t_relay()) {
363 t_reply("500", "Error forwarding to SCSCF");
364 }
365 } else {#select failed
366 I_scscf_drop();
367 t_reply("500", "Server error on SCSCF Select (UAR)")
368 ;
369 }
370 break;
371 case -1: #failure
372 xlog("L_ERR", "UAR failure - error response sent from module
373 \n");
374 break;
375 case -2: #error
376 xlog("L_ERR", "UAR error - sending error response now\n");
377 t_reply("500", "UAR failed");
378 break;
379 default:
380 xlog("L_ERR", "Unknown return code from UAR, value is [$avp(
381 s:uaa_return_code)]\n");
382 t_reply("500", "Unknown response code from UAR");
383 break;
384 }
385 }
386 ...
387
388 4.4. I_perform_location_information_request(route_block)
389
390 Perform a LIR on Diameter CXDX interface.
391 * Route block to resume after async LIR Diameter reply.
392
393 This function can be used from REQUEST_ROUTE.
394
395 p.s. this is executed asynchronously. See example on how to retrieve
396 return value
397
398 Example 1.15. I_perform_location_information_request
399 ...
400 I_perform_location_information_request("SESSION_LIR_REPLY","0");
401 exit;
402 ...
403 route[SESSION_LIR_REPLY]
404 {
405 if ($avp(lia_return_code) == 1) {
406 if (I_scscf_select("0")) {
407 append_branch();
408 t_on_reply("initial_request_reply");
409 t_on_failure("initial_request_failure");
410 if (!t_relay()) {
411 t_reply("500","Error forwarding towards S-CSCF");
412 break;
413 }
414 break;
415 } else {
416 xlog("L_DBG", "dropping scscf list on initial request\n");
417 I_scscf_drop();
418 t_reply("500", "Server error on LIR select S-CSCF");
419 break;
420 }
421 } else {
422 t_reply("500", "Server error on LIR");
423 break;
424 }
425 break;
426 }
427 ...
428
429 5. Statistics
430
431 5.1. Average UAR Response Time (uar_avg_response_time)
432 5.2. UAR Timeouts (uar_timeouts)
433 5.3. Average LIR Response Time (lir_avg_response_time)
434 5.4. LIR Timeouts (lir_timeouts)
435
436 5.1. Average UAR Response Time (uar_avg_response_time)
437
438 The average response time in milliseconds for UAR-UAA transaction.
439
440 5.2. UAR Timeouts (uar_timeouts)
441
442 The number of UAR timeouts.
443
444 5.3. Average LIR Response Time (lir_avg_response_time)
445
446 The average response time in milliseconds for LIR-LIA transaction.
447
448 5.4. LIR Timeouts (lir_timeouts)
449
450 The number of LIR timeouts.