Browse code

- Spelling checked - READMEs updated

Jan Janak authored on 24/08/2004 08:58:23
Showing 365 changed files
... ...
@@ -5,7 +5,7 @@ Jiri Kuthan
5 5
 
6 6
    iptel.org
7 7
 
8
-   Copyright � 2002, 2003 by FhG FOKUS
8
+   Copyright � 2002, 2003 FhG FOKUS
9 9
      _________________________________________________________
10 10
 
11 11
    Table of Contents
... ...
@@ -48,27 +48,53 @@ Jiri Kuthan
48 48
 
49 49
    2. Developer's Guide
50 50
    3. Frequently Asked Questions
51
+
52
+   List of Examples
53
+   1-1. Setting secret module parameter
54
+   1-2. log_level example
55
+   1-3. log_fmt example
56
+   1-4. early_media example
57
+   1-5. failed_transactions example
58
+   1-6. log_flag example
59
+   1-7. log_missed_flag example
60
+   1-8. report_ack example
61
+   1-9. report_cancels example
62
+   1-10. radius_config example
63
+   1-11. service_type example
64
+   1-12. radius_flag example
65
+   1-13. radius_missed_flag example
66
+   1-14. db_url example
67
+   1-15. db_flag example
68
+   1-16. db_missed_flag example
69
+   1-17. diameter_flag example
70
+   1-18. diameter_missed_flag example
71
+   1-19. diameter_client_host example
72
+   1-20. diameter_client_host example
73
+   1-21. acc_log_request usage
74
+   1-22. acc_db_request usage
75
+   1-23. acc_rad_request usage
76
+   1-24. acc_diam_request usage
51 77
      _________________________________________________________
52 78
 
53 79
 Chapter 1. User's Guide
54 80
 
55 81
 1.1. Overview
56 82
 
57
-   acc  module  is  used to report on transactions to syslog, SQL
83
+   acc module is used to report on transactions to syslog, SQL
58 84
    and RADIUS.
59 85
 
60 86
    To report on a transaction using syslog, use "setflag" to mark
61
-   a  transaction  you  are  interested  in  with  a  flag,  load
62
-   accounting  module  and  set  its  "log_flag" to the same flag
63
-   number.   The   acc  module  will  then  report  on  completed
64
-   transaction  to syslog. A typical usage of the module takes no
65
-   acc-specific   script   command  --  the  functionality  binds
66
-   invisibly  through transaction processing. Script writers just
67
-   need  to  mark  the  transaction  for  accounting  with proper
87
+   a transaction you are interested in with a flag, load
88
+   accounting module and set its "log_flag" to the same flag
89
+   number. The acc module will then report on completed
90
+   transaction to syslog. A typical usage of the module takes no
91
+   acc-specific script command -- the functionality binds
92
+   invisibly through transaction processing. Script writers just
93
+   need to mark the transaction for accounting with proper
68 94
    setflag.
69 95
 
70
-   What  is printed depends on module's "log_fmt" parameter. It's
71
-   a  string  with  characters  specifying which parts of request
96
+   What is printed depends on module's "log_fmt" parameter. It's
97
+   a string with characters specifying which parts of request
72 98
    should be printed:
73 99
 
74 100
      * c = Call-Id
... ...
@@ -83,50 +109,53 @@ Chapter 1. User's Guide
83 109
      * u = digest Username
84 110
      * p = username Part of inbound Request-URI
85 111
 
86
-   If  a  value  is  not  present  in request, "n/a" is accounted
112
+   If a value is not present in request, "n/a" is accounted
87 113
    instead.
88 114
 
89 115
    Note that:
90 116
 
91 117
      * A single INVITE may produce multiple accounting reports --
92
-       that's due to SIP's forking feature
93
-     * Subsequent  ACKs  and other requests do not hit the server
94
-       and  can't be accounted unless record-routing is enforced.
95
-       The  ACKs assert very little useful information anyway and
96
-       reporting  on INVITE's 200 makes most accounting scenarios
118
+       that's due to SIP forking feature
119
+     * Subsequent ACKs and other requests do not hit the server
120
+       and can't be accounted unless record-routing is enforced.
121
+       The ACKs assert very little useful information anyway and
122
+       reporting on INVITE's 200 makes most accounting scenarios
97 123
        happy.
98
-     * There  is  no  session  accounting  --  ser  maintains  no
99
-       sessions.  If one needs to correlate INVITEs with BYEs for
100
-       example  for purpose of billing, then it is better done in
101
-       the   entity   which   collects   accounting  infromation.
102
-       Otherwise,    SIP    server    would    have   to   become
103
-       sessions-stateful,  which  would  very  badly  impact  its
124
+     * There is no session accounting -- ser maintains no
125
+       sessions. If one needs to correlate INVITEs with BYEs for
126
+       example for purpose of billing, then it is better done in
127
+       the entity which collects accounting information.
128
+       Otherwise, SIP server would have to become
129
+       sessions-stateful, which would very badly impact its
104 130
        scalability.
