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 83
      * u = digest Username
84 84
      * p = username Part of inbound Request-URI
85 85
 
86
-   If  a  value  is  not  present  in request, "n/a" is accounted
86
+   If a value is not present in request, "n/a" is accounted
87 87
    instead.
88 88
 
89 89
    Note that:
90 90
 
91 91
      * 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
92
+       that's due to SIP 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
97 97
        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
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 information.
102
+       Otherwise, SIP server would have to become
103
+       sessions-stateful, which would very badly impact its
104 104
        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
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
109 109
        PSTN status in case of the gateway).
110 110
 
111
-   Support  for  SQL  and  RADIUS  works analogously. You need to
111
+   Support for SQL and RADIUS works analogously. You need to
112 112
    enable it by recompiling the module with properly set defines.
113
-   Uncomment     the     SQL_ACC    and    RAD_ACC    lines    in
113
+   Uncomment the SQL_ACC and RAD_ACC lines in
114 114
    modules/acc/Makefile. To compile SQL support, you need to have
115 115
    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.
116
+   you need to have radiusclient installed on your system
117
+   (version 0.4.1 or higher is required) which is available from
118
+   http://developer.berlios.de/projects/radiusclient-ng/. The
119
+   radius client needs to be configured properly. To do so, use
120
+   the template at etc/radiusclient.conf and make sure that
121
+   module's radius_config parameter points to its location. In
122
+   particular, accounting secret must match that one configured
123
+   in server and proper dictionary is used (one is available at
124
+   etc/sip_dictionary). Uses along with FreeRadius
125
+   (http://www.freeradius.org/) and Radiator
126
+   (http://www.open.com.au/radiator/) servers have been reported
127
+   to us.
128
+
129
+   Both mysql and radius libraries must be dynamically linkable.
130
+   You need to configure your OS so that SER, when started, will
131
+   find them. Typically, you do so by manipulating
132
+   LD_LIBRARY_PATH environment variable or configuring ld.so.
130 133
      _________________________________________________________
131 134
 
132 135
 1.1.1. General Example
... ...
@@ -155,7 +184,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
155 155
 
156 156
 1.2. Dependencies
157 157
 
158
-   The  module  depends  on  the  following modules (in the other
158
+   The module depends on the following modules (in the other
159 159
    words the listed modules must be loaded before this module):
160 160
 
161 161
      * tm -- Transaction Manager
... ...
@@ -169,7 +198,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
169 169
    Default value is randomly generated string.
170 170
 
171 171
    Example 1-1. Setting secret module parameter
172
-   modparam("auth", "secret", "johndoessecretphrase")
172
+modparam("auth", "secret", "johndoessecretphrase")
173 173
      _________________________________________________________
174 174
 
175 175
 1.3.2. log_level (integer)
... ...
@@ -179,7 +208,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
179 179
    Default value is L_NOTICE.
180 180
 
181 181
    Example 1-2. log_level example
182
-   modparam("acc", "log_level", 2)   # Set log_level to 2
182
+modparam("acc", "log_level", 2)   # Set log_level to 2
183 183
      _________________________________________________________
184 184
 
185 185
 1.3.3. log_fmt (string)
... ...
@@ -190,7 +219,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
190 190
    Default value is "miocfs".
191 191
 
192 192
    Example 1-3. log_fmt example
193
-   modparam("acc", "log_fmt", "mfs")
193
+modparam("acc", "log_fmt", "mfs")
194 194
      _________________________________________________________
195 195
 
196 196
 1.3.4. early_media (integer)
... ...
@@ -200,7 +229,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
200 200
    Default value is 0 (no).
201 201
 
202 202
    Example 1-4. early_media example
203
-   modparam("acc", "early_media", 1)
203
+modparam("acc", "early_media", 1)
204 204
      _________________________________________________________
205 205
 
206 206
 1.3.5. failed_transactions (integer)
... ...
@@ -210,7 +239,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
210 210
    Default value is 0 (no).
211 211
 
212 212
    Example 1-5. failed_transactions example
213
-   modparam("acc", "failed_transactions", 1)
213
+modparam("acc", "failed_transactions", 1)
214 214
      _________________________________________________________
215 215
 
216 216
 1.3.6. log_flag (integer)
... ...
@@ -220,7 +249,7 @@ if (uri=~"sip:+49") /* calls to Germany */ {
220 220
    Default value is 1.
221 221
 
222 222
    Example 1-6. log_flag example
223
-   modparam("acc", "log_flag", 2)
223
+modparam("acc", "log_flag", 2)
224 224
      _________________________________________________________
225 225
 
226 226
 1.3.7. log_missed_flag (integer)
... ...
@@ -230,42 +259,41 @@ if (uri=~"sip:+49") /* calls to Germany */ {
230 230
    Default value is 2.
231 231
 
232 232
    Example 1-7. log_missed_flag example
233
-   modparam("acc", "log_missed_flag", 3)
233
+modparam("acc", "log_missed_flag", 3)
234 234
      _________________________________________________________
235 235
 
236 236
 1.3.8. report_ack (integer)
237 237
 
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
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
240 240
    (unless RR enabled) and mismatch original INVITE (e2e ACKs are
241 241
    a separate transaction).
242 242
 
243 243
    Default value is 1 (yes).
244 244
 
245 245
    Example 1-8. report_ack example
246
-   modparam("acc", "report_ack", 0)
246
+modparam("acc", "report_ack", 0)
247 247
      _________________________________________________________
248 248
 
249 249
 1.3.9. report_cancels (integer)
250 250
 
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.
251
+   By default, CANCEL reporting is disabled -- most accounting
252
+   applications are happy to see INVITE's cancellation status.
253
+   Turn on if you explicitly want to account CANCEL transactions.
255 254
 
256 255
    Default value is 0 (no).
257 256
 
258 257
    Example 1-9. report_cancels example
259
-   modparam("acc", "report_cancels", 1)
258
+modparam("acc", "report_cancels", 1)
260 259
      _________________________________________________________
261 260
 
262 261
 1.3.10. radius_config (string)
263 262
 
264
-   This  parameter  is  radius  specific.  Path  to radius client
263
+   This parameter is radius specific. Path to radius client
265 264
    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
265
+   specify there address of server, shared secret (should equal
266
+   that in /usr/local/etc/raddb/clients for freeRadius servers)
267
+   and dictionary, see etc for an example of config file and
269 268
    dictionary.
270 269
 
271 270
    Default value is
... ...
@@ -282,7 +310,7 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
282 282
    Default value is 15 (SIP).
283 283
 
284 284
    Example 1-11. service_type example
285
-   modparam("acc", "service_type", 16)
285
+modparam("acc", "service_type", 16)
286 286
      _________________________________________________________
287 287
 
288 288
 1.3.12. radius_flag (integer)
... ...
@@ -293,18 +321,18 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
293 293
    Default value is 1.
294 294
 
295 295
    Example 1-12. radius_flag example
296
-   modparam("acc", "radius_flag", 2)
296
+modparam("acc", "radius_flag", 2)
297 297
      _________________________________________________________
298 298
 
299 299
 1.3.13. radius_missed_flag (integer)
300 300
 
301
-   Request  flag which needs to be set to account missed calls --
301
+   Request flag which needs to be set to account missed calls --
302 302
    RADIUS specific.
303 303
 
304 304
    Default value is 2.
305 305
 
306 306
    Example 1-13. radius_missed_flag example
307
-   modparam("acc", "radius_missed_flag", 3)
307
+modparam("acc", "radius_missed_flag", 3)
308 308
      _________________________________________________________
309 309
 
310 310
 1.3.14. db_url (string)
... ...
@@ -314,7 +342,7 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
314 314
    Default value is "mysql://ser:heslo@localhost/ser"
315 315
 
316 316
    Example 1-14. db_url example
317
-   modparam("acc", "db_url", "mysql://user:password@localhost/ser")
317
+modparam("acc", "db_url", "mysql://user:password@localhost/ser")
318 318
      _________________________________________________________
319 319
 
320 320
 1.3.15. db_flag (integer)
... ...
@@ -325,18 +353,18 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
325 325
    Default value is 1.
326 326
 
327 327
    Example 1-15. db_flag example
328
-   modparam("acc", "db_flag", 2)
328
+modparam("acc", "db_flag", 2)
329 329
      _________________________________________________________
330 330
 
331 331
 1.3.16. db_missed_flag (integer)
332 332
 
333
-   Request  flag which needs to be set to account missed calls --
333
+   Request flag which needs to be set to account missed calls --
334 334
    database specific.
335 335
 
336 336
    Default value is 2.
337 337
 
338 338
    Example 1-16. db_missed_flag example
339
-   modparam("acc", "db_missed_flag", 3)
339
+modparam("acc", "db_missed_flag", 3)
340 340
      _________________________________________________________
341 341
 
342 342
 1.3.17. diameter_flag (integer)
... ...
@@ -347,29 +375,29 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
347 347
    Default value is 1.
348 348
 
349 349
    Example 1-17. diameter_flag example
350
-   modparam("acc", "diameter_flag", 2)
350
+modparam("acc", "diameter_flag", 2)
351 351
      _________________________________________________________
352 352
 
353 353
 1.3.18. diameter_missed_flag (integer)
354 354
 
355
-   Request  flag which needs to be set to account missed calls --
355
+   Request flag which needs to be set to account missed calls --
356 356
    DIAMETER specific.
357 357
 
358 358
    Default value is 2.
359 359
 
360 360
    Example 1-18. diameter_missed_flag example
361
-   modparam("acc", "diameter_missed_flag", 3)
361
+modparam("acc", "diameter_missed_flag", 3)
362 362
      _________________________________________________________
363 363
 
364 364
 1.3.19. diameter_client_host (string)
365 365
 
366
-   Hostname  of  the machine where the DIAMETER Client is running
366
+   Hostname of the machine where the DIAMETER Client is running
367 367
    -- DIAMETER specific.
368 368
 
369 369
    Default value is "localhost".
370 370
 
371 371
    Example 1-19. diameter_client_host example
372
-   modparam("acc", "diameter_client_host", "iptel.org")
372
+modparam("acc", "diameter_client_host", "iptel.org")
373 373
      _________________________________________________________
374 374
 
375 375
 1.3.20. diameter_client_port (int)
... ...
@@ -380,16 +408,16 @@ modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
380 380
    Default value is 3000.
381 381
 
382 382
    Example 1-20. diameter_client_host example
383
-   modparam("acc", "diameter_client_port", 3000)
383
+modparam("acc", "diameter_client_port", 3000)
384 384
      _________________________________________________________
385 385
 
386 386
 1.4. Exported Functions
387 387
 
388 388
 1.4.1. acc_log_request(comment)
389 389
 
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,
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 retransmission,
393 393
    you would need to embed the action in stateful processing.
394 394
 
395 395
    Meaning of the parameters is as follows:
... ...
@@ -405,7 +433,7 @@ acc_log_request("Some comment");
405 405
 1.4.2. acc_db_request(comment, table)
406 406
 
407 407
    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
408
+   report is sent to database at "db_url", in the table referred
409 409
    to in the second action parameter
410 410
 
411 411
    Meaning of the parameters is as follows:
... ...
@@ -421,7 +449,7 @@ acc_log_request("Some comment", "Some table");
421 421
 
422 422
 1.4.3. acc_rad_request(comment)
423 423
 
424
-   Like  acc_log_request, acc_rad_requst reports on a request. It
424
+   Like acc_log_request, acc_rad_request reports on a request. It
425 425
    reports to radius server as configured in "radius_config".
426 426
 
427 427
    Meaning of the parameters is as follows:
... ...
@@ -436,8 +464,8 @@ acc_rad_request("Some comment");
436 436
 
437 437
 1.4.4. acc_diam_request(comment)
438 438
 
439
-   Like acc_log_request, acc_diam_requst reports on a request. It
440
-   reports to Diameter server.
439
+   Like acc_log_request, acc_diam_request reports on a request.
440
+   It reports to Diameter server.
441 441
 
442 442
    Meaning of the parameters is as follows:
443 443
 
... ...
@@ -456,8 +484,8 @@ Chapter 2. Developer's Guide
456 456
 
457 457
 Chapter 3. Frequently Asked Questions
458 458
 
459
-   Q: What is the meaning of life ?
459
+   3.1. What is the meaning of life ?
460 460
 
461
-   Q: What is the meaning of life ?
461
+   3.1. What is the meaning of life ?
462 462
 
463
-   A: 42
463
+   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 33
               1.4.2. proxy_challenge(realm, qop)
34 34
               1.4.3. consume_credentials()
35 35
               1.4.4. is_rpid_user_e164()
36
-              1.4.5. append_rpid_hf
36
+              1.4.5. append_rpid_hf()
37
+              1.4.6. append_rpid_hf(prefix, suffix)
37 38
 
38 39
    2. Developer's Guide
39 40
    3. Frequently Asked Questions
... ...
@@ -41,12 +43,14 @@ Jan Janak
41 41
    List of Examples
42 42
    1-1. Setting secret module parameter
43 43
    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
44
+   1-3. rpid_prefix
45
+   1-4. rpid_suffix
46
+   1-5. www_challenge usage
47
+   1-6. proxy_challenge usage
48
+   1-7. consume_credentials example
49
+   1-8. is_rpid_user_e164 usage
50
+   1-9. append_rpid_hf
51
+   1-10. append_rpid_hf(prefix, suffix)
50 52
      _________________________________________________________
51 53
 
52 54
 Chapter 1. User's Guide
... ...
@@ -56,14 +60,14 @@ Chapter 1. User's Guide
56 56
    This is a generic module that itself doesn't provide all
57 57
    functions necessary for authentication but provides functions
58 58
    that are needed by all other authentication related modules
59
-   (so called authenticatio backends).
59
+   (so called authentication backends).
60 60
 
61 61
    We decided to break the authentication code into several
62 62
    modules because there are now more than one backends
63 63
    (currently database authentication and radius are supported).
64 64
    This allows us to create separate packages so uses can install
65 65
    and load only required functionality. This also allows us to
66
-   avoid unecessary dependencies in the binary packages.
66
+   avoid unnecessary dependencies in the binary packages.
67 67
      _________________________________________________________
68 68
 
69 69
 1.2. Dependencies
... ...
@@ -101,7 +105,18 @@ modparam("auth", "secret", "johndoessecretphrase")
101 101
 modparam("auth", "nonce_expire", 600)   # Set nonce_expire to 600s
102 102
      _________________________________________________________
103 103
 
104
-1.3.3. rpid_suffix (string)
104
+1.3.3. rpid_prefix (string)
105
+
106
+   Prefix to be added to Remote-Party-ID header field just before
107
+   the URI returned from either radius or database.
108
+
109
+   Default value is "".
110
+
111
+   Example 1-3. rpid_prefix
112
+modparam("auth", "rpid_prefix", "Whatever <")
113
+     _________________________________________________________
114
+
115
+1.3.4. rpid_suffix (string)
105 116
 
106 117
    Suffix to be added to Remote-Party-ID header field after the
107 118
    URI returned from either radius or database.
... ...
@@ -109,8 +124,8 @@ modparam("auth", "nonce_expire", 600)   # Set nonce_expire to 600s
109 109
    Default value is
110 110
    ";party=calling;id-type=subscriber;screen=yes".
111 111
 
112
-   Example 1-3. rpid_suffix
113
-modparam("auth", "rpid_suffix", "whatever")
112
+   Example 1-4. rpid_suffix
113
+modparam("auth", "rpid_suffix", "@1.2.3.4>")
114 114
      _________________________________________________________
115 115
 
116 116
 1.4. Exported Functions
... ...
@@ -129,24 +144,24 @@ modparam("auth", "rpid_suffix", "whatever")
129 129
 
130 130
      * realm - Realm is a opaque string that the user agent
131 131
        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.
132
+       and password to use. Usually this is domain of the host
133
+       the server is running on.
134 134
        If an empty string "" is used then the server will
135 135
        generate it from the request. In case of REGISTER requests
136
-       To header field domain will be used (beucase this header
136
+       To header field domain will be used (because this header
137 137
        field represents a user being registered), for all other
138 138
        messages From header field domain will be used.
139 139
      * qop - Value of this parameter can be either "1" or "0".
140 140
        When set to 1 then the server will put qop parameter in
141 141
        the challenge. When set to 0 then the server will not put
142 142
        qop parameter in the challenge. It is strongly recommended
143
-       to use qop parameter, hovewere there are still some user
143
+       to use qop parameter, however there are still some user
144 144
        agents that cannot handle qop parameter properly so we
145 145
        made this optional. On the other hand there are still some
146 146
        user agents that cannot handle request without qop
147 147
        parameter too.
148 148
 
149
-   Example 1-4. www_challenge usage
149
+   Example 1-5. www_challenge usage
150 150
 ...
151 151
 if (www_authorize("iptel.org", "subscriber")) {
152 152
     www_challenge("iptel.org", "1");
... ...
@@ -168,8 +183,8 @@ if (www_authorize("iptel.org", "subscriber")) {
168 168
 
169 169
      * realm - Realm is a opaque string that the user agent
170 170
        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.
171
+       and password to use. Usually this is domain of the host
172
+       the server is running on.
173 173
        If an empty string "" is used then the server will
174 174
        generate it from the request. From header field domain
175 175
        will be used as realm.
... ...
@@ -177,13 +192,13 @@ if (www_authorize("iptel.org", "subscriber")) {
177 177
        When set to 1 then the server will put qop parameter in
178 178
        the challenge. When set to 0 then the server will not put
179 179
        qop parameter in the challenge. It is strongly recommended
180
-       to use qop parameter, hovewere there are still some user
180
+       to use qop parameter, however there are still some user
181 181
        agents that cannot handle qop parameter properly so we
182 182
        made this optional. On the other hand there are still some
183 183
        user agents that cannot handle request without qop
184 184
        parameter too.
185 185
 
186
-   Example 1-5. proxy_challenge usage
186
+   Example 1-6. proxy_challenge usage
187 187
 ...
188 188
 if (!proxy_authorize("", "subscriber)) {
189 189
     proxy_challenge("", "1");  # Realm will be autogenerated
... ...
@@ -202,7 +217,7 @@ if (!proxy_authorize("", "subscriber)) {
202 202
    The function must be called after www_authorize or
203 203
    proxy_authorize.
204 204
 
205
-   Example 1-6. consume_credentials example
205
+   Example 1-7. consume_credentials example
206 206
 ...
207 207
 if (www_authorize("", "subscriber)) {
208 208
     consume_credentials();
... ...
@@ -219,7 +234,7 @@ if (www_authorize("", "subscriber)) {
219 219
    fails, if no such SIP URI exists (i.e. radius server or
220 220
    database didn't provide this information).
221 221
 
222
-   Example 1-7. is_rpid_user_e164 usage
222
+   Example 1-8. is_rpid_user_e164 usage
223 223
 ...
224 224
 if (is_rpid_user_e164()) {
225 225
                     # do something here
... ...
@@ -227,7 +242,7 @@ if (is_rpid_user_e164()) {
227 227
 ...
228 228
      _________________________________________________________
229 229
 
230
-1.4.5. append_rpid_hf
230
+1.4.5. append_rpid_hf()
231 231
 
232 232
    Appends to the message a Remote-Party-ID header that contains
233 233
    header 'Remote-Party-ID: ' followed by the saved value of the
... ...
@@ -235,12 +250,36 @@ if (is_rpid_user_e164()) {
235 235
    by the value of module parameter radius_rpid_suffix. The
236 236
    function does nothing if no saved SIP URI exists.
237 237
 
238
-   Example 1-8. append_rpid_hf
238
+   Example 1-9. append_rpid_hf
239 239
 ...
240 240
 append_rpid_hf();  # Append Remote-Party-ID header field
241 241
 ...
242 242
      _________________________________________________________
243 243
 
244
+1.4.6. append_rpid_hf(prefix, suffix)
245
+
246
+   This function is the same as Section 1.4.5. The only
247
+   difference is that it accepts two parameters--prefix and
248
+   suffix to be added to Remote-Party-ID header field. This
249
+   function ignores rpid_prefix and rpid_suffix parameters,
250
+   instead of that allows to set them in every call.
251
+
252
+   Meaning of the parameters is as follows:
253
+
254
+     * prefix - Prefix of the Remote-Party-ID URI. The string
255
+       will be added at the begining of body of the header field,
256
+       just before the URI.
257
+     * suffix - Suffix of the Remote-Party-ID header field. The
258
+       string will be appended at the end of the header field. It
259
+       can be used to set various URI parameters, for example.
260
+
261
+   Example 1-10. append_rpid_hf(prefix, suffix)
262
+...
263
+append_rpid_hf("", ";party=calling;id-type=subscriber;screen=yes");  #
264
+Append Remote-Party-ID header field
265
+...
266
+     _________________________________________________________
267
+
244 268
 Chapter 2. Developer's Guide
245 269
 
246 270
    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 23
               1.3.2. user_column (string)
24 24
               1.3.3. domain_column (string)
25 25
               1.3.4. password_column (string)
26
-              1.3.5. calculate_ha1 (integer)
27
-              1.3.6. password_column_2 (string)
26
+              1.3.5. rpid_column (string)
27
+              1.3.6. calculate_ha1 (integer)
28
+              1.3.7. password_column_2 (string)
29
+              1.3.8. use_rpid (integer)
28 30
 
29 31
         1.4. Exported Functions
30 32
 
... ...
@@ -39,10 +43,12 @@ Jan Janak
39 39
    1-2. user_column usage
40 40
    1-3. domain_column usage
41 41
    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
42
+   1-5. rpid_column usage
43
+   1-6. calculate_ha1usage
44
+   1-7. password_column_2 usage
45
+   1-8. use_rpidusage
46
+   1-9. www_authorize usage
47
+   1-10. proxy_authorize usage
46 48
      _________________________________________________________
47 49
 
48 50
 Chapter 1. User's Guide
... ...
@@ -75,14 +81,14 @@ Chapter 1. User's Guide
75 75
    This is URL of the database to be used. Value of the parameter
76 76
    depends on the database module used. For example for mysql and
77 77
    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.
78
+   mysql://username:password@host:port/database. For dbtext
79
+   module (which stores data in plaintext files) it is directory
80
+   in which the database resides.
81 81
 
82
-   Default value is "sql://serro:47serro11@localhost/ser".
82
+   Default value is "mysql://serro:47serro11@localhost/ser".
83 83
 
84 84
    Example 1-1. db_url parameter usage
85
-modparam("auth_db", "db_url", "sql://foo:bar@foobar.org/ser")
85
+modparam("auth_db", "db_url", "mysql://foo:bar@foobar.org/ser")
86 86
      _________________________________________________________
87 87
 
88 88
 1.3.2. user_column (string)
... ...
@@ -124,7 +130,19 @@ modparam("auth_db", "domain_column", "domain")
124 124
 modparam("auth_db", "password_column", "password")
125 125
      _________________________________________________________
126 126
 
127
-1.3.5. calculate_ha1 (integer)
127
+1.3.5. rpid_column (string)
128
+
129
+   This is the name of the column holding information for the
130
+   Remote-Party-ID header field. Default value is fine for most
131
+   people. Use the parameter if you really need to change it.
132
+
133
+   Default value is "rpid".
134
+
135
+   Example 1-5. rpid_column usage
136
+modparam("auth_db", "rpid_column", "remote_party_id")
137
+     _________________________________________________________
138
+
139
+1.3.6. calculate_ha1 (integer)
128 140
 
129 141
    This parameter tells server whether it should expect plaintext
130 142
    passwords in the database or HA1 string. If the parameter is
... ...
@@ -149,11 +167,11 @@ modparam("auth_db", "password_column", "password")
149 149
 
150 150
    Default value of this parameter is 0.
151 151
 
152
-   Example 1-5. calculate_ha1usage
152
+   Example 1-6. calculate_ha1usage
153 153
 modparam("auth_db", "calculate_ha1", 1)
154 154
      _________________________________________________________
155 155
 
156
-1.3.6. password_column_2 (string)
156
+1.3.7. password_column_2 (string)
157 157
 
158 158
    As described in the previous section this parameter contains
159 159
    name of column holding pre-calculated HA1 string that were
... ...
@@ -164,16 +182,31 @@ modparam("auth_db", "calculate_ha1", 1)
164 164
 
165 165
    Default value of the parameter is ha1b.
166 166
 
167
-   Example 1-6. password_column_2 usage
167
+   Example 1-7. password_column_2 usage
168 168
 modparam("auth_db", "password_column_2", "ha1_2")
169 169
      _________________________________________________________
170 170
 
171
+1.3.8. use_rpid (integer)
172
+
173
+   This parameter specifies whether the server should fetch a
174
+   value for the Remote-Party-ID header field from the database.
175
+
176
+   If the parameter is set to 1 the server expects to find a
177
+   value for this header in the column specified by the
178
+   rpid_column parameter.
179
+
180
+   Default value of this parameter is 0.
181
+
182
+   Example 1-8. use_rpidusage
183
+modparam("auth_db", "use_rpid", 1)
184
+     _________________________________________________________
185
+
171 186
 1.4. Exported Functions
172 187
 
173 188
 1.4.1. www_authorize(realm, table)
174 189
 
175
-   The function verifies credencials according to RFC2617. If the
176
-   credentials are verified sucessfully then the function will
190
+   The function verifies credentials according to RFC2617. If the
191
+   credentials are verified successfully then the function will
177 192
    succeed and mark the credentials as authorized (marked
178 193
    credentials can be later used by some other functions). If the
179 194
    function was unable to verify the credentials for some reason
... ...
@@ -184,17 +217,17 @@ modparam("auth_db", "password_column_2", "ha1_2")
184 184
 
185 185
      * realm - Realm is a opaque string that the user agent
186 186
        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.
187
+       and password to use. Usually this is domain of the host
188
+       the server is running on.
189 189
        If an empty string "" is used then the server will
190 190
        generate it from the request. In case of REGISTER requests
191 191
        To header field domain will be used (because this header
192 192
        field represents a user being registered), for all other
193 193
        messages From header field domain will be used.
194 194
      * table - Table to be used to lookup usernames and passwords
195
-       (usualy subscribers table).
195
+       (usually subscribers table).
196 196
 
197
-   Example 1-7. www_authorize usage
197
+   Example 1-9. www_authorize usage
198 198
 ...
199 199
 if (www_authorize("iptel.org", "subscriber")) {
200