Debian Codegraph @

src/modules/ims_usrloc_pcscf/README

raw
1 IMS Usrloc PCSCF Module
2
3 Jason Penton
4
5 Smile Communications
6
7 Edited by
8
9 Richard Good
10
11 Smile Communications
12
13 Carsten Bock
14
15 ng-voice GmbH
16
17 Copyright © 2012 Smile Communications
18 __________________________________________________________________
19
20 Table of Contents
21
22 1. Admin Guide
23
24 1. Overview
25 2. Dependencies
26
27 2.1. Kamailio Modules
28 2.2. External Libraries or Applications
29
30 3. Parameters
31
32 3.1. hash_size (int)
33 3.2. timer_interval (int)
34 3.3. db_url (string)
35 3.4. db_mode (int)
36 3.5. match_contact_host_port (int)
37 3.6. expires_grace (int)
38 3.7. audit_expired_pcontacts_interval (int)
39 3.8. audit_expired_pcontacts_timeout (int)
40
41 4. RPC Commands
42
43 4.1. ulpcscf.status
44
45 5. Statistics
46
47 5.1. registered contacts
48 5.2. impus
49 5.3. expired contacts
50
51 2. Frequently Asked Questions
52
53 List of Examples
54
55 1.1. Set hash_size parameter
56 1.2. Set timer_interval parameter
57 1.3. Set db_url parameter
58 1.4. Set db_mode parameter
59 1.5. Set match_contact_host_port parameter
60 1.6. Set expires_grace parameter
61 1.7. Set audit_expired_pcontacts_interval parameter
62 1.8. Set audit_expired_pcontacts_timeout parameter
63
64 Chapter 1. Admin Guide
65
66 Table of Contents
67
68 1. Overview
69 2. Dependencies
70
71 2.1. Kamailio Modules
72 2.2. External Libraries or Applications
73
74 3. Parameters
75
76 3.1. hash_size (int)
77 3.2. timer_interval (int)
78 3.3. db_url (string)
79 3.4. db_mode (int)
80 3.5. match_contact_host_port (int)
81 3.6. expires_grace (int)
82 3.7. audit_expired_pcontacts_interval (int)
83 3.8. audit_expired_pcontacts_timeout (int)
84
85 4. RPC Commands
86
87 4.1. ulpcscf.status
88
89 5. Statistics
90
91 5.1. registered contacts
92 5.2. impus
93 5.3. expired contacts
94
95 1. Overview
96
97 This module serves as a storage engine for PCSCF contacts, much like
98 the standard Kamailio module, usrloc, is a storage engine for standard
99 SIP contacts. The concept of a contact in IMS, PCSCF specifically, is
100 very different to that of std. SIP and as a result we have built this
101 new module. A lot of the design has been borrowed from the std. usrloc
102 module. For example. An IMS contact, in PCSCF, needs things like:
103
104 * Diameter Rx session for signalling bearer status. i.e. this is
105 effectively QoS from the network to make sure the signalling link
106 can be 'trusted'
107 * IPSEC Security Association for secure signalling between UE and
108 PCSCF (first point of contact)
109 * IMPU, each contact can have a number of associated public
110 identities (IMPU).
111
112 2. Dependencies
113
114 2.1. Kamailio Modules
115 2.2. External Libraries or Applications
116
117 2.1. Kamailio Modules
118
119 The following modules must be loaded before this module:
120 * None.
121
122 2.2. External Libraries or Applications
123
124 The following libraries or applications must be installed before
125 running Kamailio with this module loaded:
126 * None.
127
128 3. Parameters
129
130 3.1. hash_size (int)
131 3.2. timer_interval (int)
132 3.3. db_url (string)
133 3.4. db_mode (int)
134 3.5. match_contact_host_port (int)
135 3.6. expires_grace (int)
136 3.7. audit_expired_pcontacts_interval (int)
137 3.8. audit_expired_pcontacts_timeout (int)
138
139 3.1. hash_size (int)
140
141 The number of entries of the hash table used by to store the contact
142 records is 2^hash_size. For hash_size=4, the number of entries of the
143 hash table is 16.
144
145 Default value is 9.
146
147 Example 1.1. Set hash_size parameter
148 ...
149 modparam("ims_usrloc_pcscf", "hash_size", 10)
150 ...
151
152 3.2. timer_interval (int)
153
154 Number of seconds between two timer runs. The module uses timer to
155 delete expired contacts.
156
157 Default value is 60.
158
159 Example 1.2. Set timer_interval parameter
160 ...
161 modparam("ims_usrloc_pcscf", "timer_interval", 30)
162 ...
163
164 3.3. db_url (string)
165
166 Database URL.
167
168 Default value is "mysql://kamailio:kamailiorw@localhost/kamailio".
169
170 Example 1.3. Set db_url parameter
171 ...
172 modparam("ims_usrloc_pcscf", "db_url", "dbdriver://username:password@dbhost/dbna
173 me")
174 ...
175
176 3.4. db_mode (int)
177
178 This is the database mode to be used for the PCSCF usrloc data
179 persistent storage. Currently this module supports the Write-Through
180 scheme only.
181 * 0 - This disables DB mode. Only memory will be used for usrloc and
182 data will not survive a restart.
183 * 1 - Write-Through Scheme. All changes to usrloc are immediately
184 reflected in the database. This is slow but very reliable. This
185 mode will ensure that no registration data is lost as a result of a
186 restart or crash.
187 * 3 - DB_ONLY Scheme. All changes to usrloc are immediately reflected
188 in the database and additionally PCSCF usrloc data are downloaded
189 from db and inserted into PCSCF usrloc cache if required - i.e. If
190 contact data cannot be found in cache a db query for the contact is
191 done in table location and when contact is found there its
192 respective data are inserted in PCSCF usrloc cache. Also an audit
193 had been added for removal of long expired PCSCF usrloc data in
194 table location. This mode will ensure that no registration data is
195 lost as a result of a restart or crash.
196
197 Default value is 0.
198
199 Example 1.4. Set db_mode parameter
200 ...
201 modparam("ims_usrloc_pcscf", "db_mode", 1)
202 ...
203
204 3.5. match_contact_host_port (int)
205
206 If set to 1 (default), the contact is matched using only host and port
207 in the contact URI.
208 * 0 - When matching contact do full contact match procedure.
209 * 1 - When matching contact compare only host and port of the contact
210 URI.
211
212 Default value is 1.
213
214 Example 1.5. Set match_contact_host_port parameter
215 ...
216 modparam("ims_usrloc_pcscf", "match_contact_host_port", 0)
217 ...
218
219 3.6. expires_grace (int)
220
221 Specify a grace time for keeping the contacts until they are finally
222 deleted. The value of the parameter is defined in seconds.
223
224 Default value is 3600.
225
226 Example 1.6. Set expires_grace parameter
227 ...
228 modparam("ims_usrloc_pcscf", "expires_grace", 1800)
229 ...
230
231 3.7. audit_expired_pcontacts_interval (int)
232
233 Number of seconds between two audit runs. Note: audit is used for
234 db_mode DB_ONLY (3) only. The module uses this audit to delete expired
235 contacts found in db table location which are expired at least as the
236 audit_expired_pcontacts_timeout value. Such expired contacts in
237 location may appear when these contacts are not present in usrloc cache
238 because PCSCF crashed before contact expiry.
239
240 Default value is 60.
241
242 Example 1.7. Set audit_expired_pcontacts_interval parameter
243 ...
244 modparam("ims_usrloc_pcscf", "audit_expired_pcontacts_interval", 120)
245 ...
246
247 3.8. audit_expired_pcontacts_timeout (int)
248
249 Number of seconds the contacts must be already expired before the audit
250 starts working on them. It is recommended to set only values greater
251 than the Default value 40. The module uses this audit to delete expired
252 contacts found in db table location which are expired at least as many
253 seconds as the sum of this timeout parameter value plus the value of
254 the expires_grace parameter.
255
256 Default value is 40.
257
258 Example 1.8. Set audit_expired_pcontacts_timeout parameter
259 ...
260 modparam("ims_usrloc_pcscf", "audit_expired_pcontacts_timeout", 120)
261 ...
262
263 4. RPC Commands
264
265 4.1. ulpcscf.status
266
267 exported RPC commands.
268
269 4.1. ulpcscf.status
270
271 Status of pcscf_usrloc, AORs, max slots, etc.
272
273 5. Statistics
274
275 5.1. registered contacts
276 5.2. impus
277 5.3. expired contacts
278
279 Exported statistics are listed in the next sections.
280
281 5.1. registered contacts
282
283 Number of AOR contacts in registered state - cannot be reset.
284
285 5.2. impus
286
287 Number of IMPUs - cannot be reset.
288
289 5.3. expired contacts
290
291 Number of expired contacts - can be reset.
292
293 Chapter 2. Frequently Asked Questions
294
295 2.1. Where can I find more about Kamailio?
296 2.2. Where can I post a question about this module?
297 2.3. How can I report a bug?
298
299 2.1.
300
301 Where can I find more about Kamailio?
302
303 Take a look at https://www.kamailio.org/.
304
305 2.2.
306
307 Where can I post a question about this module?
308
309 First at all check if your question was already answered on one of our
310 mailing lists:
311 * User Mailing List -
312 https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.
313 kamailio.org/
314 * Developer Mailing List -
315 https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.ka
316 mailio.org/
317
318 E-mails regarding any stable Kamailio release should be sent to
319 <[email protected]> and e-mails regarding development
320 versions should be sent to <[email protected]>.
321
322 2.3.
323
324 How can I report a bug?
325
326 Please follow the guidelines provided at:
327 https://github.com/kamailio/kamailio/issues.