105
-     * If  a  UA  fails  in  middle of conversation, a proxy will
106
-       never  learn  it.  In  general,  a  better  practice is to
107
-       account  from  an end-device (such as PSTN gateway), which
108
-       best  knows  about call status (including media status and
131
+     * If a UA fails in middle of conversation, a proxy will
132
+       never learn it. In general, a better practice is to
133
+       account from an end-device (such as PSTN gateway), which
134
+       best knows about call status (including media status and
109 135
        PSTN status in case of the gateway).
110 136
 
111
-   Support  for  SQL  and  RADIUS  works analogously. You need to
137
+   Support for SQL and RADIUS works analogously. You need to
112 138
    enable it by recompiling the module with properly set defines.
113
-   Uncomment     the     SQL_ACC    and    RAD_ACC    lines    in
139
+   Uncomment the SQL_ACC and RAD_ACC lines in
114 140
    modules/acc/Makefile. To compile SQL support, you need to have
115 141
    mysqlclient package on your system. To compile RADIUS support,
116
-   you  need  to  have  radiusclient  installed  on  your  system
117
-   (http://www.mcs-cityline.net/~lf/radius/).  The  radius client
118
-   needs to be configured properly. To do so, use the template at
119
-   etc/radiusclient.conf    and    make    sure   that   module's
120
-   radius_config parameter points to its location. In particular,
121
-   accounting  secret  must  match that one configured in server.
122
-   Uses  along  with  FreeRadius (http://www.freeradius.org/) and
123
-   Radiator  (http://www.open.com.au/radiator/) servers have been
124
-   reported to us.
125
-
126
-   Both  mysql and radius libraries must be dynamically linkable.
127
-   You  need to configure your OS so that SER, when started, will
128
-   find    them.   Typically,   you   do   so   by   manipulating
129
-   LD_LIBRARY_PATH environment variable or condiguring ld.so.
142
+   you need to have radiusclient installed on your system
143
+   (version 0.4.1 or higher is required) which is available from
144
+   http://developer.berlios.de/projects/radiusclient-ng/. The
145
+   radius client needs to be configured properly. To do so, use
146
+   the template at etc/radiusclient.conf and make sure that
147
+   module's radius_config parameter points to its location. In
148
+   particular, accounting secret must match that one configured
149
+   in server and proper dictionary is used (one is available at
150
+   etc/sip_dictionary). Uses along with FreeRadius
151
+   (http://www.freeradius.org/) and Radiator
152
+   (http://www.open.com.au/radiator/) servers have been reported
153
+   to us.
154
+
155
+   Both mysql and radius libraries must be dynamically linkable.
156
+   You need to configure your OS so that SER, when started, will
157
+   find them. Typically, you do so by manipulating
158
+   LD_LIBRARY_PATH environment variable or configuring ld.so.
130 159
      _________________________________________________________
131 160
 
132 161
 1.1.1. General Example
... ...
@@ -155,7 +184,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
155 184
 
156 185
 1.2. Dependencies
157 186
 
158
-   The  module  depends  on  the  following modules (in the other
187
+   The module depends on the following modules (in the other
159 188
    words the listed modules must be loaded before this module):
160 189
 
161 190
      * tm -- Transaction Manager
... ...
@@ -169,7 +198,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
169 198
    Default value is randomly generated string.
170 199
 
171 200
    Example 1-1. Setting secret module parameter
172
-   modparam("auth", "secret", "johndoessecretphrase")
201
+modparam("auth", "secret", "johndoessecretphrase")
173 202
      _________________________________________________________
174 203
 
175 204
 1.3.2. log_level (integer)
... ...
@@ -179,7 +208,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
179 208
    Default value is L_NOTICE.
180 209
 
181 210
    Example 1-2. log_level example
182
-   modparam("acc", "log_level", 2)   # Set log_level to 2
211
+modparam("acc", "log_level", 2)   # Set log_level to 2
183 212
      _________________________________________________________
184 213
 
185 214
 1.3.3. log_fmt (string)
... ...
@@ -190,7 +219,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
190 219
    Default value is "miocfs".
191 220
 
192 221
    Example 1-3. log_fmt example
193
-   modparam("acc", "log_fmt", "mfs")
222
+modparam("acc", "log_fmt", "mfs")
194 223
      _________________________________________________________
195 224
 
196 225
 1.3.4. early_media (integer)
... ...
@@ -200,7 +229,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
200 229
    Default value is 0 (no).
201 230
 
202 231
    Example 1-4. early_media example
203
-   modparam("acc", "early_media", 1)
232
+modparam("acc", "early_media", 1)
204 233
      _________________________________________________________
205 234
 
206 235
 1.3.5. failed_transactions (integer)
... ...
@@ -210,7 +239,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
210 239
    Default value is 0 (no).
211 240
 
212 241
    Example 1-5. failed_transactions example
213
-   modparam("acc", "failed_transactions", 1)
242
+modparam("acc", "failed_transactions", 1)
214 243
      _________________________________________________________
215 244
 
216 245
 1.3.6. log_flag (integer)
... ...
@@ -220,7 +249,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
220 249
    Default value is 1.
221 250
 
222 251
    Example 1-6. log_flag example
223
-   modparam("acc", "log_flag", 2)
252
+modparam("acc", "log_flag", 2)
224 253
      _________________________________________________________
225 254
 
226 255
 1.3.7. log_missed_flag (integer)
... ...
@@ -230,42 +259,41 @@ if (uri=~"sip:+49") /* calls to Germany */ {
230 259
    Default value is 2.
231 260
 
232 261
    Example 1-7. log_missed_flag example
233
-   modparam("acc", "log_missed_flag", 3)
262
+modparam("acc", "log_missed_flag", 3)
234 263
      _________________________________________________________
235 264
 
236 265
 1.3.8. report_ack (integer)
237 266
 
238
-   Shall  acc attempt to account e2e ACKs too ? Note that this is
239
-   really  only an attempt, as e2e ACKs may take a different path
267
+   Shall acc attempt to account e2e ACKs too ? Note that this is
268
+   really only an attempt, as e2e ACKs may take a different path
240 269
    (unless RR enabled) and mismatch original INVITE (e2e ACKs are
241 270
    a separate transaction).
242 271
 
243 272
    Default value is 1 (yes).
244 273
 
245 274
    Example 1-8. report_ack example
246
-   modparam("acc", "report_ack", 0)
275
+modparam("acc", "report_ack", 0)
247 276
      _________________________________________________________
248 277
 
249 278
 1.3.9. report_cancels (integer)
250 279
 
251
-   By  default,  CANCEL  reporting is disabled -- most accounting
252
-   applications  are  happy  to see INVITE's cancellation status.
253
-   Turn   on   if   you   explicitely   want  to  account  CANCEL
254
-   transactions.
280
+   By default, CANCEL reporting is disabled -- most accounting
281
+   applications are happy to see INVITE's cancellation status.
282
+   Turn on if you explicitly want to account CANCEL transactions.
255 283
 
256 284
    Default value is 0 (no).
257 285
 
258 286
    Example 1-9. report_cancels example
259
-   modparam("acc", "report_cancels", 1)
287
+modparam("acc", "report_cancels", 1)
260 288
      _________________________________________________________
261 289
 
262 290
 1.3.10. radius_config (string)
263 291
 
264
-   This  parameter  is  radius  specific.  Path  to radius client
292
+   This parameter is radius specific. Path to radius client
265 293
    configuration file, set the referred config file correctly and
266
-   specify  there  address of server, shared secret (should equal
267
-   that  in  /usr/local/etc/raddb/clients for freeRadius servers)
268
-   and  dictionary,  see  etc  for  an example of config file and
294
+   specify there address of server, shared secret (should equal
295
+   that in /usr/local/etc/raddb/clients for freeRadius servers)
296
+   and dictionary, see etc for an example of config file and
269 297
    dictionary.
270 298
 
271 299
    Default value is
... ...
@@ -282,7 +310,7 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
282 310
    Default value is 15 (SIP).
283 311
 
284 312
    Example 1-11. service_type example
285
-   modparam("acc", "service_type", 16)
313
+modparam("acc", "service_type", 16)
286 314
      _________________________________________________________
287 315
 
288 316
 1.3.12. radius_flag (integer)
... ...
@@ -293,18 +321,18 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
293 321
    Default value is 1.
294 322
 
295 323
    Example 1-12. radius_flag example
296
-   modparam("acc", "radius_flag", 2)
324
+modparam("acc", "radius_flag", 2)
297 325
      _________________________________________________________
298 326
 
299 327
 1.3.13. radius_missed_flag (integer)
300 328
 
301
-   Request  flag which needs to be set to account missed calls --
329
+   Request flag which needs to be set to account missed calls --
302 330
    RADIUS specific.
303 331
 
304 332
    Default value is 2.
305 333
 
306 334
    Example 1-13. radius_missed_flag example
307
-   modparam("acc", "radius_missed_flag", 3)
335
+modparam("acc", "radius_missed_flag", 3)
308 336
      _________________________________________________________
309 337
 
310 338
 1.3.14. db_url (string)
... ...
@@ -314,7 +342,7 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
314 342
    Default value is "mysql://ser:heslo@localhost/ser"
315 343
 
316 344
    Example 1-14. db_url example
317
-   modparam("acc", "db_url", "mysql://user:password@localhost/ser")
345
+modparam("acc", "db_url", "mysql://user:password@localhost/ser")
318 346
      _________________________________________________________
319 347
 
320 348
 1.3.15. db_flag (integer)
... ...
@@ -325,18 +353,18 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
325 353
    Default value is 1.
326 354
 
327 355
    Example 1-15. db_flag example
328
-   modparam("acc", "db_flag", 2)
356
+modparam("acc", "db_flag", 2)
329 357
      _________________________________________________________
330 358
 
331 359
 1.3.16. db_missed_flag (integer)
332 360
 
333
-   Request  flag which needs to be set to account missed calls --
361
+   Request flag which needs to be set to account missed calls --
334 362
    database specific.
335 363
 
336 364
    Default value is 2.
337 365
 
338 366
    Example 1-16. db_missed_flag example
339
-   modparam("acc", "db_missed_flag", 3)
367
+modparam("acc", "db_missed_flag", 3)
340 368
      _________________________________________________________
341 369
 
342 370
 1.3.17. diameter_flag (integer)
... ...
@@ -347,29 +375,29 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
347 375
    Default value is 1.
348 376
 
349 377
    Example 1-17. diameter_flag example
350
-   modparam("acc", "diameter_flag", 2)
378
+modparam("acc", "diameter_flag", 2)
351 379
      _________________________________________________________
352 380
 
353 381
 1.3.18. diameter_missed_flag (integer)
354 382
 
355
-   Request  flag which needs to be set to account missed calls --
383
+   Request flag which needs to be set to account missed calls --
356 384
    DIAMETER specific.
357 385
 
358 386
    Default value is 2.
359 387
 
360 388
    Example 1-18. diameter_missed_flag example
361
-   modparam("acc", "diameter_missed_flag", 3)
389
+modparam("acc", "diameter_missed_flag", 3)
362 390
      _________________________________________________________
363 391
 
364 392
 1.3.19. diameter_client_host (string)
365 393
 
366
-   Hostname  of  the machine where the DIAMETER Client is running
394
+   Hostname of the machine where the DIAMETER Client is running
367 395
    -- DIAMETER specific.
368 396
 
369 397
    Default value is "localhost".
370 398
 
371 399
    Example 1-19. diameter_client_host example
372
-   modparam("acc", "diameter_client_host", "iptel.org")
400
+modparam("acc", "diameter_client_host", "iptel.org")
373 401
      _________________________________________________________
374 402
 
375 403
 1.3.20. diameter_client_port (int)
... ...
@@ -380,16 +408,16 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
380 408
    Default value is 3000.
381 409
 
382 410
    Example 1-20. diameter_client_host example
383
-   modparam("acc", "diameter_client_port", 3000)
411
+modparam("acc", "diameter_client_port", 3000)
384 412
      _________________________________________________________
385 413
 
386 414
 1.4. Exported Functions
387 415
 
388 416
 1.4.1. acc_log_request(comment)
389 417
 
390
-   acc_request  reports on a request, for example, it can be used
391
-   to  report  on  missed calls to off-line users who are replied
392
-   404.  To  avoid multiple reports on UDP request retranmission,
418
+   acc_request reports on a request, for example, it can be used
419
+   to report on missed calls to off-line users who are replied
420
+   404. To avoid multiple reports on UDP request retransmission,
393 421
    you would need to embed the action in stateful processing.
394 422
 
395 423
    Meaning of the parameters is as follows:
... ...
@@ -405,7 +433,7 @@ acc_log_request("Some comment");
405 433
 1.4.2. acc_db_request(comment, table)
406 434
 
407 435
    Like acc_log_request, acc_db_request reports on a request. The
408
-   report  is sent to database at "db_url", in the table referred
436
+   report is sent to database at "db_url", in the table referred
409 437
    to in the second action parameter
410 438
 
411 439
    Meaning of the parameters is as follows:
... ...
@@ -421,7 +449,7 @@ acc_log_request("Some comment", "Some table");
421 449
 
422 450
 1.4.3. acc_rad_request(comment)
423 451
 
424
-   Like  acc_log_request, acc_rad_requst reports on a request. It
452
+   Like acc_log_request, acc_rad_request reports on a request. It
425 453
    reports to radius server as configured in "radius_config".
426 454
 
427 455
    Meaning of the parameters is as follows:
... ...
@@ -436,8 +464,8 @@ acc_rad_request("Some comment");
436 464
 
437 465
 1.4.4. acc_diam_request(comment)
438 466
 
439
-   Like acc_log_request, acc_diam_requst reports on a request. It
440
-   reports to Diameter server.
467
+   Like acc_log_request, acc_diam_request reports on a request.
468
+   It reports to Diameter server.
441 469
 
442 470
    Meaning of the parameters is as follows:
443 471
 
... ...
@@ -456,8 +484,8 @@ Chapter 2. Developer's Guide
456 484
 
457 485
 Chapter 3. Frequently Asked Questions
458 486
 
459
-   Q: What is the meaning of life ?
487
+   3.1. What is the meaning of life ?
460 488
 
461
-   Q: What is the meaning of life ?
489
+   3.1. What is the meaning of life ?
462 490
 
463
-   A: 42
491
+   42
... ...
@@ -2,7 +2,7 @@
2 2
  *
3 3
  * $Id$
4 4
  *
5
- * Copyright (C) 2001-2003 Fhg Fokus
5
+ * Copyright (C) 2001-2003 FhG Fokus
6 6
  *
7 7
  * This file is part of ser, a free SIP server.
8 8
  *
... ...
@@ -142,7 +142,7 @@ static int fmt2strar( char *fmt, /* what would you like to account ? */
142 142
 		struct hdr_field *to, 
143 143
 		str *phrase, 
144 144
 		int *total_len, /* total length of accounted values */
145
-		int *attr_len,  /* total length of accounted attribtue names */
145
+		int *attr_len,  /* total length of accounted attribute names */
146 146
 		str **val_arr, /* that's the output -- must have MAX_ACC_COLUMNS */
147 147
 		str *atr_arr)
148 148
 {
... ...
@@ -294,7 +294,7 @@ static int fmt2strar( char *fmt, /* what would you like to account ? */
294 294
 				ATR(RURI_DOMAIN);
295 295
 				break;
296 296
 			default:
297
-				LOG(L_CRIT, "BUG: acc_log_request: uknown char: %c\n",
297
+				LOG(L_CRIT, "BUG: acc_log_request: unknown char: %c\n",
298 298
 					*fmt);
299 299
 				return 0;
300 300
 		} /* switch (*fmt) */
... ...
@@ -873,7 +873,7 @@ int acc_diam_request( struct sip_msg *rq, struct hdr_field *to, str *phrase )
873 873
 	
874 874
 	if ( (send=AAAInMessage(ACCOUNTING_REQUEST, AAA_APP_NASREQ))==NULL)
875 875
 	{
876
-		LOG(L_ERR, "ERROR: acc_diam_reqest: new AAA message not created\n");
876
+		LOG(L_ERR, "ERROR: acc_diam_request: new AAA message not created\n");
877 877
 		return -1;
878 878
 	}
879 879
 
... ...
@@ -1102,7 +1102,7 @@ int acc_diam_request( struct sip_msg *rq, struct hdr_field *to, str *phrase )
1102 1102
 		goto error;
1103 1103
 	}
1104 1104
 
1105
-	if(ret != ACC_SUCCESS) /* a transmission error occured */
1105
+	if(ret != ACC_SUCCESS) /* a transmission error occurred */
1106 1106
 	{
1107 1107
 		LOG(L_ERR, M_NAME":acc_diam_request: message sending to the" 
1108 1108
 					" DIAMETER backend authorization server failed\n");
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * $Id$
3 3
  *
4
- * Copyright (C) 2001-2003 Fhg Fokus
4
+ * Copyright (C) 2001-2003 FhG Fokus
5 5
  *
6 6
  * This file is part of ser, a free SIP server.
7 7
  *
... ...
@@ -34,7 +34,7 @@
34 34
 #ifndef _ACC_H
35 35
 #define _ACC_H
36 36
 
37
-/* what is printed if value unknonw */
37
+/* what is printed if value unknown */
38 38
 #define NA "n/a"
39 39
 #define NA_LEN (sizeof(NA)-1)
40 40
 /* syslog prefix */
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * $Id$
5 5
  * 
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -463,7 +463,7 @@ static inline int should_acc_reply(struct cell *t, int code)
463 463
 		return 0;
464 464
 	}
465 465
 
466
-	/* negative transactions reported otherwise only if explicitely 
466
+	/* negative transactions reported otherwise only if explicitly 
467 467
 	 * demanded */
468 468
 	if (!failed_transactions && code >=300) return 0;
469 469
 	if (!is_acc_on(r))
... ...
@@ -545,7 +545,7 @@ static inline void on_missed(struct cell *t, struct sip_msg *reply,
545 545
 		 * forwarding attempt fails; we do not wish to
546 546
 		 * report on every attempt; so we clear the flags; 
547 547
 		 * we do it after all reporting is over to be sure
548
-		 * that all reporting functios got a fair chance
548
+		 * that all reporting functions got a fair chance
549 549
 		 */
550 550
 		if (reset_lmf) resetflag(t->uas.request, log_missed_flag);
551 551
 #ifdef SQL_ACC
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * $Id$
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * $Id$
3 3
  *
4
- * Copyright (C) 2001-2003 Fhg Fokus
4
+ * Copyright (C) 2001-2003 FhG Fokus
5 5
  *
6 6
  * This file is part of ser, a free SIP server.
7 7
  *
... ...
@@ -5,7 +5,7 @@
5 5
  * 2003-03-12 converted to shm_malloc/free (andrei)
6 6
  *
7 7
  *
8
- * Copyright (C) 2002-2003 Fhg Fokus
8
+ * Copyright (C) 2002-2003 FhG Fokus
9 9
  *
10 10
  * This file is part of disc, a free diameter server/client.
11 11
  *
... ...
@@ -169,7 +169,7 @@ AAAReturnCode  AAAAddAVPToMessage(
169 169
 	}
170 170
 
171 171
 	if (!position) {
172
-		/* insert at the begining */
172
+		/* insert at the beginning */
173 173
 		avp->next = msg->avpList.head;
174 174
 		avp->prev = 0;
175 175
 		msg->avpList.head = avp;
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * 2003-04-07 created by bogdan
5 5
  *
6
- * Copyright (C) 2002-2003 Fhg Fokus
6
+ * Copyright (C) 2002-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of disc, a free diameter server/client.
9 9
  *
... ...
@@ -60,7 +60,7 @@ AAAReturnCode AAABuildMsgBuffer( AAAMessage *msg )
60 60
 	unsigned char *p;
61 61
 	AAA_AVP       *avp;
62 62
 
63
-	/* first let's comput the length of the buffer */
63
+	/* first let's compute the length of the buffer */
64 64
 	msg->buf.len = AAA_MSG_HDR_SIZE; /* AAA message header size */
65 65
 	/* count and add the avps */
66 66
 	for(avp=msg->avpList.head;avp;avp=avp->next) {
... ...
@@ -168,8 +168,8 @@ done:
168 168
 
169 169
 
170 170
 
171
-/* Sets tthe proper result_code into the Result-Code AVP; ths avp must already
172
- * exists into the reply messge */
171
+/* Sets the proper result_code into the Result-Code AVP; thus avp must already
172
+ * exists into the reply message */
173 173
 AAAResultCode  AAASetMessageResultCode(
174 174
 	AAAMessage *message,
175 175
 	AAAResultCode resultCode)
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * 2003-04-07 created by bogdan
5 5
  *
6
- * Copyright (C) 2002-2003 Fhg Fokus
6
+ * Copyright (C) 2002-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of disc, a free diameter server/client.
9 9
  *
... ...
@@ -57,7 +57,7 @@
57 57
 	(AVP_CODE_SIZE+AVP_FLAGS_SIZE+AVP_LENGTH_SIZE+\
58 58
 	AVP_VENDOR_ID_SIZE*(((_flags_)&AAA_AVP_FLAG_VENDOR_SPECIFIC)!=0) )
59 59
 
60
-/* mesage codes
60
+/* message codes
61 61
  */
62 62
 #ifndef WORDS_BIGENDIAN
63 63
 	#define AS_MSG_CODE      0x12010000
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * $Id$
3 3
  * Accounting module
4
- * Copyright (C) 2001-2003 Fhg Fokus
4
+ * Copyright (C) 2001-2003 FhG Fokus
5 5
  *
6 6
  * This file is part of ser, a free SIP server.
7 7
  *
... ...
@@ -177,7 +177,7 @@ int tcp_send_recv(int sockfd, char* buf, int len, rd_buf_t* rb,
177 177
 	return AAA_TIMEOUT;
178 178
 next:
179 179
 
180
-	/* endlich die richtige Antworte */
180
+	/* Finally die correct answer */
181 181
 	avp = AAAFindMatchingAVP(msg, NULL, AVP_Service_Type,
182 182
 							vendorID, AAA_FORWARD_SEARCH);
183 183
 	if(!avp)
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * $Id$
3 3
  * Accounting module
4
- * Copyright (C) 2001-2003 Fhg Fokus
4
+ * Copyright (C) 2001-2003 FhG Fokus
5 5
  *
6 6
  * This file is part of ser, a free SIP server.
7 7
  *
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2 2
  * Include file for Radius 
3 3
  *
4
- * Copyright (C) 2001-2003 Fhg Fokus
4
+ * Copyright (C) 2001-2003 FhG Fokus
5 5
  *
6 6
  * This file is part of ser, a free SIP server.
7 7
  *
... ...
@@ -71,7 +71,7 @@
71 71
 		<listitem>
72 72
 		    <para>
73 73
 			A single INVITE may produce multiple accounting reports -- that's
74
-			due to SIP's forking feature
74
+			due to SIP forking feature
75 75
 		    </para>
76 76
 		</listitem>
77 77
 		<listitem>
... ...
@@ -86,7 +86,7 @@
86 86
 		    <para>
87 87
 			There is no session accounting -- ser maintains no sessions. If one needs to
88 88
 			correlate INVITEs with BYEs for example for purpose of billing, then it is
89
-			better done in the entity which collects accounting infromation. Otherwise,
89
+			better done in the entity which collects accounting information. Otherwise,
90 90
 			SIP server would have to become sessions-stateful, which would very badly
91 91
 			impact its scalability.
92 92
 		    </para>
... ...
@@ -118,7 +118,7 @@
118 118
 	<para>
119 119
 	    Both mysql and radius libraries must be dynamically linkable. You need to configure your
120 120
 	    OS so that SER, when started, will find them. Typically, you do so by manipulating
121
-	    LD_LIBRARY_PATH environment variable or condiguring ld.so.
121
+	    LD_LIBRARY_PATH environment variable or configuring ld.so.
122 122
 	</para>
123 123
 	<section>
124 124
 	    <title>General Example</title>
... ...
@@ -291,7 +291,7 @@ modparam("acc", "report_ack", 0)
291 291
 	    <para>
292 292
 		By default, CANCEL reporting is disabled -- most accounting
293 293
 		applications are happy to see INVITE's cancellation status.
294
-		Turn on if you explicitely want to account CANCEL transactions.
294
+		Turn on if you explicitly want to account CANCEL transactions.
295 295
 	    </para>
296 296
 	    <para>
297 297
 		Default value is 0 (no).
... ...
@@ -482,7 +482,7 @@ modparam("acc", "diameter_client_port", 3000)
482 482
 	    <para>
483 483
 		<function moreinfo="none">acc_request</function> reports on a request, for example,
484 484
 		it can be used to report on missed calls to off-line users who are replied 404. To
485
-		avoid multiple reports on UDP request retranmission, you would need to embed the
485
+		avoid multiple reports on UDP request retransmission, you would need to embed the
486 486
 		action in stateful processing.
487 487
 	    </para> 
488 488
 	    <para>
... ...
@@ -534,7 +534,7 @@ acc_log_request("Some comment", "Some table");
534 534
 	    <title><function moreinfo="none">acc_rad_request(comment)</function></title>
535 535
 	    <para>
536 536
 		Like <function moreinfo="none">acc_log_request</function>, 
537
-		<function moreinfo="none">acc_rad_requst</function> reports on a request. It
537
+		<function moreinfo="none">acc_rad_request</function> reports on a request. It
538 538
 		reports to radius server as configured in <quote>radius_config</quote>.
539 539
 	    </para> 
540 540
 	    <para>
... ...
@@ -558,7 +558,7 @@ acc_rad_request("Some comment");
558 558
 	    <title><function moreinfo="none">acc_diam_request(comment)</function></title>
559 559
 	    <para>
560 560
 		Like <function moreinfo="none">acc_log_request</function>, 
561
-		<function moreinfo="none">acc_diam_requst</function> reports on a request. It
561
+		<function moreinfo="none">acc_diam_request</function> reports on a request. It
562 562
 		reports to Diameter server.
563 563
 	    </para> 
564 564
 	    <para>
... ...
@@ -25,7 +25,8 @@ Jan Janak
25 25
 
26 26
               1.3.1. secret (string)
27 27
               1.3.2. nonce_expire (integer)
28
-              1.3.3. rpid_suffix (string)
28
+              1.3.3. rpid_prefix (string)
29
+              1.3.4. rpid_suffix (string)
29 30
 
30 31
         1.4. Exported Functions
31 32
 
... ...
@@ -33,7 +34,8 @@ Jan Janak
33 34
               1.4.2. proxy_challenge(realm, qop)
34 35
               1.4.3. consume_credentials()
35 36
               1.4.4. is_rpid_user_e164()
36
-              1.4.5. append_rpid_hf
37
+              1.4.5. append_rpid_hf()
38
+              1.4.6. append_rpid_hf(prefix, suffix)
37 39
 
38 40
    2. Developer's Guide
39 41
    3. Frequently Asked Questions
... ...
@@ -41,12 +43,14 @@ Jan Janak
41 43
    List of Examples
42 44
    1-1. Setting secret module parameter
43 45
    1-2. nonce_expire example
44
-   1-3. rpid_suffix
45
-   1-4. www_challenge usage
46
-   1-5. proxy_challenge usage
47
-   1-6. consume_credentials example
48
-   1-7. is_rpid_user_e164 usage
49
-   1-8. append_rpid_hf
46
+   1-3. rpid_prefix
47
+   1-4. rpid_suffix
48
+   1-5. www_challenge usage
49
+   1-6. proxy_challenge usage
50
+   1-7. consume_credentials example
51
+   1-8. is_rpid_user_e164 usage
52
+   1-9. append_rpid_hf
53
+   1-10. append_rpid_hf(prefix, suffix)
50 54
      _________________________________________________________
51 55
 
52 56
 Chapter 1. User's Guide
... ...
@@ -56,14 +60,14 @@ Chapter 1. User's Guide
56 60
    This is a generic module that itself doesn't provide all
57 61
    functions necessary for authentication but provides functions
58 62
    that are needed by all other authentication related modules
59
-   (so called authenticatio backends).
63
+   (so called authentication backends).
60 64
 
61 65
    We decided to break the authentication code into several
62 66
    modules because there are now more than one backends
63 67
    (currently database authentication and radius are supported).
64 68
    This allows us to create separate packages so uses can install
65 69
    and load only required functionality. This also allows us to
66
-   avoid unecessary dependencies in the binary packages.
70
+   avoid unnecessary dependencies in the binary packages.
67 71
      _________________________________________________________
68 72
 
69 73
 1.2. Dependencies
... ...
@@ -101,7 +105,18 @@ modparam("auth", "secret", "johndoessecretphrase")
101 105
 modparam("auth", "nonce_expire", 600)   # Set nonce_expire to 600s
102 106
      _________________________________________________________
103 107
 
104
-1.3.3. rpid_suffix (string)
108
+1.3.3. rpid_prefix (string)
109
+
110
+   Prefix to be added to Remote-Party-ID header field just before
111
+   the URI returned from either radius or database.
112
+
113
+   Default value is "".
114
+
115
+   Example 1-3. rpid_prefix
116
+modparam("auth", "rpid_prefix", "Whatever <")
117
+     _________________________________________________________
118
+
119
+1.3.4. rpid_suffix (string)
105 120
 
106 121
    Suffix to be added to Remote-Party-ID header field after the
107 122
    URI returned from either radius or database.
... ...
@@ -109,8 +124,8 @@ modparam("auth", "nonce_expire", 600)   # Set nonce_expire to 600s
109 124
    Default value is
110 125
    ";party=calling;id-type=subscriber;screen=yes".
111 126
 
112
-   Example 1-3. rpid_suffix
113
-modparam("auth", "rpid_suffix", "whatever")
127
+   Example 1-4. rpid_suffix
128
+modparam("auth", "rpid_suffix", "@1.2.3.4>")
114 129
      _________________________________________________________
115 130
 
116 131
 1.4. Exported Functions
... ...
@@ -129,24 +144,24 @@ modparam("auth", "rpid_suffix", "whatever")
129 144
 
130 145
      * realm - Realm is a opaque string that the user agent
131 146
        should present to the user so he can decide what username
132
-       and password to use. Usualy this is domain of the host the
133
-       server is running on.
147
+       and password to use. Usually this is domain of the host
148
+       the server is running on.
134 149
        If an empty string "" is used then the server will
135 150
        generate it from the request. In case of REGISTER requests
136
-       To header field domain will be used (beucase this header
151
+       To header field domain will be used (because this header
137 152
        field represents a user being registered), for all other
138 153
        messages From header field domain will be used.
139 154
      * qop - Value of this parameter can be either "1" or "0".
140 155
        When set to 1 then the server will put qop parameter in
141 156
        the challenge. When set to 0 then the server will not put
142 157
        qop parameter in the challenge. It is strongly recommended
143
-       to use qop parameter, hovewere there are still some user
158
+       to use qop parameter, however there are still some user
144 159
        agents that cannot handle qop parameter properly so we
145 160
        made this optional. On the other hand there are still some
146 161
        user agents that cannot handle request without qop
147 162
        parameter too.
148 163
 
149
-   Example 1-4. www_challenge usage
164
+   Example 1-5. www_challenge usage
150 165
 ...
151 166
 if (www_authorize("iptel.org", "subscriber")) {
152 167
     www_challenge("iptel.org", "1");
... ...
@@ -168,8 +183,8 @@ if (www_authorize("iptel.org", "subscriber")) {
168 183
 
169 184
      * realm - Realm is a opaque string that the user agent
170 185
        should present to the user so he can decide what username
171
-       and password to use. Usualy this is domain of the host the
172
-       server is running on.
186
+       and password to use. Usually this is domain of the host
187
+       the server is running on.
173 188
        If an empty string "" is used then the server will
174 189
        generate it from the request. From header field domain
175 190
        will be used as realm.
... ...
@@ -177,13 +192,13 @@ if (www_authorize("iptel.org", "subscriber")) {
177 192
        When set to 1 then the server will put qop parameter in
178 193
        the challenge. When set to 0 then the server will not put
179 194
        qop parameter in the challenge. It is strongly recommended
180
-       to use qop parameter, hovewere there are still some user
195
+       to use qop parameter, however there are still some user
181 196
        agents that cannot handle qop parameter properly so we
182 197
        made this optional. On the other hand there are still some
183 198
        user agents that cannot handle request without qop
184 199
        parameter too.
185 200
 
186
-   Example 1-5. proxy_challenge usage
201
+   Example 1-6. proxy_challenge usage
187 202
 ...
188 203
 if (!proxy_authorize("", "subscriber)) {
189 204
     proxy_challenge("", "1");  # Realm will be autogenerated
... ...
@@ -202,7 +217,7 @@ if (!proxy_authorize("", "subscriber)) {
202 217
    The function must be called after www_authorize or
203 218
    proxy_authorize.
204 219
 
205
-   Example 1-6. consume_credentials example
220
+   Example 1-7. consume_credentials example
206 221
 ...
207 222
 if (www_authorize("", "subscriber)) {
208 223
     consume_credentials();
... ...
@@ -219,7 +234,7 @@ if (www_authorize("", "subscriber)) {
219 234
    fails, if no such SIP URI exists (i.e. radius server or
220 235
    database didn't provide this information).
221 236
 
222
-   Example 1-7. is_rpid_user_e164 usage
237
+   Example 1-8. is_rpid_user_e164 usage
223 238
 ...
224 239
 if (is_rpid_user_e164()) {
225 240
                     # do something here
... ...
@@ -227,7 +242,7 @@ if (is_rpid_user_e164()) {
227 242
 ...
228 243
      _________________________________________________________
229 244
 
230
-1.4.5. append_rpid_hf
245
+1.4.5. append_rpid_hf()
231 246
 
232 247
    Appends to the message a Remote-Party-ID header that contains
233 248
    header 'Remote-Party-ID: ' followed by the saved value of the
... ...
@@ -235,12 +250,36 @@ if (is_rpid_user_e164()) {
235 250
    by the value of module parameter radius_rpid_suffix. The
236 251
    function does nothing if no saved SIP URI exists.
237 252
 
238
-   Example 1-8. append_rpid_hf
253
+   Example 1-9. append_rpid_hf
239 254
 ...
240 255
 append_rpid_hf();  # Append Remote-Party-ID header field
241 256
 ...
242 257
      _________________________________________________________
243 258
 
259
+1.4.6. append_rpid_hf(prefix, suffix)
260
+
261
+   This function is the same as Section 1.4.5. The only
262
+   difference is that it accepts two parameters--prefix and
263
+   suffix to be added to Remote-Party-ID header field. This
264
+   function ignores rpid_prefix and rpid_suffix parameters,
265
+   instead of that allows to set them in every call.
266
+
267
+   Meaning of the parameters is as follows:
268
+
269
+     * prefix - Prefix of the Remote-Party-ID URI. The string
270
+       will be added at the begining of body of the header field,
271
+       just before the URI.
272
+     * suffix - Suffix of the Remote-Party-ID header field. The
273
+       string will be appended at the end of the header field. It
274
+       can be used to set various URI parameters, for example.
275
+
276
+   Example 1-10. append_rpid_hf(prefix, suffix)
277
+...
278
+append_rpid_hf("", ";party=calling;id-type=subscriber;screen=yes");  #
279
+Append Remote-Party-ID header field
280
+...
281
+     _________________________________________________________
282
+
244 283
 Chapter 2. Developer's Guide
245 284
 
246 285
    To be done.
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Digest Authentication Module
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -145,7 +145,7 @@ auth_result_t pre_auth(struct sip_msg* _m, str* _realm, int _hftype, struct hdr_
145 145
 	     /* ACK and CANCEL must be always authorized, there is
146 146
 	      * no way how to challenge ACK and CANCEL cannot be
147 147
 	      * challenged because it must have the same CSeq as
148
-	      * the request to be cancelled
148
+	      * the request to be canceled
149 149
 	      */
150 150
 
151 151
 	if ((_m->REQ_METHOD == METHOD_ACK) ||  (_m->REQ_METHOD == METHOD_CANCEL)) return AUTHORIZED;
... ...
@@ -219,7 +219,7 @@ auth_result_t post_auth(struct sip_msg* _m, struct hdr_field* _h, str* _rpid)
219 219
 			      * nonces because there is no way how to challenge
220 220
 			      * with new nonce (ACK has no response associated 
221 221
 			      * and CANCEL must have the same CSeq as the request 
222
-			      * to be cancelled)
222
+			      * to be canceled)
223 223
 			      */
224 224
 		} else {
225 225
 			DBG("post_auth(): Response is OK, but nonce is stale\n");
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Digest Authentication Module
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -38,10 +38,10 @@
38 38
 #define MAX_RPID_LEN 1024  /* Size of the buffer */
39 39
 
40 40
 typedef enum auth_result {
41
-	ERROR = -2 ,        /* Error occured, a reply has been sent out -> return 0 to the ser core */
41
+	ERROR = -2 ,        /* Error occurred, a reply has been sent out -> return 0 to the ser core */
42 42
 	NOT_AUTHORIZED,     /* Don't perform authorization, credentials missing */
43 43
 	DO_AUTHORIZATION,   /* Perform digest authorization */
44
-        AUTHORIZED          /* Authorized by default, no digest authorization necessarry */
44
+        AUTHORIZED          /* Authorized by default, no digest authorization necessary */
45 45
 } auth_result_t;
46 46
 
47 47
 
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Digest Authentication Module
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Digest Authentication Module
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -45,7 +45,7 @@ extern str secret;            /* secret phrase used to generate nonce */
45 45
 extern int nonce_expire;      /* nonce expire interval */
46 46
 extern str rpid_prefix;       /* Remote-Party-ID prefix */
47 47
 extern str rpid_suffix;       /* Remote-Party-ID suffix */
48
-extern str realm_prefix;      /* stripp off auto-generated realm */
48
+extern str realm_prefix;      /* strip off auto-generated realm */
49 49
 
50 50
 
51 51
 /* Stateless reply function pointer */
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Challenge related functions
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Challenge related functions
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Digest Authentication Module
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -82,7 +82,7 @@ int get_realm(struct sip_msg* _m, int _hftype, struct sip_uri* _u)
82 82
 
83 83
 /*
84 84
  * Create a response with given code and reason phrase
85
- * Optionaly add new headers specified in _hdr
85
+ * Optionally add new headers specified in _hdr
86 86
  */
87 87
 int send_resp(struct sip_msg* _m, int _code, char* _reason,
88 88
 					char* _hdr, int _hdr_len)
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Digest Authentication Module
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -44,7 +44,7 @@ int get_realm(struct sip_msg* _m, int _hftype, struct sip_uri* _u);
44 44
 
45 45
 /*
46 46
  * Create a response with given code and reason phrase
47
- * Optionaly add new headers specified in _hdr
47
+ * Optionally add new headers specified in _hdr
48 48
  */
49 49
 int send_resp(struct sip_msg* _m, int _code, char* _reason, char* _hdr, int _hdr_len);
50 50
 
... ...
@@ -16,13 +16,13 @@
16 16
 	<para>
17 17
 	    This is a generic module that itself doesn't provide all functions necessary for
18 18
 	    authentication but provides functions that are needed by all other authentication
19
-	    related modules (so called authenticatio backends). 
19
+	    related modules (so called authentication backends). 
20 20
 	</para>
21 21
 	<para>
22 22
 	    We decided to break the authentication code into several modules because there are
23 23
 	    now more than one backends (currently database authentication and radius are
24 24
 	    supported). This allows us to create separate packages so uses can install and load
25
-	    only required functionality. This also allows us to avoid unecessary dependencies in
25
+	    only required functionality. This also allows us to avoid unnecessary dependencies in
26 26
 	    the binary packages.
27 27
 	</para>
28 28
     </section>
... ...
@@ -77,7 +77,7 @@ modparam("auth", "nonce_expire", 600)   # Set nonce_expire to 600s
77 77
 	<section>
78 78
 	    <title><varname>rpid_prefix</varname> (string)</title>
79 79
 	    <para>
80
-		Prefix to be added to Remote-Party-ID header field just before the &uri; returned
80
+		Prefix to be added to Remote-Party-ID header field just before the URI returned
81 81
 		from either radius or database.
82 82
 	    </para>
83 83
 	    <para>
... ...
@@ -93,7 +93,7 @@ modparam("auth", "rpid_prefix", "Whatever <")
93 93
 	<section>
94 94
 	    <title><varname>rpid_suffix</varname> (string)</title>
95 95
 	    <para>
96
-		Suffix to be added to Remote-Party-ID header field after the &uri; returned from
96
+		Suffix to be added to Remote-Party-ID header field after the URI returned from
97 97
 		either radius or database.
98 98
 	    </para>
99 99
 	    <para>
... ...
@@ -124,12 +124,12 @@ modparam("auth", "rpid_suffix", "@1.2.3.4>")
124 124
 		<listitem>
125 125
 		    <para><emphasis>realm</emphasis> - Realm is a opaque string that the user agent
126 126
 		    should present to the user so he can decide what username and password to
127
-		    use. Usualy this is domain of the host the server is running on.
127
+		    use. Usually this is domain of the host the server is running on.
128 128
 		    </para>
129 129
 		    <para>
130 130
 			If an empty string <quote></quote> is used then the server will generate it
131 131
 			from the request. In case of REGISTER requests To header field domain will
132
-			be used (beucase this header field represents a user being registered), for
132
+			be used (because this header field represents a user being registered), for
133 133
 			all other messages From header field domain will be used.
134 134
 		    </para>
135 135
 		</listitem>
... ...
@@ -138,7 +138,7 @@ modparam("auth", "rpid_suffix", "@1.2.3.4>")
138 138
 			<quote>1</quote> or <quote>0</quote>. When set to 1 then the server will put
139 139
 			qop parameter in the challenge. When set to 0 then the server will not put
140 140
 			qop parameter in the challenge. It is strongly recommended to use qop
141
-			parameter, hovewere there are still some user agents that cannot handle qop
141
+			parameter, however there are still some user agents that cannot handle qop
142 142
 			parameter properly so we made this optional. On the other hand there are
143 143
 			still some user agents that cannot handle request without qop parameter too.
144 144
 		    </para>
... ...
@@ -170,7 +170,7 @@ if (www_authorize("iptel.org", "subscriber")) {
170 170
 		<listitem>
171 171
 		    <para><emphasis>realm</emphasis> - Realm is a opaque string that the user agent
172 172
 		    should present to the user so he can decide what username and password to
173
-		    use. Usualy this is domain of the host the server is running on.
173
+		    use. Usually this is domain of the host the server is running on.
174 174
 		    </para>
175 175
 		    <para>
176 176
 			If an empty string <quote></quote> is used then the server will generate it
... ...
@@ -182,12 +182,12 @@ if (www_authorize("iptel.org", "subscriber")) {
182 182
 			<quote>1</quote> or <quote>0</quote>. When set to 1 then the server will put
183 183
 			qop parameter in the challenge. When set to 0 then the server will not put
184 184
 			qop parameter in the challenge. It is strongly recommended to use qop
185
-			parameter, hovewere there are still some user agents that cannot handle qop
185
+			parameter, however there are still some user agents that cannot handle qop
186 186
 			parameter properly so we made this optional. On the other hand there are
187 187
 			still some user agents that cannot handle request without qop parameter too.
188 188
 		    </para>
189 189
 		</listitem>
190
-	    </itemizedlis>
190
+	    </itemizedlist>
191 191
 	    <example>
192 192
 		<title>proxy_challenge usage</title>
193 193
 		<programlisting format="linespecific">
... ...
@@ -241,7 +241,7 @@ if (is_rpid_user_e164()) {
241 241
 </programlisting>
242 242
 	    </example>
243 243
 	</section>
244
-	<section id="append_rpid_hf_no_params">
244
+	<section id="append-rpid-hf-no-params">
245 245
 	    <title><function moreinfo="none">append_rpid_hf()</function></title>
246 246
 	    <para>
247 247
 		Appends to the message a Remote-Party-ID header that contains header
... ...
@@ -258,10 +258,10 @@ append_rpid_hf();  # Append Remote-Party-ID header field
258 258
 </programlisting>
259 259
 	    </example>
260 260
 	</section>
261
-	<section id="append_rpid_hf_params">
261
+	<section id="append-rpid-hf-params">
262 262
 	    <title><function moreinfo="none">append_rpid_hf(prefix, suffix)</function></title>
263 263
 	    <para>
264
-		This function is the same as <xref linkend="append_rpid">. The only difference is
264
+		This function is the same as <xref linkend="append-rpid-hf-no-params">. The only difference is
265 265
 		that it accepts two parameters--prefix and suffix to be added to Remote-Party-ID
266 266
 		header field. This function ignores rpid_prefix and rpid_suffix parameters, instead
267 267
 		of that allows to set them in every call.
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Nonce related functions
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Nonce related functions
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Remote-Party-ID related functions
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -3,7 +3,7 @@
3 3
  *
4 4
  * Remote-Party-ID related functions
5 5
  *
6
- * Copyright (C) 2001-2003 Fhg Fokus
6
+ * Copyright (C) 2001-2003 FhG Fokus
7 7
  *
8 8
  * This file is part of ser, a free SIP server.
9 9
  *
... ...
@@ -5,6 +5,8 @@ Jan Janak
5 5
 
6 6
    FhG Fokus
7 7
 
8
+Jakob Schlyter
9
+
8 10
 Edited by
9 11
 
10 12
 Jan Janak
... ...
@@ -23,8 +25,10 @@ Jan Janak
23 25
               1.3.2. user_column (string)
24 26
               1.3.3. domain_column (string)
25 27
               1.3.4. password_column (string)
26
-              1.3.5. calculate_ha1 (integer)
27
-              1.3.6. password_column_2 (string)
28
+              1.3.5. rpid_column (string)
29
+              1.3.6. calculate_ha1 (integer)
30
+              1.3.7. password_column_2 (string)
31
+              1.3.8. use_rpid (integer)
28 32
 
29 33
         1.4. Exported Functions
30 34
 
... ...
@@ -39,10 +43,12 @@ Jan Janak
39 43
    1-2. user_column usage
40 44
    1-3. domain_column usage
41 45
    1-4. password_column usage
42
-   1-5. calculate_ha1usage
43
-   1-6. password_column_2 usage
44
-   1-7. www_authorize usage
45
-   1-8. proxy_authorize usage
46
+   1-5. rpid_column usage
47
+   1-6. calculate_ha1usage
48
+   1-7. password_column_2 usage
49
+   1-8. use_rpidusage
50
+   1-9. www_authorize usage
51
+   1-10. proxy_authorize usage
46 52
      _________________________________________________________
47 53
 
48 54
 Chapter 1. User's Guide
... ...
@@ -75,14 +81,14 @@ Chapter 1. User's Guide
75 81
    This is URL of the database to be used. Value of the parameter
76 82
    depends on the database module used. For example for mysql and
77 83
    postgres modules this is something like
78
-   sql://username:password@host:port/database. For dbtext module
79
-   (which stores data in plaintex files) it is directory in which
80
-   the database resides.
84
+   mysql://username:password@host:port/database. For dbtext
85
+   module (which stores data in plaintext files) it is directory
86
+   in which the database resides.
81 87
 
82
-   Default value is "sql://serro:47serro11@localhost/ser".
88
+   Default value is "mysql://serro:47serro11@localhost/ser".
83 89
 
84 90
    Example 1-1. db_url parameter usage
85
-modparam("auth_db", "db_url", "sql://foo:bar@foobar.org/ser")
91
+modparam("auth_db", "db_url", "mysql://foo:bar@foobar.org/ser")
86 92
      _________________________________________________________
87 93
 
88 94
 1.3.2. user_column (string)
... ...
@@ -124,7 +130,19 @@ modparam("auth_db", "domain_column", "domain")
124 130
 modparam("auth_db", "password_column", "password")
125 131
      _________________________________________________________
126 132
 
127
-1.3.5. calculate_ha1 (integer)
133
+1.3.5. rpid_column (string)
134
+
135
+   This is the name of the column holding information for the
136
+   Remote-Party-ID header field. Default value is fine for most
137
+   people. Use the parameter if you really need to change it.
138
+
139
+   Default value is "rpid".
140
+
141
+   Example 1-5. rpid_column usage
142
+modparam("auth_db", "rpid_column", "remote_party_id")
143
+     _________________________________________________________
144
+
145
+1.3.6. calculate_ha1 (integer)
128 146
 
129 147
    This parameter tells server whether it should expect plaintext
130 148
    passwords in the database or HA1 string. If the parameter is
... ...
@@ -149,11 +167,11 @@ modparam("auth_db", "password_column", "password")
149 167
 
150 168
    Default value of this parameter is 0.
151 169
 
152
-   Example 1-5. calculate_ha1usage
170
+   Example 1-6. calculate_ha1usage
153 171
 modparam("auth_db", "calculate_ha1", 1)
154 172
      _________________________________________________________
155 173
 
156
-1.3.6. password_column_2 (string)
174
+1.3.7. password_column_2 (string)
157 175
 
158 176
    As described in the previous section this parameter contains
159 177
    name of column holding pre-calculated HA1 string that were
... ...
@@ -164,16 +182,31 @@ modparam("auth_db", "calculate_ha1", 1)
164 182
 
165 183
    Default value of the parameter is ha1b.
166 184
 
167
-   Example 1-6. password_column_2 usage
185
+   Example 1-7. password_column_2 usage
168 186
 modparam("auth_db", "password_column_2", "ha1_2")
169 187
      _________________________________________________________
170 188
 
189
+1.3.8. use_rpid (integer)
190
+
191
+   This parameter specifies whether the server should fetch a
192
+   value for the Remote-Party-ID header field from the database.
193
+
194
+   If the parameter is set to 1 the server expects to find a
195
+   value for this header in the column specified by the
196
+   rpid_column parameter.
197
+
198
+   Default value of this parameter is 0.
199
+
200
+   Example 1-8. use_rpidusage
201
+modparam("auth_db", "use_rpid", 1)
202
+     _________________________________________________________
203
+
171 204
 1.4. Exported Functions
172 205
 
173 206
 1.4.1. www_authorize(realm, table)
174 207
 
175
-   The function verifies credencials according to RFC2617. If the
176
-   credentials are verified sucessfully then the function will
208
+   The function verifies credentials according to RFC2617. If the
209
+   credentials are verified successfully then the function will
177 210
    succeed and mark the credentials as authorized (marked
178 211
    credentials can be later used by some other functions). If the
179 212
    function was unable to verify the credentials for some reason
... ...
@@ -184,17 +217,17 @@ modparam("auth_db", "password_column_2", "ha1_2")
184 217
 
185 218
      * realm - Realm is a opaque string that the user agent
186 219
        should present to the user so he can decide what username
187
-       and password to use. Usualy this is domain of the host the
188
-       server is running on.
220
+       and password to use. Usually this is domain of the host
221
+       the server is running on.
189 222
        If an empty string "" is used then the server will
190 223
        generate it from the request. In case of REGISTER requests
191 224
        To header field domain will be used (because this header
192 225
        field represents a user being registered), for all other
193 226
        messages From header field domain will be used.
194 227
      * table - Table to be used to lookup usernames and passwords
195
-       (usualy subscribers table).
228
+       (usually subscribers table).
196 229
 
197
-   Example 1-7. www_authorize usage